Chapter 04 of 06 · UAE

Submit the invoice

Send your prepared UAE invoice through Unify and save its tracking identifier. You need the sandbox API key and uae-invoice-request.json from the previous chapter.

Send the request

Submit the prepared invoicebash
curl --request POST 'https://prod.gets.complyance.io/api/v3/unify' \
  --header "Authorization: Bearer ${COMPLYANCE_API_KEY}" \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'new-api: true' \
  --data @uae-invoice-request.json \
  --output invoice-response.json

Use the request file you reviewed in the previous chapter. Unify uses the Bearer header, unlike Connect’s X-API-Key header.

Keep the response

You should see HTTP 200. invoice-response.json looks like this:

invoice-response.jsonjson
{
  "documentId": "01K5EXAMPLE00000000000142",
  "documentNumber": "INV-2026-0142",
  "message": "Your invoice was validated and is ready for submission.",
  "Base64XML": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4…"
}

Save the returned documentId alongside your invoice number. Base64XML is the e-invoice that was produced, Base64-encoded. Every field is described in Submit and retrieve.

If the invoice fails validation, you get HTTP 422 and a list of errors instead. Each one names the field and, when there is one, the rule. See Errors:

A validation error — HTTP 422 (shortened)json
{
  "validationStage": "gets",
  "errors": [
    {
      "code": null,
      "getsPath": "parties.buyer.name",
      "payloadPath": "parties.buyer.name",
      "message": "Buyer name is required.",
      "severity": "error",
      "ruleSet": "AE:tax_invoice"
    }
  ]
}

Correct the field in uae-invoice-payload.json, rebuild the request as in the previous chapter and send it again. Keep the request identifier and error details if a request fails for any other reason.

A successful HTTP response means the submission request succeeded. Check the document’s final state before recording the invoice as accepted.

If something goes wrong

Authentication fails: check the Bearer header and sandbox key.

The source or mapping is rejected: compare the request’s source with the onboarding response and confirm readyForInvoicing.

The response is lost: check the portal for the original invoice before sending it again. Do not assume a timeout means nothing was submitted.

Next: Check the result with the saved documentId.


05 Next: check the result Read the status and handle any errors.