Alya Books

    Developer docs

    REST API, webhooks, MCP server and CLI for UAE e-invoicing

    Sample documents

    Six PINT AE documents with the API request that produces each: download, compare, and use as fixtures.

    Each sample is a request your system could POST /invoices and the PINT AE (UBL 2.1) document Alya Books builds from it. The XML is produced by the same code the API runs, for a fictional seller, and passes the UBL 2.1 schema and the official PINT AE Schematron (release 2026.5) with no failed rule. Use them to see where each field lands, to test your parser or archive, or as fixtures in your own test suite.

    DocumentCoversRequestXML
    Tax invoiceStandard-rated goods in AED, credit transfer, 30-day termsstandard.request.jsonstandard.xml
    Tax credit noteReason code DL8.61.1.A and the invoice it corrects (BG-3)credit-note.request.jsoncredit-note.xml
    Export in USDZero-rated export with Incoterms, a foreign buyer on the predefined endpoint, the exchange rate and the AED tax totalexport-usd.request.jsonexport-usd.xml
    Reverse chargeElectronic devices under Cabinet Decision 91 of 2023: goods type code, GTIN, category AE at 5 % with no VAT amountreverse-charge.request.jsonreverse-charge.xml
    Summary invoiceMonthly billing period and frequency, a service line and an out-of-scope reimbursementsummary-invoice.request.jsonsummary-invoice.xml
    Self-billed invoiceType 389 under the self-billing profileself-billed.request.jsonself-billed.xml

    The integration pack

    Everything on this page and the guides around it also comes as one download, integration-pack.zip: the getting-started, checklist, outgoing and incoming invoice, lifecycle, webhook and VAT guides as PDFs, the EmaraTax onboarding article in English and Arabic, the OpenAPI document, the Postman collection, the six samples with their requests, and a workbook of every PINT AE field, validation rule and code list. It is rebuilt from these pages, so its README names the build date and the specification versions; the online pages remain the current version.

    What to look for

    • Seller data is not in the request. Name, TRN, Peppol ID, address, trade licence and bank account come from the organization profile. The samples use a fictional seller, Blue Harbor Logistics LLC, with TRN 100412873100003 and Peppol ID 0235:1004128731.
    • The buyer endpoint. A UAE buyer with a Peppol ID is addressed at 0235:<TIN>. The export sample has a buyer with neither a TRN nor a Peppol ID, so the document carries the predefined endpoint 0235:9900000099 and no buyer legal registration, which is how the FTA receives documents whose buyer is not on the network.
    • Cross currency. The USD sample carries cbc:TaxCurrencyCode AED, cac:TaxExchangeRate, a second cac:TaxTotal in AED and the AED total including VAT as cac:AdditionalDocumentReference with cbc:DocumentTypeCode aedtotal-incl-vat.
    • Reverse charge. The line and the AE breakdown state 5 % with VAT amounts of 0.00, the goods type in cbc:TaxExemptionReasonCode, and the GTIN in cac:StandardItemIdentification with scheme 0160.
    • Credit note. cac:BillingReference names the corrected invoice and cac:DiscrepancyResponse/cbc:ResponseCode carries the reason. A volume discount credit note (reason VD) carries no reference.
    • Self-billing. cbc:CustomizationID is urn:peppol:pint:selfbilling-1@ae-1 and cbc:ProfileID urn:peppol:bis:selfbilling; the seller's organization must have self-billing switched on.

    What is sent to the service provider

    Before transmission the document is wrapped in a Standard Business Document Header (SBDH) that names the sender and receiver participant ids, the document type and the service provider's MLS scope. GET /invoices/{id}/submissions returns that wrapped form as the file sent_xml for any submitted invoice, and the files the service provider returned; see ASP and FTA lifecycle.

    Validate your own documents

    POST /invoices/validate runs the same checks on a request without creating anything, and GET /invoices/{id}/validation on a stored invoice. Each error names the business term (IBT-…, BTAE-…) and the rule; the PINT AE field reference lists every term with its UBL path and the API field that carries it.