Submit a UAE sandbox invoice
Create a complete GETS request from the published UAE invoice sample and save Unify's full response. You need an onboarded UAE sandbox source, a sandbox API key and real test identities approved for that environment.
Download the complete GETS invoice
Download the published complete UAE GETS sample as uae-invoice-payload.json. It is a full payload, not a test identity you can submit unchanged. Replace its example seller and buyer identities, Peppol identifiers, addresses, dates, document number, amounts and applicable extensions with data that matches your source’s mapping. Check allowed UAE codes for coded fields. The parties.buyer.peppolId value is separate from its scheme in extensions.peppol_buyer_peppolIdScheme (for example 0235).
Create the complete Unify request
Set INVOICE_SOURCE to the onboarded source’s exact name:version, such as acme-erp:1.0.0. The following command adds the required request envelope to every field in the downloaded GETS payload; it does not remove any of its fields.
export INVOICE_SOURCE='acme-erp:1.0.0'
jq --arg source "$INVOICE_SOURCE" '{
country: "AE",
environment: "sandbox",
purpose: "invoicing",
source: $source,
documentType: { base: "tax_invoice", modifiers: [] },
payload: .
}' uae-invoice-payload.json > uae-invoice-request.jsonInspect uae-invoice-request.json before sending it. Its source must belong to your workspace; the identities and document number in the downloaded payload are examples, not live registration details.
Submit and save the full response
curl --request POST 'https://prod.gets.complyance.io/api/v3/unify' \
--header "Authorization: Bearer ${COMPLYANCE_API_KEY}" \
--header 'new-api: true' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data @uae-invoice-request.json \
--write-out 'HTTP %{http_code}\n' \
--output uae-invoice-response.jsonRead the complete uae-invoice-response.json you receive. On HTTP 200, it contains documentId, message, Base64XML (the Base64-encoded e-invoice) and possibly documentNumber. Keep the full response and its documentId, then check the document’s delivery status. A 200 does not confirm delivery. The Unify operation shows the complete sample request, response and error shapes.
For comparison, this is the complete sample HTTP 422 response for a request missing totals.amountDue in the Unify operation:
{
"documentId": "01K5EXAMPLE00000000000142",
"documentNumber": "INV-2026-000184",
"message": "Your invoice could not be validated. Review the errors and try again.",
"validationStage": "gets",
"errors": [
{
"code": "IBR-015",
"getsPath": "totals.amountDue",
"payloadPath": "totals.amountDue",
"message": "An Invoice MUST have the Amount due for payment (ibt-115).",
"severity": "error",
"ruleSet": "ae:tax_invoice"
}
]
}If something goes wrong
- HTTP
401or403: check the API key, its permissions and that it belongs to sandbox. - HTTP
404for the source: compareINVOICE_SOURCEwith the onboarded source name and version. - HTTP
422: read every entry inerrors; correct the indicated GETS fields and submit the complete document again. See UAE validation rules.
Next, follow the document using its documentId.
Last updated