ThorncliffInvoice API

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/validateUBL XML (Invoice or CreditNote) or Thorncliff JSON. Returns valid, errors, warnings. Each finding has a rule id, path, message and fix.
POST /v1/fixJSON 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/rulesEvery rule we run, and where it came from.
GET /openapi.jsonOpenAPI 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

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.