# einvoice.parse

Extract invoice parties, references, dates, amounts, and lines from XML or hybrid PDF.

- REST: `POST https://api.kanagu.dev/v1/einvoice/parse`
- MCP tool: `einvoice.parse` at https://api.kanagu.dev/mcp
- Price: $0.02 USD per successful call. Trial: 10 calls per IP per UTC day without a key, shared by REST and MCP.
- Auth: `Authorization: Bearer <key>` for billed calls. Retries: reuse `Idempotency-Key`.

## Request body

Exactly one of these shapes:

1. With xml:

- `xml` (string (max 1048576 chars), required): Invoice XML text, up to 1 MiB.

2. With base64:

- `base64` (string (base64, max 5592408 chars), required): Invoice XML or hybrid PDF, up to 4 MiB before Base64 encoding.

## Response

- `format` ("ubl" | "cii", required)
- `container` ("xml" | "pdf", required)
- `profile` (string)
- `reference` (string)
- `invoiceNumber` (string)
- `issueDate` (string (date))
- `dueDate` (string (date))
- `currency` (string)
- `seller` (object, required)
- `seller.name` (string)
- `seller.vatId` (string)
- `seller.electronicAddress` (string)
- `seller.electronicAddressScheme` (string)
- `seller.email` (string): Contact email address.
- `seller.address` (object, required)
- `seller.address.street` (string)
- `seller.address.city` (string)
- `seller.address.postalCode` (string)
- `seller.address.country` (string)
- `seller.taxRegistrationId` (string)
- `buyer` (object, required)
- `buyer.name` (string)
- `buyer.vatId` (string)
- `buyer.electronicAddress` (string)
- `buyer.electronicAddressScheme` (string)
- `buyer.email` (string): Contact email address.
- `buyer.address` (object, required)
- `buyer.address.street` (string)
- `buyer.address.city` (string)
- `buyer.address.postalCode` (string)
- `buyer.address.country` (string)
- `totals` (object, required)
- `totals.net` (string)
- `totals.tax` (string)
- `totals.gross` (string)
- `totals.payable` (string)
- `lines` (array of object, required)
- `lines[].id` (string)
- `lines[].description` (string)
- `lines[].quantity` (string)
- `lines[].unit` (string)
- `lines[].unitPrice` (string)
- `lines[].baseQuantity` (string)
- `lines[].baseQuantityUnit` (string)
- `lines[].grossUnitPrice` (string)
- `lines[].unitPriceDiscount` (string)
- `lines[].net` (string)
- `lines[].vatRate` (string)

## Example

```sh
curl https://api.kanagu.dev/v1/einvoice/parse \
  -H "Authorization: Bearer $KANAGU_KEY" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n  <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n  <cac:AccountingSupplierParty><cac:Party>\n    <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n    <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n    </cac:PostalAddress>\n    <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n    <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n    <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n  </cac:Party></cac:AccountingSupplierParty>\n  <cac:AccountingCustomerParty><cac:Party>\n    <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n    <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n    </cac:PostalAddress>\n    \n    <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n    \n  </cac:Party></cac:AccountingCustomerParty>\n  <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n  <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n  <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n    <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n  </cac:TaxTotal>\n  <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n    <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n  </cac:LegalMonetaryTotal>\n  <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n    <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n    <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n    <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n      \n      \n    </cac:Price>\n  </cac:InvoiceLine>\n</Invoice>"}'
```

```ts
const res = await fetch("https://api.kanagu.dev/v1/einvoice/parse", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KANAGU_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n  <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n  <cac:AccountingSupplierParty><cac:Party>\n    <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n    <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n    </cac:PostalAddress>\n    <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n    <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n    <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n  </cac:Party></cac:AccountingSupplierParty>\n  <cac:AccountingCustomerParty><cac:Party>\n    <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n    <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n    </cac:PostalAddress>\n    \n    <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n    \n  </cac:Party></cac:AccountingCustomerParty>\n  <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n  <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n  <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n    <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n  </cac:TaxTotal>\n  <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n    <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n  </cac:LegalMonetaryTotal>\n  <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n    <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n    <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n    <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n      \n      \n    </cac:Price>\n  </cac:InvoiceLine>\n</Invoice>"
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
```

## Errors

JSON `{"error":{"code","message"}}`.

- 400 `invalid_input`: The body does not match the request schema. The message names each field.
- 400 `invalid_json`: The body is missing or is not valid JSON.
- 400 `invalid_idempotency_key`: Idempotency-Key must be 1–128 visible ASCII characters.
- 401 `invalid_api_key`: The Bearer key is missing, malformed, invalid or inactive.
- 402 `free_allowance_exhausted`: This month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left.
- 404 `not_found`: No operation at this path.
- 409 `idempotency_conflict`: The Idempotency-Key was already used with a different body.
- 413 `payload_too_large`: JSON bodies may be at most 64 KiB.
- 429 `trial_limit`: The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.
- 500 `internal_error`: The call failed on our side. It is not billed; retry with the same Idempotency-Key.

## JSON Schema

Request:
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "xml": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1048576,
          "description": "Invoice XML text, up to 1 MiB."
        }
      },
      "required": [
        "xml"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "base64": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5592408,
          "format": "base64",
          "contentEncoding": "base64",
          "pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
          "description": "Invoice XML or hybrid PDF, up to 4 MiB before Base64 encoding."
        }
      },
      "required": [
        "base64"
      ],
      "additionalProperties": false
    }
  ],
  "examples": [
    {
      "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n  <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n  <cac:AccountingSupplierParty><cac:Party>\n    <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n    <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n    </cac:PostalAddress>\n    <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n    <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n    <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n  </cac:Party></cac:AccountingSupplierParty>\n  <cac:AccountingCustomerParty><cac:Party>\n    <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n    <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n    </cac:PostalAddress>\n    \n    <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n    \n  </cac:Party></cac:AccountingCustomerParty>\n  <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n  <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n  <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n    <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n  </cac:TaxTotal>\n  <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n    <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n  </cac:LegalMonetaryTotal>\n  <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n    <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n    <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n    <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n      \n      \n    </cac:Price>\n  </cac:InvoiceLine>\n</Invoice>"
    }
  ],
  "type": "object"
}
```

Response:
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "format": {
      "type": "string",
      "enum": [
        "ubl",
        "cii"
      ]
    },
    "container": {
      "type": "string",
      "enum": [
        "xml",
        "pdf"
      ]
    },
    "profile": {
      "type": "string"
    },
    "reference": {
      "type": "string"
    },
    "invoiceNumber": {
      "type": "string"
    },
    "issueDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "dueDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "currency": {
      "type": "string"
    },
    "seller": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "vatId": {
          "type": "string"
        },
        "electronicAddress": {
          "type": "string"
        },
        "electronicAddressScheme": {
          "type": "string"
        },
        "email": {
          "description": "Contact email address.",
          "type": "string"
        },
        "address": {
          "type": "object",
          "properties": {
            "street": {
              "type": "string"
            },
            "city": {
              "type": "string"
            },
            "postalCode": {
              "type": "string"
            },
            "country": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "taxRegistrationId": {
          "type": "string"
        }
      },
      "required": [
        "address"
      ],
      "additionalProperties": false
    },
    "buyer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "vatId": {
          "type": "string"
        },
        "electronicAddress": {
          "type": "string"
        },
        "electronicAddressScheme": {
          "type": "string"
        },
        "email": {
          "description": "Contact email address.",
          "type": "string"
        },
        "address": {
          "type": "object",
          "properties": {
            "street": {
              "type": "string"
            },
            "city": {
              "type": "string"
            },
            "postalCode": {
              "type": "string"
            },
            "country": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "address"
      ],
      "additionalProperties": false
    },
    "totals": {
      "type": "object",
      "properties": {
        "net": {
          "type": "string"
        },
        "tax": {
          "type": "string"
        },
        "gross": {
          "type": "string"
        },
        "payable": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "unitPrice": {
            "type": "string"
          },
          "baseQuantity": {
            "type": "string"
          },
          "baseQuantityUnit": {
            "type": "string"
          },
          "grossUnitPrice": {
            "type": "string"
          },
          "unitPriceDiscount": {
            "type": "string"
          },
          "net": {
            "type": "string"
          },
          "vatRate": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "required": [
    "format",
    "container",
    "seller",
    "buyer",
    "totals",
    "lines"
  ],
  "additionalProperties": false
}
```
