Submit and retrieve

Submit a document to Unify, read the response, then follow the document until it is delivered.

Endpoint

Submit a documenthttp
POST https://prod.gets.complyance.io/api/v3/unify

This page follows one document from submission to retrieval. The endpoint also accepts a batch in an invoices array; each item carries its own country, environment, purpose, source, document type and payload. Complyance checks the document against the rules for its country and document type, then continues delivery to the tax authority or the Peppol network.

Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_KEY. See Authentication.Yes
new-apitrue. Selects this request format. Without it, the request is read in the earlier format.Yes
Content-Typeapplication/jsonYes
Acceptapplication/jsonNo

Request body

The envelope names the country and document type; payload carries the invoice data your source sends.

FieldTypeDescriptionRequired
countrystringISO 3166-1 alpha-2 country code for this document.Yes
environmentstringsandbox or production. Must match your key: a sandbox key for sandbox, a production key for production.Yes
purposestringinvoicing.Yes
sourcestringThe source name and version, as name:version, from onboarding.Yes
documentTypeobjectbase, modifiers[] and an optional variant. Determines which invoice fields the selected country requires.Yes
payloadobjectThe invoice in the structure expected by your source’s mapping. See the GETS field reference for the fields used in country validation.Yes
Submit a documentbash
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 @invoice.json

A complete invoice.json for the UAE is in the quickstart. The API playground builds a request for any country and sends it to sandbox.

Response

200 means the document passed validation and was stored.

Document validated — HTTP 200json
{
  "documentId": "01K5EXAMPLE00000000000142",
  "documentNumber": "INV-2026-000184",
  "message": "Your invoice was validated and is ready for submission.",
  "Base64XML": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4…"
}
FieldTypeDescription
documentIdstringKeep it to look the document up later.
documentNumberstringThe number from your payload.
messagestringWhat happened, in words.
Base64XMLstringThe e-invoice XML, Base64-encoded. Empty for countries where it is not produced at this point.

Follow the document

Delivery to the tax authority or the Peppol network continues after the response. Follow it with the documentId:

Check the statusbash
curl "https://prod.gets.complyance.io/api/v3/documents/${DOCUMENT_ID}?type=sales" \
  --header "Authorization: Bearer ${COMPLYANCE_API_KEY}" \
  --header 'Accept: application/json'

Every field of the answer is in Get a document in the API playground. To be told instead of asking, use webhooks.

Errors

422 means the document failed validation, and the body lists every problem. Any other error status means the request itself was refused. What each one means, and what to do, is in Errors.

Last updated