validate_invoice
Validates invoice XML against ZATCA business rules, checking required fields, VAT numbers, mathematical accuracy, and UBL 2.1 structural integrity.
Instructions
Validate an invoice XML against ZATCA business rules.
Runs comprehensive checks including: required fields, VAT number format, mathematical accuracy of line totals and VAT calculations, and structural integrity of the UBL 2.1 XML.
Args: invoice_xml: Complete UBL 2.1 XML invoice string to validate
Returns: JSON with is_valid (boolean), errors (list of issues), warnings (list), and checks_run (number of rules checked)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_xml | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |