Submit and retrieve
Submit a document to Unify, read the response, then follow the document until it is delivered.
Endpoint
POST https://prod.gets.complyance.io/api/v3/unifyThis 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
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_KEY. See Authentication. | Yes |
new-api | true. Selects this request format. Without it, the request is read in the earlier format. | Yes |
Content-Type | application/json | Yes |
Accept | application/json | No |
Request body
The envelope names the country and document type; payload carries the invoice data your source sends.
| Field | Type | Description | Required |
|---|---|---|---|
country | string | ISO 3166-1 alpha-2 country code for this document. | Yes |
environment | string | sandbox or production. Must match your key: a sandbox key for sandbox, a production key for production. | Yes |
purpose | string | invoicing. | Yes |
source | string | The source name and version, as name:version, from onboarding. | Yes |
documentType | object | base, modifiers[] and an optional variant. Determines which invoice fields the selected country requires. | Yes |
payload | object | The invoice in the structure expected by your source’s mapping. See the GETS field reference for the fields used in country validation. | Yes |
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.jsonA 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.
{
"documentId": "01K5EXAMPLE00000000000142",
"documentNumber": "INV-2026-000184",
"message": "Your invoice was validated and is ready for submission.",
"Base64XML": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4…"
}| Field | Type | Description |
|---|---|---|
documentId | string | Keep it to look the document up later. |
documentNumber | string | The number from your payload. |
message | string | What happened, in words. |
Base64XML | string | The 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:
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