{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/forwardai/json-schema/forwardai-create-credit-notes-schema.json",
  "title": "CreateCreditNotes",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/forwardai-credit-note-api-openapi.yml#/components/schemas/CreateCreditNotes",
  "type": "object",
  "required": [
    "contactId",
    "lineItems"
  ],
  "properties": {
    "date": {
      "type": "string"
    },
    "contactId": {
      "type": "string"
    },
    "refNumber": {
      "type": "string"
    },
    "memo": {
      "type": "string"
    },
    "lineItems": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "itemId",
          "amount"
        ],
        "properties": {
          "itemId": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "unitPrice": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          },
          "taxCode": {
            "type": "string"
          }
        }
      }
    }
  }
}