Complyance Logo

Unify v3 Submission & Retrieval Flow

Unify v3 now follows a clear 2-step flow: submit first, then retrieve status/result by documentId.

Overview

The Unify submission request format remains unchanged.
After submission, the final government/compliance outcome must be retrieved using:

GET /api/v3/documents/{documentId}/status

This keeps submission fast and lets you track async processing safely.

Step 1: Submit (Existing Flow)

Use the existing Unify submit endpoint and payload:

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

Your submit response includes a documentId. Save this value in your system.

Step 2: Retrieve Status and Final Result

Use the documentId from submit response:

curl --location 'https://prod.gets.complyance.io/api/v3/documents/01KPQRKVX92CE5154EGF8VE10C/status' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json'

Example Response (Terminal Success)

{
  "success": true,
  "data": {
    "submissionId": "01KPQRKVJM12AMKMT6AVY3GBG4",
    "documentId": "01KPQRKVX92CE5154EGF8VE10C",
    "documentNumber": "shubham-36",
    "country": "AE",
    "environment": "sandbox",
    "state": "final_valid",
    "isTerminal": true,
    "lastUpdatedAt": "2026-04-21T12:39:21.362Z",
    "errors": [],
    "government": {
      "requestId": "01KPQRKWCCGT7F0FH7Y5507QKR",
      "jobId": "f253f033-ef38-4454-803f-23d13d5359a4",
      "status": "VALID",
      "message": "Synchronized from documents status",
      "syncSource": "documents_collection_retrieval",
      "syncUpdatedAt": "2026-04-21T12:39:21.339Z"
    },
    "artifacts": {
      "invoiceXmlBase64": "PD94bWwgdmVyc2lvbj0iMS4wIi4uLg==",
      "invoiceXmlEncoding": "base64",
      "tddXmlBase64": "PD94bWwgdmVyc2lvbj0iMS4wIi4uLg=="
    },
    "compliance": {
      "uuid": "ed4ccfff-dd83-4699-823f-3242d53f2f11",
      "ftaApprovedStatus": "APPROVED",
      "businessProcessIdentifier": "cenbii-procid-ubl::urn:peppol:bis:billing",
      "specificationIdentifier": "urn:peppol:pint:billing-1@ae-1"
    }
  }
}

Status Lifecycle

StateMeaningTerminal
rejectedRequest failed validation at submit stageYes
submittedAccepted and queuedNo
processingIn progressNo
delivery_successSuccessfully handed to target network/authorityNo
delivery_failedDelivery handoff failedNo
final_validFinal accepted stateYes
final_invalidFinal rejected stateYes

Polling Guidance

  1. Submit invoice and save documentId.
  2. Call status endpoint by documentId.
  3. Continue polling until isTerminal: true.
  4. If state = final_valid, consume artifacts/compliance data.
  5. If state = final_invalid or rejected, handle errors[].

Notes

  • Use documentId as the primary retrieval key.
  • Keep your API key and env aligned (sandbox key for sandbox requests, production key for production).
  • Existing action: "list" behavior for MY can continue where applicable, but final async processing state should be tracked through document status retrieval.