Check UAE e-invoices before your ASP does.
PINT AE 1.0.4. UBL XML runs against the official schematron. JSON invoices get source-data checks and fixes.
Start
Send your key in X-API-Key. 60 requests a minute per key. Keys are invite-only for now.
curl https://api.thorncliff.ai/v1/validate \ -H "X-API-Key: $THORNCLIFF_KEY" \ -H "Content-Type: application/xml" \ --data-binary @invoice.xml
{
"valid": false,
"errors": [{
"rule": "IBR-132-AE",
"severity": "error",
"path": "seller.trn",
"message": "Seller TRN '10012345670003' is invalid.",
"fix": "15 digits, starts with 1, ends with 03."
}],
"warnings": []
}
Endpoints
| POST /v1/validate | UBL XML (Invoice or CreditNote) or Thorncliff JSON. Returns valid, errors, warnings. Each finding has a rule id, path, message and fix. |
|---|---|
| POST /v1/fix | JSON only. Returns the corrected invoice, every change, what needs review and what needs a human answer. Add ?apply_suggestions=true to apply the reviewable ones too. |
| GET /v1/rules | Every rule we run, and where it came from. |
| GET /openapi.json | OpenAPI 3.1 spec. |
curl https://api.thorncliff.ai/v1/fix \ -H "X-API-Key: $THORNCLIFF_KEY" \ -H "Content-Type: application/json" \ --data-binary @invoice.json
Coverage
- UBL XML: all 302 assertions of the official PINT AE 1.0.4 schematron (170 shared PINT, 132 UAE-aligned), run unchanged.
- JSON: 30 rules ported from the schematron, plus 3 of our own (line VAT maths, due-after-issue, VAT total stated). Not full coverage: JSON has no fields yet for credit notes, allowances, charges, reverse charge or non-AED currency rules.
JSON shape
Same shape as the Thorncliff Invoice Agent. See the spec.
{ "invoice_number", "issue_date", "due_date", "currency", "transaction_type_code",
"seller": { "name", "trn", "address": { "street", "city", "country_subentity", "country" } },
"customer": { "name", "vat_number", "legal_registration", "address": { … } },
"line_items": [{ "description", "quantity", "unit_code", "unit_price", "tax_category", "tax_percent", "tax_amount" }],
"totals": { "tax_exclusive", "tax", "payable" } }
Small print
Pre-flight only. A pass here is not ASP or FTA acceptance. Don't send real customer data to a key you share. Thorncliff · SPONE FZCO.