Validate a document
validate_documentChecks 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>"
},
"name": "validate_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ubl_xml | No | A UBL Invoice or CreditNote as XML text, at most 5 MB. | |
| document | No | The document as JSON, the same fields as send_document. | |
| company_id | Yes | The company that will send the document. Get it from list_companies. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| errors | Yes | ||
| format | Yes | ||
| warnings | Yes |