Send Peppol e-invoices from JSON: validate, send and track invoices on the Peppol network.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Sandbox API key (ps_test_...) from app.peppol.sh. Optional for lookup_participant, check_peppol_id and search_docs.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Checks the Peppol ID of a company before create_company: the scheme must exist, be active, belong to the company country (or be international), and the identifier must have the right format and check digit. A VAT scheme (99xx) needs the country prefix and the VAT number, not a register number; with tax_id, it must be the VAT number in the tax ID. Pass peppol_id to check one, or registration_id (VAT or registration number) to get the suggested Peppol ID. Free, needs no API key, makes no network call. To see if an ID can receive invoices, use lookup_participant.
ISO 3166-1 alpha-2 country of the company, for example BE.
The tax ID (VAT number) of the company, for example DE240712418. With peppol_id, a VAT-scheme Peppol ID must be this VAT number.
The Peppol ID to check, as scheme:id, for example 0208:0123456749.
A VAT or registration number to derive the Peppol ID from, for example BE0123456749. With peppol_id, the registration number of the company, to name a register number in a VAT scheme.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add --transport http peppol-sh https://sandbox.peppol.sh/mcp
Headers
Authorization (optional, not in the config above): Sandbox API key (ps_test_...) from app.peppol.sh. Optional for lookup_participant, check_peppol_id and search_docs.Checks the Peppol ID of a company before create_company: the scheme must exist, be active, belong to the company country (or be international), and the identifier must have the right format and check digit. A VAT scheme (99xx) needs the country prefix and the VAT number, not a register number; with tax_id, it must be the VAT number in the tax ID. Pass peppol_id to check one, or registration_id (VAT or registration number) to get the suggested Peppol ID. Free, needs no API key, makes no network call. To see if an ID can receive invoices, use lookup_participant.
| Argument | Type | Description |
|---|---|---|
| tax_id | string | The tax ID (VAT number) of the company, for example DE240712418. With peppol_id, a VAT-scheme Peppol ID must be this VAT number. |
| country* | string | ISO 3166-1 alpha-2 country of the company, for example BE. |
| peppol_id | string | The Peppol ID to check, as scheme:id, for example 0208:0123456749. |
| registration_id | string | A VAT or registration number to derive the Peppol ID from, for example BE0123456749. With peppol_id, the registration number of the company, to name a register number in a VAT scheme. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"country"
],
"properties": {
"tax_id": {
"type": "string",
"maxLength": 100,
"description": "The tax ID (VAT number) of the company, for example DE240712418. With peppol_id, a VAT-scheme Peppol ID must be this VAT number."
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2,
"description": "ISO 3166-1 alpha-2 country of the company, for example BE."
},
"peppol_id": {
"type": "string",
"maxLength": 100,
"description": "The Peppol ID to check, as scheme:id, for example 0208:0123456749."
},
"registration_id": {
"type": "string",
"maxLength": 100,
"description": "A VAT or registration number to derive the Peppol ID from, for example BE0123456749. With peppol_id, the registration number of the company, to name a register number in a VAT scheme."
}
}
}Creates a company (the legal entity that sends invoices) in the workspace of the API key and returns its com_ ID. Run check_peppol_id first: the Peppol ID must fit the country, or the call fails. WARNING: when the KYC of the workspace is approved, the new company goes live on the real Peppol network at once, also with a ps_test_ key. Not idempotent: each call makes a new company. Free.
| Argument | Type | Description |
|---|---|---|
| iban | string | Bank account IBAN of the company. Optional. A document of this company with a `payment_means` that has no `iban` and no `accounts` gets this IBAN in `payment_means.iban` when, with spaces and dashes removed, it is a valid IBAN (15 to 34 characters, two letters, and the IBAN check digits). The compact value is stored. |
| name* | string | Legal company name. |
| string | Contact email for the company. Optional. | |
| tax_id | string | VAT number (e.g., `BE0123456749`). Optional. A Peppol ID in the VAT scheme of the country must be this VAT number. |
| address | object | Company address. Optional. |
| country* | string | ISO 3166-1 alpha-2 country code. Must be a country with active Peppol support (e.g. `BE`); trimmed and upper-cased server-side. Unknown or non-active codes are rejected with `invalid_country`. |
| peppol_id |
Call this first. Returns where the user is: mode (sandbox or live), workspace, credit balance, companies and whether each is live on Peppol, usage of the last 30 days, KYC status, and the next step. Never returns API key values.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}Returns one company of the workspace: its Peppol ID, tax and registration IDs, address, and whether it is live on the Peppol network. Get the com_ ID from list_companies or get_account_overview.
| Argument | Type | Description |
|---|---|---|
| company_id* | string | The company ID, for example com_9fJ2kQ7bTx0Lm4Ne1Ry8. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"company_id"
],
"properties": {
"company_id": {
"type": "string",
"pattern": "^com_[A-Za-z0-9_-]+$",
"description": "The company ID, for example com_9fJ2kQ7bTx0Lm4Ne1Ry8."
}
}
}Returns one sent document: its status, parties, totals and status events. For a failed document, failure has a stable code and the fix. Poll it after send_document until the status is delivered or failed (a sandbox send takes a few seconds). company_id is optional. Set response_format to detailed for the lines.
| Argument | Type | Description |
|---|---|---|
| company_id | string | The company of the document. Found when left out. |
| document_id* | string | The document ID, for example doc_8sK2mQ9xTb4Lw7Ne1Ry3. |
| response_format | string | concise (default) for the key fields; detailed for all fields. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"document_id"
],
"properties": {
"company_id": {
"type": "string",
"pattern": "^com_[A-Za-z0-9_-]+$",
"description": "The company of the document. Found when left out."
},
"document_id": {
"type": "string",
"pattern": "^doc_[A-Za-z0-9_-]+$",
"description": "The document ID, for example doc_8sK2mQ9xTb4Lw7Ne1Ry3."
},
"response_format": {
"enum": [
"concise",
"detailed"
],
"type": "string",
"default": "concise",
"description": "concise (default) for the key fields; detailed for all fields."
}
}
}Gives a link to the UBL XML of a sent document (the Peppol BIS 3.0 file), as the resource peppol://documents/{id}/ubl; read the resource for the XML. The UBL exists once the status is sending or delivered. It does not put the XML in the result, to save tokens.
| Argument | Type | Description |
|---|---|---|
| document_id* | string | The document ID, for example doc_8sK2mQ9xTb4Lw7Ne1Ry3. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"document_id"
],
"properties": {
"document_id": {
"type": "string",
"pattern": "^doc_[A-Za-z0-9_-]+$",
"description": "The document ID, for example doc_8sK2mQ9xTb4Lw7Ne1Ry3."
}
}
}Lists the companies of the workspace of the API key (newest first), with their com_ IDs and whether each is live on Peppol. A key scoped to one company sees only that company. Use get_company for the Peppol ID and address of one company.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}Lists the documents (invoices and credit notes) that a company sent, newest first, with their status (queued, sending, delivered, failed). Filter by status. Concise by default; set response_format to detailed for parties and dates. Pages: pass next_cursor as cursor. company_id is optional when the key has one company. Use get_document for the events and the failure reason of one document.
| Argument | Type | Description |
|---|---|---|
| limit | integer | |
| cursor | string | next_cursor of the previous page. |
| status | string | |
| company_id | string | The company ID, for example com_9fJ2kQ7bTx0Lm4Ne1Ry8. |
| response_format | string | concise (default) for the key fields; detailed for all fields. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string",
"maxLength": 500,
"description": "next_cursor of the previous page."
},
"status": {
"enum": [
"queued",
"sending",
"delivered",
"failed"
],
"type": "string"
},
"company_id": {
"type": "string",
"pattern": "^com_[A-Za-z0-9_-]+$",
"description": "The company ID, for example com_9fJ2kQ7bTx0Lm4Ne1Ry8."
},
"response_format": {
"enum": [
"concise",
"detailed"
],
"type": "string",
"default": "concise",
"description": "concise (default) for the key fields; detailed for all fields."
}
}
}Lists the status events of the documents of the workspace, newest first (the same events as the webhooks). To wait for a send, poll it with document_id and type delivered or failed, or poll get_document. Filter by company_id, document_id, type and since (an RFC 3339 time). Pages: pass next_cursor as cursor. Set response_format to detailed for the company, the receiver and the message.
| Argument | Type | Description |
|---|---|---|
| type | string | The status the document moved to. |
| limit | integer | |
| since | string | Only events at or after this time, for example 2026-10-22T09:00:00Z. |
| cursor | string | next_cursor of the previous page. |
| company_id | string | |
| document_id | string | |
| response_format | string | concise (default) or detailed. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"type": {
"enum": [
"queued",
"sending",
"delivered",
"failed",
"retry"
],
"type": "string",
"description": "The status the document moved to."
},
"limit": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"since": {
"type": "string",
"maxLength": 40,
"description": "Only events at or after this time, for example 2026-10-22T09:00:00Z."
},
"cursor": {
"type": "string",
"maxLength": 500,
"description": "next_cursor of the previous page."
},
"company_id": {
"type": "string",
"pattern": "^com_[A-Za-z0-9_-]+$"
},
"document_id": {
"type": "string",
"pattern": "^doc_[A-Za-z0-9_-]+$"
},
"response_format": {
"enum": [
"concise",
"detailed"
],
"type": "string",
"default": "concise",
"description": "concise (default) or detailed."
}
}
}Checks if a Peppol ID is registered on the Peppol network, so it can receive invoices, and which document types it accepts (from its SMP). Use it before you send to a new buyer. Set dns_only to check only the SML/DNS registration (faster, no document types). Free, needs no API key; without a key the limit is 60 lookups an hour for each IP address.
| Argument | Type | Description |
|---|---|---|
| domain | string | sml is the production Peppol network, smk the test network. |
| dns_only | boolean | Check only the DNS registration, not the document types. |
| peppol_id* | string | The participant as scheme:id, for example 0208:0123456749. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"peppol_id"
],
"properties": {
"domain": {
"enum": [
"sml",
"smk"
],
"type": "string",
"default": "sml",
"description": "sml is the production Peppol network, smk the test network."
},
"dns_only": {
"type": "boolean",
"default": false,
"description": "Check only the DNS registration, not the document types."
},
"peppol_id": {
"type": "string",
"maxLength": 100,
"minLength": 3,
"description": "The participant as scheme:id, for example 0208:0123456749."
}
}
}Searches the peppol.sh docs, the API reference (openapi.yaml) and the TypeScript and PHP SDK guides, and returns the best sections. Use it for "how do I ..." questions: fields of a document, webhooks, errors, SDK setup. Free, needs no API key, makes no network call. The full texts are the resources peppol://docs/llms-full and peppol://docs/openapi.
| Argument | Type | Description |
|---|---|---|
| query* | string | Words or a question, for example: verify webhook signature. |
| max_results | integer |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"maxLength": 300,
"minLength": 2,
"description": "Words or a question, for example: verify webhook signature."
},
"max_results": {
"type": "integer",
"default": 5,
"maximum": 10,
"minimum": 1
}
}
}Sends an invoice or a credit note over Peppol from JSON (POST /v1/documents). Call validate_document first. idempotency_key is required: a retry with the same key does not send twice. With a ps_test_ key (sandbox) it sends at once and costs no credit. With a ps_live_ key it sends a real document and uses 1 credit, in two calls: the first call returns a preview and a confirmation_handle and sends nothing; show the preview to the user, and only after the user approves, call again with the same arguments plus confirm: true and the confirmation_handle (valid 10 minutes). Live sends work only when the workspace setting "Allow live sends from MCP" is on. The tool is marked destructive for Live; the mark cannot change with the key, so a host can ask the user to approve a sandbox send too.
| Argument | Type | Description |
|---|---|---|
| to* | any | |
| from* | object | A sender or recipient party on a document. A party needs a `tax_id`, a `peppol_id`, or both. |
| note | string | Optional note to include on the document |
| type | string | |
| lines* | array | |
| vatex | string | VAT exemption reason code (BT-121) from the VATEX code list, e.g. `VATEX-EU-132`. Applies at document level only. |
Checks an invoice or credit note against the Peppol rules (Peppol BIS 3.0, EN 16931) before send_document. Pass document (the same JSON as send_document) or ubl_xml (UBL XML as text), and the company_id of the sender. Sends nothing, uses no credit. Each error has the rule ID (for example BR-S-02) or the field path, and a fix. Run it before every send. If it fails with provider_error, the validation service is down: try again later.
| Argument | Type | Description |
|---|---|---|
| ubl_xml | string | A UBL Invoice or CreditNote as XML text, at most 5 MB. |
| document | object | The document as JSON, the same fields as send_document. |
| company_id* | string | The company that will send the document. Get it from list_companies. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"company_id"
],
"properties": {
"ubl_xml": {
"type": "string",
"maxLength": 5242880,
"minLength": 1,
"description": "A UBL Invoice or CreditNote as XML text, at most 5 MB."
},
"document": {
"type": "object",
"required": [
"number",
"issue_date",
"from",
"to",
"lines"
],
"properties": {
"to": {
"allOf": [
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Contact email (BT-43 for `from`, BT-58 for `to`),\n`cac:Contact/cbc:ElectronicMail`. On `from`: when absent, the\n`invoice_contact.email` of the company fills it. Required on\n`from` when seller and buyer are both in Germany (DE-R-007):\nif it is still absent then, the document is rejected with\n`de_domestic_fields_missing` (422).\n"
},
"phone": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Contact phone (BT-42 for `from`, BT-57 for `to`),\n`cac:Contact/cbc:Telephone`. Needs no `email`. It is trimmed and\nmust then have 1 to 100 characters, else the document is rejected\nwith `invalid_document_body` (400). The format is not checked.\nOn `from`: Required by Peppol when seller and buyer are both in\nGermany (DE-R-006), together with `contact_name` and `email`.\nWhen absent on `from`, the `invoice_contact.phone` of the company\nfills it. If one of the three is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
},
"tax_id": {
"type": "string",
"description": "Tax ID. Required when `peppol_id` is absent, and then it must not\nbe empty or only whitespace; else the document is rejected with\n`invalid_document_body` (400). Can be in Peppol format (`0208:0123456749`)\nor plain (`BE0123456749`) — we resolve the scheme. A Swedish VAT\nnumber (`SE556905539401`) resolves to the 10-digit organisation\nnumber (`0007:5569055394`). When `peppol_id` is absent, the\nresolved Peppol ID must have the format and check digit of its\nscheme, else the document is rejected with `invalid_peppol_id`\n(422). For `from`, this check does not apply to a VAT number. A French VAT number (`FR12345678901`)\ndoes not resolve to a Peppol ID: it is sent as the VAT number.\nA `tax_id` with a country prefix (`BE…`, `NL…B01`, `ATU…`) is sent\nas the VAT number. A `tax_id` with no country prefix (for example\nthe Norwegian org number `995313863`) is not a VAT number: it is\nnot sent as one, and the party then needs a `peppol_id`. For a\nDanish seller (`from.tax_id` `DK` + 8 digits), the CVR in the VAT\nnumber is also sent as the legal registration ID (BT-30, scheme\n`0184`). For\n`from`, the Peppol ID of the company is used when `peppol_id` is\nabsent. If no Peppol ID can be found, the send fails with\n`sender_not_derivable`. For `from`, a VAT number or a `scheme:id`\nmust give the Peppol ID of the company or be the company's own\n`tax_id`, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"street": {
"type": "string"
},
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code (e.g. `BE`). It is the postal\ncountry of the party in the document (BT-40 for `from`, BT-55 for\n`to`), sent in upper case. When it is left out or is no two-letter\ncode, the country is the prefix of the VAT number in `tax_id`\n(the Greek `EL` gives `GR`), else the country of the `peppol_id`\nscheme (e.g. `0208` gives `BE`, `0192` gives `NO`; a `scheme:id`\nin `tax_id` counts too). A scheme that is not of one country (`0088` GLN, `0060`\nDUNS) gives none. For `from` with no `peppol_id`, the Peppol ID\nof the company counts. When no country follows for `from` or\n`to`, the document is rejected with `party_country_required`\n(422): with a `ps_test_` key now, with a `ps_live_` key after a\nwarning period. Until then a `ps_live_` key sends the document\nwith the country `BE`.\n"
},
"postal_code": {
"type": "string"
}
},
"description": "A postal address.",
"additionalProperties": {}
},
"peppol_id": {
"type": "string",
"pattern": "^\\d{4}:\\S+$",
"description": "Explicit Peppol participant ID (overrides tax_id lookup).\nFormat: `scheme:id` — a 4-digit scheme, a colon, then a non-empty\nid (e.g., `0208:0785666049`). Validated at ingest: a malformed id\nis rejected synchronously with `invalid_peppol_id` (422) instead of\nfailing later at the provider. Scheme `0208` (BE enterprise number)\nmust be a 10-digit CBE number with a valid mod-97 checksum; a\nleading `BE` is normalized away. For `from`, it must be the\nPeppol ID of the company, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"contact_name": {
"type": "string",
"description": "Contact name (BT-41 for `from`, BT-56 for `to`),\n`cac:Contact/cbc:Name`. Needs an `email` on the same party, else\nthe document is rejected with `invalid_document_body` (400). On\n`from` that check runs after the Invoice contact is filled in, so\nan email the document leaves out can come from\n`invoice_contact.email`. When `contact_name` is absent, the\n`invoice_contact.name` of the company fills it, if the party then\nhas an email. Required on `from` when seller and buyer are both\nin Germany (DE-R-005): if it is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
}
},
"description": "A sender or recipient party on a document. A party needs a `tax_id`,\na `peppol_id`, or both.\n",
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Buyer identifier (BT-46), `cac:PartyIdentification/cbc:ID` with\nno `schemeID`: the number of the buyer in your system. Only on\n`to`: `from.identifier` is rejected with\n`invalid_document_body` (400).\n"
}
},
"additionalProperties": {}
}
]
},
"from": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Contact email (BT-43 for `from`, BT-58 for `to`),\n`cac:Contact/cbc:ElectronicMail`. On `from`: when absent, the\n`invoice_contact.email` of the company fills it. Required on\n`from` when seller and buyer are both in Germany (DE-R-007):\nif it is still absent then, the document is rejected with\n`de_domestic_fields_missing` (422).\n"
},
"phone": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Contact phone (BT-42 for `from`, BT-57 for `to`),\n`cac:Contact/cbc:Telephone`. Needs no `email`. It is trimmed and\nmust then have 1 to 100 characters, else the document is rejected\nwith `invalid_document_body` (400). The format is not checked.\nOn `from`: Required by Peppol when seller and buyer are both in\nGermany (DE-R-006), together with `contact_name` and `email`.\nWhen absent on `from`, the `invoice_contact.phone` of the company\nfills it. If one of the three is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
},
"tax_id": {
"type": "string",
"description": "Tax ID. Required when `peppol_id` is absent, and then it must not\nbe empty or only whitespace; else the document is rejected with\n`invalid_document_body` (400). Can be in Peppol format (`0208:0123456749`)\nor plain (`BE0123456749`) — we resolve the scheme. A Swedish VAT\nnumber (`SE556905539401`) resolves to the 10-digit organisation\nnumber (`0007:5569055394`). When `peppol_id` is absent, the\nresolved Peppol ID must have the format and check digit of its\nscheme, else the document is rejected with `invalid_peppol_id`\n(422). For `from`, this check does not apply to a VAT number. A French VAT number (`FR12345678901`)\ndoes not resolve to a Peppol ID: it is sent as the VAT number.\nA `tax_id` with a country prefix (`BE…`, `NL…B01`, `ATU…`) is sent\nas the VAT number. A `tax_id` with no country prefix (for example\nthe Norwegian org number `995313863`) is not a VAT number: it is\nnot sent as one, and the party then needs a `peppol_id`. For a\nDanish seller (`from.tax_id` `DK` + 8 digits), the CVR in the VAT\nnumber is also sent as the legal registration ID (BT-30, scheme\n`0184`). For\n`from`, the Peppol ID of the company is used when `peppol_id` is\nabsent. If no Peppol ID can be found, the send fails with\n`sender_not_derivable`. For `from`, a VAT number or a `scheme:id`\nmust give the Peppol ID of the company or be the company's own\n`tax_id`, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"street": {
"type": "string"
},
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code (e.g. `BE`). It is the postal\ncountry of the party in the document (BT-40 for `from`, BT-55 for\n`to`), sent in upper case. When it is left out or is no two-letter\ncode, the country is the prefix of the VAT number in `tax_id`\n(the Greek `EL` gives `GR`), else the country of the `peppol_id`\nscheme (e.g. `0208` gives `BE`, `0192` gives `NO`; a `scheme:id`\nin `tax_id` counts too). A scheme that is not of one country (`0088` GLN, `0060`\nDUNS) gives none. For `from` with no `peppol_id`, the Peppol ID\nof the company counts. When no country follows for `from` or\n`to`, the document is rejected with `party_country_required`\n(422): with a `ps_test_` key now, with a `ps_live_` key after a\nwarning period. Until then a `ps_live_` key sends the document\nwith the country `BE`.\n"
},
"postal_code": {
"type": "string"
}
},
"description": "A postal address.",
"additionalProperties": {}
},
"peppol_id": {
"type": "string",
"pattern": "^\\d{4}:\\S+$",
"description": "Explicit Peppol participant ID (overrides tax_id lookup).\nFormat: `scheme:id` — a 4-digit scheme, a colon, then a non-empty\nid (e.g., `0208:0785666049`). Validated at ingest: a malformed id\nis rejected synchronously with `invalid_peppol_id` (422) instead of\nfailing later at the provider. Scheme `0208` (BE enterprise number)\nmust be a 10-digit CBE number with a valid mod-97 checksum; a\nleading `BE` is normalized away. For `from`, it must be the\nPeppol ID of the company, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"contact_name": {
"type": "string",
"description": "Contact name (BT-41 for `from`, BT-56 for `to`),\n`cac:Contact/cbc:Name`. Needs an `email` on the same party, else\nthe document is rejected with `invalid_document_body` (400). On\n`from` that check runs after the Invoice contact is filled in, so\nan email the document leaves out can come from\n`invoice_contact.email`. When `contact_name` is absent, the\n`invoice_contact.name` of the company fills it, if the party then\nhas an email. Required on `from` when seller and buyer are both\nin Germany (DE-R-005): if it is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
}
},
"description": "A sender or recipient party on a document. A party needs a `tax_id`,\na `peppol_id`, or both.\n",
"additionalProperties": {}
},
"note": {
"type": "string",
"description": "Optional note to include on the document"
},
"type": {
"enum": [
"invoice",
"credit_note"
],
"type": "string"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"description",
"quantity",
"unit_price",
"tax_rate"
],
"properties": {
"unit": {
"type": "string",
"default": "C62",
"description": "UN/CEFACT unit code (C62 = unit/piece)"
},
"charges": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Line-level charges (BG-28) — additions to the line net."
},
"discount": {
"type": "number",
"deprecated": true
},
"quantity": {
"type": "number"
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g., 21.00)"
},
"allowances": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Line-level allowances (BG-27) — deductions from the line net."
},
"unit_price": {
"type": "number",
"description": "Price per unit (excl. tax)"
},
"description": {
"type": "string"
}
},
"description": "A single invoice or credit-note line.",
"additionalProperties": {}
},
"minItems": 1
},
"vatex": {
"type": "string",
"description": "VAT exemption reason code (BT-121) from the VATEX code list, e.g.\n`VATEX-EU-132`. Applies at document level only.\n"
},
"number": {
"type": "string",
"description": "Your document number (e.g., \"INV-2026-001\")"
},
"charges": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Document-level charges (BG-21) — additions applied before tax."
},
"currency": {
"enum": [
"EUR",
"USD",
"GBP",
"JPY",
"CHF",
"CAD",
"AUD",
"NZD",
"CNY",
"INR",
"SEK",
"NOK",
"DKK",
"SGD",
"HKD"
],
"type": "string"
},
"due_date": {
"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])))$"
},
"tax_code": {
"type": "string",
"description": "Document VAT category code (BT-118), e.g. `S` (standard), `Z` (zero),\n`E` (exempt), `AE` (reverse charge). Defaults to `S`, or `Z` when\nevery line is zero-rated.\n"
},
"allowances": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Document-level allowances (BG-20) — deductions applied before tax."
},
"amount_due": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01,
"description": "Amount due for payment (BT-115), in the document currency. Use it\nfor a document that is paid, fully or in part, before you send it:\n`0` for a fully prepaid document. Allowed on both `invoice` and\n`credit_note`.\n\nThe value must be from `0` up to the document total with VAT\n(BT-112) plus `rounding_amount`, with at most two decimals. A value\nabove that is refused with a 422 `amount_due_exceeds_total`. The\nprepaid amount (BT-113, `cbc:PrepaidAmount`) is not an input: it is\nthe total with VAT plus `rounding_amount` less `amount_due`.\n\nIf you omit the field, the amount due is the total with VAT plus\n`rounding_amount`, and the document has no prepaid amount.\n"
},
"issue_date": {
"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])))$"
},
"vatex_note": {
"type": "string",
"description": "VAT exemption reason text (BT-120). Applies at document level only."
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"required": [
"filename",
"content"
],
"properties": {
"content": {
"type": "string",
"description": "Base64-encoded file content"
},
"filename": {
"type": "string"
},
"mime_type": {
"type": "string",
"default": "application/pdf"
}
},
"description": "A file to embed with the document, as base64 content.",
"additionalProperties": {}
}
},
"sales_order": {
"type": "string",
"description": "Sales order reference (BT-14), `cac:OrderReference/cbc:SalesOrderID`:\nthe seller's own order number. Without `purchase_order`, the\n`cbc:ID` of the order reference is `NA`.\n"
},
"payment_means": {
"type": "object",
"properties": {
"bic": {
"type": "string"
},
"iban": {
"type": "string",
"description": "The IBAN to pay to (BT-84), the older form of one `iban` account.\nWhen neither `iban` nor `accounts` is sent, the IBAN of the company\nfills it (see above).\n"
},
"method": {
"enum": [
"bank_transfer",
"card",
"direct_debit",
"other"
],
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"number"
],
"properties": {
"bic": {
"type": "string",
"description": "BIC (BT-86). Only for `iban` and `other`."
},
"type": {
"enum": [
"iban",
"bankgiro",
"plusgiro",
"other"
],
"type": "string"
},
"number": {
"type": "string",
"description": "Payment account identifier (BT-84). Spaces and `-` are removed.\n`bankgiro`: 7 or 8 digits. `plusgiro`: 2 to 8 digits. `iban`: 15 to\n34 characters that start with 2 letters.\n"
}
},
"description": "One account a document can be paid to.",
"additionalProperties": {}
},
"maxItems": 10,
"minItems": 1,
"description": "The accounts the buyer can pay to, with the same method and reference."
},
"reference": {
"type": "string",
"description": "Payment reference / structured communication"
}
},
"description": "How the document should be paid: one method, one reference, and one or\nmore accounts. Use `accounts` for a bankgiro or plusgiro number or for\nmore than one account. `iban` and `bic` are the older form of one\n`iban` account: they give a 400 together with `accounts`.\n\nAn account number is required (BR-61, Payment account identifier\nBT-84): `iban` or `accounts`, for every `method`. When both are\nabsent and `from` is the company of `company_id`, the `iban` of the\ncompany fills `iban` when, with spaces and dashes removed, it is a\nvalid IBAN (15 to 34 characters, two letters, and the IBAN check\ndigits). The compact value is stored. A `bic`, `method` and\n`reference` you send are kept, so `GET /v1/documents/{id}` and the\nUBL show it. With no account number after that, the document is\nrejected with `payment_account_required` (422, `param`\n`payment_means`) before any charge. A document without\n`payment_means` is not checked.\n\nRequired by Peppol when seller and buyer are both in Germany\n(DE-R-001): without `payment_means` the document is rejected with\n`de_domestic_fields_missing` (422).\n",
"additionalProperties": {}
},
"invoice_period": {
"type": "object",
"properties": {
"end_date": {
"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])))$"
},
"start_date": {
"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])))$"
}
},
"description": "Invoicing period (BG-14) — the service or billing date range.",
"additionalProperties": {}
},
"purchase_order": {
"type": "string",
"description": "Purchase order reference (BT-13), `cac:OrderReference/cbc:ID`: the\nnumber of the buyer's purchase order.\n"
},
"buyer_reference": {
"type": "string",
"description": "Buyer reference (BT-10), `cbc:BuyerReference`: the reference the\nbuyer asks for, for example a cost centre or a Leitweg-ID. It is\nnot copied to `cac:OrderReference/cbc:ID` (BT-13): send a purchase\norder in `purchase_order`.\n\nWithout `buyer_reference`, a document gets `purchase_order`,\nelse `to.identifier`, else `Unknown` as BT-10.\n\nRequired in two cases. When seller and buyer are both in Germany\n(DE-R-015): without it the document is rejected with\n`de_domestic_fields_missing` (422). When the receiver is a German\npublic body (a `0204` Peppol ID): it holds the Leitweg-ID, and\nwithout it the document is rejected with\n`buyer_reference_required` (422).\n"
},
"idempotency_key": {
"type": "string",
"description": "Unique key to prevent duplicate sends.\nIf provided, a second request with the same key\nreturns the original result. On `POST /v1/documents` you can\nsend the same key in the `Idempotency-Key` header instead.\n"
},
"rounding_amount": {
"type": "number",
"description": "Rounding amount (BT-114, `cbc:PayableRoundingAmount`), in the\ndocument currency: the signed amount that rounds the amount due,\nfor example to whole kronor. Allowed on both `invoice` and\n`credit_note`, for any seller country and currency.\n\nThe amount due (BT-115) is the total with VAT (BT-112) less the\nprepaid amount (BT-113) plus `rounding_amount`. `total` does not\ninclude it. With an `amount_due`, send the rounded amount: an\n`amount_due` equal to the total, with a rounding that is not `0`,\nis refused with a 422 `amount_due_excludes_rounding` when the\nrounding is positive, and with a 422 `amount_due_exceeds_total`\nwhen it is negative.\n\nThe value has at most two decimals and must be below `1.00` either\nway. A value of `1.00` or more, or one that takes the total below\n`0`, is refused with a 422 `rounding_amount_out_of_range`. With `0`\nthe document has no rounding amount in the UBL.\n"
},
"preceding_invoice": {
"type": "object",
"required": [
"number"
],
"properties": {
"number": {
"type": "string",
"minLength": 1,
"description": "Number of the preceding invoice (BT-25). Leading and trailing\nwhitespace is removed; the result must not be empty.\n"
},
"issue_date": {
"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])))$",
"description": "Issue date of the preceding invoice (BT-26), `YYYY-MM-DD`."
}
},
"description": "Preceding invoice reference — the earlier invoice this document\ncorrects, for example the invoice a credit note credits. Allowed on\nboth `invoice` and `credit_note`; one reference per document.\n\nThe value is an opaque reference that you supply. It is not looked up\nor checked against an earlier peppol.sh document. It is emitted as\n`cac:BillingReference/cac:InvoiceDocumentReference`.\n",
"additionalProperties": {}
}
},
"description": "The document as JSON, the same fields as send_document.",
"additionalProperties": {}
},
"company_id": {
"type": "string",
"pattern": "^com_[A-Za-z0-9_-]+$",
"description": "The company that will send the document. Get it from list_companies."
}
}
}We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Dec 3, 2026.
| string |
| Peppol participant identifier in `scheme:id` form (e.g. `0208:0123456749`). Required, except for a Belgian company with a `company_registration_id`: it defaults to `0208:<company_registration_id>` without dots and spaces. Without one the request fails with `missing_peppol_id`. The scheme must be active in the OpenPeppol participant identifier scheme code list and the identifier must have its format and check digit (`invalid_peppol_id`). The identifier has 1 to 130 characters: letters, digits, `-`, `.`, `_` and `~`, no whitespace; a `0208` identifier is 10 digits (`0208:0410086603`, not `0208:0410.086.603`) and a `9925` identifier is `BE` plus those digits. The scheme must belong to `country` or be international (`peppol_id_country_mismatch`). An EU VAT scheme (`99xx`) takes the VAT number with its country prefix (`9930:DE123456788`; Greece `9933` without `EL`), and it must be the VAT number in `tax_id` when `tax_id` is one (`peppol_id_tax_id_mismatch`). |
| invoice_contact | object | The Invoice contact of the company: the default for the seller contact of a document. When a document is accepted, each of `from.contact_name`, `from.email` and `from.phone` that it leaves out gets the value here; a value of the document wins, per field. The result is stored with the document, so a later change here leaves documents already accepted as they are. Peppol requires the three fields when seller and buyer are both in Germany (DE-R-005, DE-R-006, DE-R-007). Optional. On `PATCH`, a field that is absent stays as it is, `null` for a field clears it, and `null` for the object clears the three fields. A refused value fails with `invalid_field` (400) and the field in `param` (`invoice_contact.phone`). It is separate from the company `email`, which is never put on a document. |
| company_registration_id | string | Company registration number (e.g. KBO/CBE number). Optional. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"name",
"country"
],
"properties": {
"iban": {
"type": "string",
"description": "Bank account IBAN of the company. Optional. A document\nof this company with a `payment_means` that has no `iban` and no\n`accounts` gets this IBAN in `payment_means.iban` when, with\nspaces and dashes removed, it is a valid IBAN (15 to 34\ncharacters, two letters, and the IBAN check digits). The compact\nvalue is stored.\n"
},
"name": {
"type": "string",
"description": "Legal company name."
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Contact email for the company. Optional."
},
"tax_id": {
"type": "string",
"description": "VAT number (e.g., `BE0123456749`). Optional. A Peppol ID in the VAT\nscheme of the country must be this VAT number.\n"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"street": {
"type": "string"
},
"postal_code": {
"type": "string"
}
},
"description": "Company address. Optional.",
"additionalProperties": {}
},
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code. Must be a country with active\nPeppol support (e.g. `BE`); trimmed and upper-cased server-side.\nUnknown or non-active codes are rejected with `invalid_country`.\n"
},
"peppol_id": {
"type": "string",
"description": "Peppol participant identifier in `scheme:id` form (e.g.\n`0208:0123456749`). Required, except for a Belgian company with a\n`company_registration_id`: it defaults to\n`0208:<company_registration_id>` without dots and spaces. Without\none the request fails with `missing_peppol_id`. The scheme must be\nactive in the OpenPeppol participant identifier scheme code list\nand the identifier must have its format and check digit\n(`invalid_peppol_id`). The identifier has 1 to 130 characters:\nletters, digits, `-`, `.`, `_` and `~`, no whitespace; a `0208`\nidentifier is 10 digits (`0208:0410086603`, not\n`0208:0410.086.603`) and a `9925` identifier is `BE` plus those\ndigits. The scheme must belong to `country` or be\ninternational (`peppol_id_country_mismatch`). An EU VAT scheme\n(`99xx`) takes the VAT number with its country prefix\n(`9930:DE123456788`; Greece `9933` without `EL`), and it must be\nthe VAT number in `tax_id` when `tax_id` is one\n(`peppol_id_tax_id_mismatch`).\n"
},
"invoice_contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Default for `from.contact_name` (BT-41). It is trimmed and must\nthen have 1 to 200 characters. A contact name needs an email on\nthe same party, so it is filled in only when the document or the\nInvoice contact has an email.\n"
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 254,
"description": "Default for `from.email` (BT-43). A valid email address."
},
"phone": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Default for `from.phone` (BT-42). It is trimmed and must then have\n1 to 100 characters. The format is not checked.\n"
}
},
"description": "The Invoice contact of the company: the default for the seller\ncontact of a document. When a document is accepted, each of\n`from.contact_name`, `from.email` and `from.phone` that it leaves out\ngets the value here; a value of the document wins, per field. The\nresult is stored with the document, so a later change here leaves\ndocuments already accepted as they are. Peppol requires the three\nfields when seller and buyer are both in Germany (DE-R-005, DE-R-006,\nDE-R-007).\n\nOptional. On `PATCH`, a field that is absent stays as it is, `null`\nfor a field clears it, and `null` for the object clears the three\nfields. A refused value fails with `invalid_field` (400) and the\nfield in `param` (`invoice_contact.phone`).\n\nIt is separate from the company `email`, which is never put on a\ndocument.\n",
"additionalProperties": {}
},
"company_registration_id": {
"type": "string",
"description": "Company registration number (e.g. KBO/CBE number). Optional."
}
},
"description": "Request body for creating a company.",
"additionalProperties": {}
}| number* |
| string |
| Your document number (e.g., "INV-2026-001") |
| charges | array | Document-level charges (BG-21) — additions applied before tax. |
| confirm | boolean | Live only. Leave out on the first call: it returns a preview and a confirmation_handle, and sends nothing. Set to true on the second call, after the user approved the preview. |
| currency | string |
| due_date | string |
| tax_code | string | Document VAT category code (BT-118), e.g. `S` (standard), `Z` (zero), `E` (exempt), `AE` (reverse charge). Defaults to `S`, or `Z` when every line is zero-rated. |
| allowances | array | Document-level allowances (BG-20) — deductions applied before tax. |
| amount_due | number | Amount due for payment (BT-115), in the document currency. Use it for a document that is paid, fully or in part, before you send it: `0` for a fully prepaid document. Allowed on both `invoice` and `credit_note`. The value must be from `0` up to the document total with VAT (BT-112) plus `rounding_amount`, with at most two decimals. A value above that is refused with a 422 `amount_due_exceeds_total`. The prepaid amount (BT-113, `cbc:PrepaidAmount`) is not an input: it is the total with VAT plus `rounding_amount` less `amount_due`. If you omit the field, the amount due is the total with VAT plus `rounding_amount`, and the document has no prepaid amount. |
| company_id* | string | The company that sends, for example com_9fJ2kQ7bTx0Lm4Ne1Ry8. |
| issue_date* | string |
| vatex_note | string | VAT exemption reason text (BT-120). Applies at document level only. |
| attachments | array |
| sales_order | string | Sales order reference (BT-14), `cac:OrderReference/cbc:SalesOrderID`: the seller's own order number. Without `purchase_order`, the `cbc:ID` of the order reference is `NA`. |
| payment_means | object | How the document should be paid: one method, one reference, and one or more accounts. Use `accounts` for a bankgiro or plusgiro number or for more than one account. `iban` and `bic` are the older form of one `iban` account: they give a 400 together with `accounts`. An account number is required (BR-61, Payment account identifier BT-84): `iban` or `accounts`, for every `method`. When both are absent and `from` is the company of `company_id`, the `iban` of the company fills `iban` when, with spaces and dashes removed, it is a valid IBAN (15 to 34 characters, two letters, and the IBAN check digits). The compact value is stored. A `bic`, `method` and `reference` you send are kept, so `GET /v1/documents/{id}` and the UBL show it. With no account number after that, the document is rejected with `payment_account_required` (422, `param` `payment_means`) before any charge. A document without `payment_means` is not checked. Required by Peppol when seller and buyer are both in Germany (DE-R-001): without `payment_means` the document is rejected with `de_domestic_fields_missing` (422). |
| invoice_period | object | Invoicing period (BG-14) — the service or billing date range. |
| purchase_order | string | Purchase order reference (BT-13), `cac:OrderReference/cbc:ID`: the number of the buyer's purchase order. |
| buyer_reference | string | Buyer reference (BT-10), `cbc:BuyerReference`: the reference the buyer asks for, for example a cost centre or a Leitweg-ID. It is not copied to `cac:OrderReference/cbc:ID` (BT-13): send a purchase order in `purchase_order`. Without `buyer_reference`, a document gets `purchase_order`, else `to.identifier`, else `Unknown` as BT-10. Required in two cases. When seller and buyer are both in Germany (DE-R-015): without it the document is rejected with `de_domestic_fields_missing` (422). When the receiver is a German public body (a `0204` Peppol ID): it holds the Leitweg-ID, and without it the document is rejected with `buyer_reference_required` (422). |
| idempotency_key* | string | Required. A unique key for this document, for example its number. A retry with the same key returns the first document and does not send again. |
| rounding_amount | number | Rounding amount (BT-114, `cbc:PayableRoundingAmount`), in the document currency: the signed amount that rounds the amount due, for example to whole kronor. Allowed on both `invoice` and `credit_note`, for any seller country and currency. The amount due (BT-115) is the total with VAT (BT-112) less the prepaid amount (BT-113) plus `rounding_amount`. `total` does not include it. With an `amount_due`, send the rounded amount: an `amount_due` equal to the total, with a rounding that is not `0`, is refused with a 422 `amount_due_excludes_rounding` when the rounding is positive, and with a 422 `amount_due_exceeds_total` when it is negative. The value has at most two decimals and must be below `1.00` either way. A value of `1.00` or more, or one that takes the total below `0`, is refused with a 422 `rounding_amount_out_of_range`. With `0` the document has no rounding amount in the UBL. |
| preceding_invoice | object | Preceding invoice reference — the earlier invoice this document corrects, for example the invoice a credit note credits. Allowed on both `invoice` and `credit_note`; one reference per document. The value is an opaque reference that you supply. It is not looked up or checked against an earlier peppol.sh document. It is emitted as `cac:BillingReference/cac:InvoiceDocumentReference`. |
| confirmation_handle | string | Live only. The confirmation_handle of the preview. It works once, for 10 minutes, with the same API key and the same document. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"number",
"issue_date",
"from",
"to",
"lines",
"idempotency_key",
"company_id"
],
"properties": {
"to": {
"allOf": [
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Contact email (BT-43 for `from`, BT-58 for `to`),\n`cac:Contact/cbc:ElectronicMail`. On `from`: when absent, the\n`invoice_contact.email` of the company fills it. Required on\n`from` when seller and buyer are both in Germany (DE-R-007):\nif it is still absent then, the document is rejected with\n`de_domestic_fields_missing` (422).\n"
},
"phone": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Contact phone (BT-42 for `from`, BT-57 for `to`),\n`cac:Contact/cbc:Telephone`. Needs no `email`. It is trimmed and\nmust then have 1 to 100 characters, else the document is rejected\nwith `invalid_document_body` (400). The format is not checked.\nOn `from`: Required by Peppol when seller and buyer are both in\nGermany (DE-R-006), together with `contact_name` and `email`.\nWhen absent on `from`, the `invoice_contact.phone` of the company\nfills it. If one of the three is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
},
"tax_id": {
"type": "string",
"description": "Tax ID. Required when `peppol_id` is absent, and then it must not\nbe empty or only whitespace; else the document is rejected with\n`invalid_document_body` (400). Can be in Peppol format (`0208:0123456749`)\nor plain (`BE0123456749`) — we resolve the scheme. A Swedish VAT\nnumber (`SE556905539401`) resolves to the 10-digit organisation\nnumber (`0007:5569055394`). When `peppol_id` is absent, the\nresolved Peppol ID must have the format and check digit of its\nscheme, else the document is rejected with `invalid_peppol_id`\n(422). For `from`, this check does not apply to a VAT number. A French VAT number (`FR12345678901`)\ndoes not resolve to a Peppol ID: it is sent as the VAT number.\nA `tax_id` with a country prefix (`BE…`, `NL…B01`, `ATU…`) is sent\nas the VAT number. A `tax_id` with no country prefix (for example\nthe Norwegian org number `995313863`) is not a VAT number: it is\nnot sent as one, and the party then needs a `peppol_id`. For a\nDanish seller (`from.tax_id` `DK` + 8 digits), the CVR in the VAT\nnumber is also sent as the legal registration ID (BT-30, scheme\n`0184`). For\n`from`, the Peppol ID of the company is used when `peppol_id` is\nabsent. If no Peppol ID can be found, the send fails with\n`sender_not_derivable`. For `from`, a VAT number or a `scheme:id`\nmust give the Peppol ID of the company or be the company's own\n`tax_id`, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"street": {
"type": "string"
},
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code (e.g. `BE`). It is the postal\ncountry of the party in the document (BT-40 for `from`, BT-55 for\n`to`), sent in upper case. When it is left out or is no two-letter\ncode, the country is the prefix of the VAT number in `tax_id`\n(the Greek `EL` gives `GR`), else the country of the `peppol_id`\nscheme (e.g. `0208` gives `BE`, `0192` gives `NO`; a `scheme:id`\nin `tax_id` counts too). A scheme that is not of one country (`0088` GLN, `0060`\nDUNS) gives none. For `from` with no `peppol_id`, the Peppol ID\nof the company counts. When no country follows for `from` or\n`to`, the document is rejected with `party_country_required`\n(422): with a `ps_test_` key now, with a `ps_live_` key after a\nwarning period. Until then a `ps_live_` key sends the document\nwith the country `BE`.\n"
},
"postal_code": {
"type": "string"
}
},
"description": "A postal address.",
"additionalProperties": {}
},
"peppol_id": {
"type": "string",
"pattern": "^\\d{4}:\\S+$",
"description": "Explicit Peppol participant ID (overrides tax_id lookup).\nFormat: `scheme:id` — a 4-digit scheme, a colon, then a non-empty\nid (e.g., `0208:0785666049`). Validated at ingest: a malformed id\nis rejected synchronously with `invalid_peppol_id` (422) instead of\nfailing later at the provider. Scheme `0208` (BE enterprise number)\nmust be a 10-digit CBE number with a valid mod-97 checksum; a\nleading `BE` is normalized away. For `from`, it must be the\nPeppol ID of the company, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"contact_name": {
"type": "string",
"description": "Contact name (BT-41 for `from`, BT-56 for `to`),\n`cac:Contact/cbc:Name`. Needs an `email` on the same party, else\nthe document is rejected with `invalid_document_body` (400). On\n`from` that check runs after the Invoice contact is filled in, so\nan email the document leaves out can come from\n`invoice_contact.email`. When `contact_name` is absent, the\n`invoice_contact.name` of the company fills it, if the party then\nhas an email. Required on `from` when seller and buyer are both\nin Germany (DE-R-005): if it is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
}
},
"description": "A sender or recipient party on a document. A party needs a `tax_id`,\na `peppol_id`, or both.\n",
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Buyer identifier (BT-46), `cac:PartyIdentification/cbc:ID` with\nno `schemeID`: the number of the buyer in your system. Only on\n`to`: `from.identifier` is rejected with\n`invalid_document_body` (400).\n"
}
},
"additionalProperties": {}
}
]
},
"from": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Contact email (BT-43 for `from`, BT-58 for `to`),\n`cac:Contact/cbc:ElectronicMail`. On `from`: when absent, the\n`invoice_contact.email` of the company fills it. Required on\n`from` when seller and buyer are both in Germany (DE-R-007):\nif it is still absent then, the document is rejected with\n`de_domestic_fields_missing` (422).\n"
},
"phone": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Contact phone (BT-42 for `from`, BT-57 for `to`),\n`cac:Contact/cbc:Telephone`. Needs no `email`. It is trimmed and\nmust then have 1 to 100 characters, else the document is rejected\nwith `invalid_document_body` (400). The format is not checked.\nOn `from`: Required by Peppol when seller and buyer are both in\nGermany (DE-R-006), together with `contact_name` and `email`.\nWhen absent on `from`, the `invoice_contact.phone` of the company\nfills it. If one of the three is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
},
"tax_id": {
"type": "string",
"description": "Tax ID. Required when `peppol_id` is absent, and then it must not\nbe empty or only whitespace; else the document is rejected with\n`invalid_document_body` (400). Can be in Peppol format (`0208:0123456749`)\nor plain (`BE0123456749`) — we resolve the scheme. A Swedish VAT\nnumber (`SE556905539401`) resolves to the 10-digit organisation\nnumber (`0007:5569055394`). When `peppol_id` is absent, the\nresolved Peppol ID must have the format and check digit of its\nscheme, else the document is rejected with `invalid_peppol_id`\n(422). For `from`, this check does not apply to a VAT number. A French VAT number (`FR12345678901`)\ndoes not resolve to a Peppol ID: it is sent as the VAT number.\nA `tax_id` with a country prefix (`BE…`, `NL…B01`, `ATU…`) is sent\nas the VAT number. A `tax_id` with no country prefix (for example\nthe Norwegian org number `995313863`) is not a VAT number: it is\nnot sent as one, and the party then needs a `peppol_id`. For a\nDanish seller (`from.tax_id` `DK` + 8 digits), the CVR in the VAT\nnumber is also sent as the legal registration ID (BT-30, scheme\n`0184`). For\n`from`, the Peppol ID of the company is used when `peppol_id` is\nabsent. If no Peppol ID can be found, the send fails with\n`sender_not_derivable`. For `from`, a VAT number or a `scheme:id`\nmust give the Peppol ID of the company or be the company's own\n`tax_id`, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"street": {
"type": "string"
},
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code (e.g. `BE`). It is the postal\ncountry of the party in the document (BT-40 for `from`, BT-55 for\n`to`), sent in upper case. When it is left out or is no two-letter\ncode, the country is the prefix of the VAT number in `tax_id`\n(the Greek `EL` gives `GR`), else the country of the `peppol_id`\nscheme (e.g. `0208` gives `BE`, `0192` gives `NO`; a `scheme:id`\nin `tax_id` counts too). A scheme that is not of one country (`0088` GLN, `0060`\nDUNS) gives none. For `from` with no `peppol_id`, the Peppol ID\nof the company counts. When no country follows for `from` or\n`to`, the document is rejected with `party_country_required`\n(422): with a `ps_test_` key now, with a `ps_live_` key after a\nwarning period. Until then a `ps_live_` key sends the document\nwith the country `BE`.\n"
},
"postal_code": {
"type": "string"
}
},
"description": "A postal address.",
"additionalProperties": {}
},
"peppol_id": {
"type": "string",
"pattern": "^\\d{4}:\\S+$",
"description": "Explicit Peppol participant ID (overrides tax_id lookup).\nFormat: `scheme:id` — a 4-digit scheme, a colon, then a non-empty\nid (e.g., `0208:0785666049`). Validated at ingest: a malformed id\nis rejected synchronously with `invalid_peppol_id` (422) instead of\nfailing later at the provider. Scheme `0208` (BE enterprise number)\nmust be a 10-digit CBE number with a valid mod-97 checksum; a\nleading `BE` is normalized away. For `from`, it must be the\nPeppol ID of the company, else the document is rejected with\n`sender_not_registered` (422).\n"
},
"contact_name": {
"type": "string",
"description": "Contact name (BT-41 for `from`, BT-56 for `to`),\n`cac:Contact/cbc:Name`. Needs an `email` on the same party, else\nthe document is rejected with `invalid_document_body` (400). On\n`from` that check runs after the Invoice contact is filled in, so\nan email the document leaves out can come from\n`invoice_contact.email`. When `contact_name` is absent, the\n`invoice_contact.name` of the company fills it, if the party then\nhas an email. Required on `from` when seller and buyer are both\nin Germany (DE-R-005): if it is still absent then, the document\nis rejected with `de_domestic_fields_missing` (422).\n"
}
},
"description": "A sender or recipient party on a document. A party needs a `tax_id`,\na `peppol_id`, or both.\n",
"additionalProperties": {}
},
"note": {
"type": "string",
"description": "Optional note to include on the document"
},
"type": {
"enum": [
"invoice",
"credit_note"
],
"type": "string"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"description",
"quantity",
"unit_price",
"tax_rate"
],
"properties": {
"unit": {
"type": "string",
"default": "C62",
"description": "UN/CEFACT unit code (C62 = unit/piece)"
},
"charges": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Line-level charges (BG-28) — additions to the line net."
},
"discount": {
"type": "number",
"deprecated": true
},
"quantity": {
"type": "number"
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g., 21.00)"
},
"allowances": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Line-level allowances (BG-27) — deductions from the line net."
},
"unit_price": {
"type": "number",
"description": "Price per unit (excl. tax)"
},
"description": {
"type": "string"
}
},
"description": "A single invoice or credit-note line.",
"additionalProperties": {}
},
"minItems": 1
},
"vatex": {
"type": "string",
"description": "VAT exemption reason code (BT-121) from the VATEX code list, e.g.\n`VATEX-EU-132`. Applies at document level only.\n"
},
"number": {
"type": "string",
"description": "Your document number (e.g., \"INV-2026-001\")"
},
"charges": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Document-level charges (BG-21) — additions applied before tax."
},
"confirm": {
"type": "boolean",
"description": "Live only. Leave out on the first call: it returns a preview and a confirmation_handle, and sends nothing. Set to true on the second call, after the user approved the preview."
},
"currency": {
"enum": [
"EUR",
"USD",
"GBP",
"JPY",
"CHF",
"CAD",
"AUD",
"NZD",
"CNY",
"INR",
"SEK",
"NOK",
"DKK",
"SGD",
"HKD"
],
"type": "string"
},
"due_date": {
"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])))$"
},
"tax_code": {
"type": "string",
"description": "Document VAT category code (BT-118), e.g. `S` (standard), `Z` (zero),\n`E` (exempt), `AE` (reverse charge). Defaults to `S`, or `Z` when\nevery line is zero-rated.\n"
},
"allowances": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"reason",
"tax_rate"
],
"properties": {
"amount": {
"type": "number",
"description": "Positive amount, in the document currency, max 2 decimals."
},
"reason": {
"type": "string",
"description": "Human-readable reason for the allowance or charge."
},
"tax_rate": {
"type": "number",
"description": "VAT percentage (e.g. `21.00`) selecting the VAT breakdown this\nadjustment belongs to. At line level the line's own rate applies.\n"
}
},
"description": "A document- or line-level allowance or charge. The sign is fixed by\nwhich array carries it (`allowances` deducts, `charges` adds), so\n`amount` is always a positive value.\n",
"additionalProperties": {}
},
"description": "Document-level allowances (BG-20) — deductions applied before tax."
},
"amount_due": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01,
"description": "Amount due for payment (BT-115), in the document currency. Use it\nfor a document that is paid, fully or in part, before you send it:\n`0` for a fully prepaid document. Allowed on both `invoice` and\n`credit_note`.\n\nThe value must be from `0` up to the document total with VAT\n(BT-112) plus `rounding_amount`, with at most two decimals. A value\nabove that is refused with a 422 `amount_due_exceeds_total`. The\nprepaid amount (BT-113, `cbc:PrepaidAmount`) is not an input: it is\nthe total with VAT plus `rounding_amount` less `amount_due`.\n\nIf you omit the field, the amount due is the total with VAT plus\n`rounding_amount`, and the document has no prepaid amount.\n"
},
"company_id": {
"type": "string",
"pattern": "^com_[A-Za-z0-9_-]+$",
"description": "The company that sends, for example com_9fJ2kQ7bTx0Lm4Ne1Ry8."
},
"issue_date": {
"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])))$"
},
"vatex_note": {
"type": "string",
"description": "VAT exemption reason text (BT-120). Applies at document level only."
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"required": [
"filename",
"content"
],
"properties": {
"content": {
"type": "string",
"description": "Base64-encoded file content"
},
"filename": {
"type": "string"
},
"mime_type": {
"type": "string",
"default": "application/pdf"
}
},
"description": "A file to embed with the document, as base64 content.",
"additionalProperties": {}
}
},
"sales_order": {
"type": "string",
"description": "Sales order reference (BT-14), `cac:OrderReference/cbc:SalesOrderID`:\nthe seller's own order number. Without `purchase_order`, the\n`cbc:ID` of the order reference is `NA`.\n"
},
"payment_means": {
"type": "object",
"properties": {
"bic": {
"type": "string"
},
"iban": {
"type": "string",
"description": "The IBAN to pay to (BT-84), the older form of one `iban` account.\nWhen neither `iban` nor `accounts` is sent, the IBAN of the company\nfills it (see above).\n"
},
"method": {
"enum": [
"bank_transfer",
"card",
"direct_debit",
"other"
],
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"number"
],
"properties": {
"bic": {
"type": "string",
"description": "BIC (BT-86). Only for `iban` and `other`."
},
"type": {
"enum": [
"iban",
"bankgiro",
"plusgiro",
"other"
],
"type": "string"
},
"number": {
"type": "string",
"description": "Payment account identifier (BT-84). Spaces and `-` are removed.\n`bankgiro`: 7 or 8 digits. `plusgiro`: 2 to 8 digits. `iban`: 15 to\n34 characters that start with 2 letters.\n"
}
},
"description": "One account a document can be paid to.",
"additionalProperties": {}
},
"maxItems": 10,
"minItems": 1,
"description": "The accounts the buyer can pay to, with the same method and reference."
},
"reference": {
"type": "string",
"description": "Payment reference / structured communication"
}
},
"description": "How the document should be paid: one method, one reference, and one or\nmore accounts. Use `accounts` for a bankgiro or plusgiro number or for\nmore than one account. `iban` and `bic` are the older form of one\n`iban` account: they give a 400 together with `accounts`.\n\nAn account number is required (BR-61, Payment account identifier\nBT-84): `iban` or `accounts`, for every `method`. When both are\nabsent and `from` is the company of `company_id`, the `iban` of the\ncompany fills `iban` when, with spaces and dashes removed, it is a\nvalid IBAN (15 to 34 characters, two letters, and the IBAN check\ndigits). The compact value is stored. A `bic`, `method` and\n`reference` you send are kept, so `GET /v1/documents/{id}` and the\nUBL show it. With no account number after that, the document is\nrejected with `payment_account_required` (422, `param`\n`payment_means`) before any charge. A document without\n`payment_means` is not checked.\n\nRequired by Peppol when seller and buyer are both in Germany\n(DE-R-001): without `payment_means` the document is rejected with\n`de_domestic_fields_missing` (422).\n",
"additionalProperties": {}
},
"invoice_period": {
"type": "object",
"properties": {
"end_date": {
"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])))$"
},
"start_date": {
"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])))$"
}
},
"description": "Invoicing period (BG-14) — the service or billing date range.",
"additionalProperties": {}
},
"purchase_order": {
"type": "string",
"description": "Purchase order reference (BT-13), `cac:OrderReference/cbc:ID`: the\nnumber of the buyer's purchase order.\n"
},
"buyer_reference": {
"type": "string",
"description": "Buyer reference (BT-10), `cbc:BuyerReference`: the reference the\nbuyer asks for, for example a cost centre or a Leitweg-ID. It is\nnot copied to `cac:OrderReference/cbc:ID` (BT-13): send a purchase\norder in `purchase_order`.\n\nWithout `buyer_reference`, a document gets `purchase_order`,\nelse `to.identifier`, else `Unknown` as BT-10.\n\nRequired in two cases. When seller and buyer are both in Germany\n(DE-R-015): without it the document is rejected with\n`de_domestic_fields_missing` (422). When the receiver is a German\npublic body (a `0204` Peppol ID): it holds the Leitweg-ID, and\nwithout it the document is rejected with\n`buyer_reference_required` (422).\n"
},
"idempotency_key": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Required. A unique key for this document, for example its number. A retry with the same key returns the first document and does not send again."
},
"rounding_amount": {
"type": "number",
"description": "Rounding amount (BT-114, `cbc:PayableRoundingAmount`), in the\ndocument currency: the signed amount that rounds the amount due,\nfor example to whole kronor. Allowed on both `invoice` and\n`credit_note`, for any seller country and currency.\n\nThe amount due (BT-115) is the total with VAT (BT-112) less the\nprepaid amount (BT-113) plus `rounding_amount`. `total` does not\ninclude it. With an `amount_due`, send the rounded amount: an\n`amount_due` equal to the total, with a rounding that is not `0`,\nis refused with a 422 `amount_due_excludes_rounding` when the\nrounding is positive, and with a 422 `amount_due_exceeds_total`\nwhen it is negative.\n\nThe value has at most two decimals and must be below `1.00` either\nway. A value of `1.00` or more, or one that takes the total below\n`0`, is refused with a 422 `rounding_amount_out_of_range`. With `0`\nthe document has no rounding amount in the UBL.\n"
},
"preceding_invoice": {
"type": "object",
"required": [
"number"
],
"properties": {
"number": {
"type": "string",
"minLength": 1,
"description": "Number of the preceding invoice (BT-25). Leading and trailing\nwhitespace is removed; the result must not be empty.\n"
},
"issue_date": {
"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])))$",
"description": "Issue date of the preceding invoice (BT-26), `YYYY-MM-DD`."
}
},
"description": "Preceding invoice reference — the earlier invoice this document\ncorrects, for example the invoice a credit note credits. Allowed on\nboth `invoice` and `credit_note`; one reference per document.\n\nThe value is an opaque reference that you supply. It is not looked up\nor checked against an earlier peppol.sh document. It is emitted as\n`cac:BillingReference/cac:InvoiceDocumentReference`.\n",
"additionalProperties": {}
},
"confirmation_handle": {
"type": "string",
"maxLength": 200,
"description": "Live only. The confirmation_handle of the preview. It works once, for 10 minutes, with the same API key and the same document."
}
},
"additionalProperties": {}
}