{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/navision/json-schema/navision-purchase-invoice-schema.json",
  "title": "PurchaseInvoice",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/navision-purchase-invoices-api-openapi.yml#/components/schemas/PurchaseInvoice",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "number": {
      "type": "string",
      "maxLength": 20
    },
    "invoiceDate": {
      "type": "string",
      "format": "date"
    },
    "postingDate": {
      "type": "string",
      "format": "date"
    },
    "dueDate": {
      "type": "string",
      "format": "date"
    },
    "vendorId": {
      "type": "string",
      "format": "uuid"
    },
    "vendorNumber": {
      "type": "string",
      "maxLength": 20
    },
    "vendorName": {
      "type": "string",
      "maxLength": 100
    },
    "currencyCode": {
      "type": "string",
      "maxLength": 10
    },
    "pricesIncludeTax": {
      "type": "boolean"
    },
    "totalAmountExcludingTax": {
      "type": "number",
      "format": "decimal",
      "readOnly": true
    },
    "totalTaxAmount": {
      "type": "number",
      "format": "decimal",
      "readOnly": true
    },
    "totalAmountIncludingTax": {
      "type": "number",
      "format": "decimal",
      "readOnly": true
    },
    "status": {
      "type": "string",
      "enum": [
        "Draft",
        "In Review",
        "Open",
        "Paid",
        "Canceled",
        "Corrective"
      ],
      "readOnly": true
    },
    "lastModifiedDateTime": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  }
}