parse_invoice_ae
Parse PINT AE UBL 2.1 XML invoices into structured dictionaries, extracting EN 16931 fields and UAE extensions, and re-validating tax-rate and TRN consistency.
Instructions
Parse a PINT AE UBL 2.1 XML invoice into a structured dict.
Accepts a PINT AE billing or self-billing UBL 2.1 document (Invoice or CreditNote root), extracts the EN 16931 core field set plus the AE extensions (document_uuid, profile_execution_id, trade_license_number), and re-validates the merged result as an AEInvoice — so TRN format and tax-rate/category consistency are re-checked on parsed content, not just on freshly constructed invoices.
Returns {"success": true, "invoice": {...}} on success, or
{"success": false, "error": "..."} on parse or validation failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml_content | Yes | Raw PINT AE UBL 2.1 XML invoice content |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||