Skip to content

Get status

This API is used to retrieve the current processing status of a previously submitted document, using its document ID. It provides insight into the document’s lifecycle, such as whether it has been exported, encountered errors, or is still in progress.

We highly recommend using webhooks instead of polling this GET endpoint. Webhooks deliver real-time updates, reduce API load and latency, and avoid repeated requests and rate-limit issues; use this endpoint only for ad-hoc checks.

  • Method: GET
  • Path: /v3/documents/status/{documentId}

Full URLs

  • Test: https://apitest.4exchange.app/v3/documents/status/{documentId}
  • Production: https://api.4exchange.app/v3/documents/status/{documentId}
  • documentId (string, required): The ID returned by the upload endpoint or your own if submitted.

Example: GET /v3/documents/status/8e6e870e-854b-46ef-a4d5-dfe5a5799cf8

  • Authorization: Bearer token (requires 4Exchange/send scope)

none

  • 200 OK
{
    "documentId": "8e6e870e-854b-46ef-a4d5-dfe5a5799cf8",
    "status": "EXPORTED",
    "importDate": "2025-01-21T12:27:33.714107Z",
    "exportDate": "2025-01-21T12:29:28.326129Z ",
    "errorMessage": ""
}
  • INPROGRESS – Document is currently being processed.
  • EXPORTED – Document has been sent out from the system.
  • DELIVERED – Document successfully received by recipient (only for Peppol and Email exports).
  • ERROR – Processing failed due to an error; document can be reprocessed after the issue is resolved.
  • DELETED – Document has been removed from the system by user.
  • ONHOLD – Processing paused, export has been disabled by user.
  • REJECTED – Document was rejected by user.
  • RETURNED – Document sent back to sender.
  • WAITINGFORAPPROVAL – Pending approval by a user before proceeding.
  • WAITINGFORCLEARANCE – Pending clearance (VAT clearance).
  • WAITINGFOREXPORT – Document ready, can be retrieved via get document API.
  • 200 OK
{
    "documentId": "34635aa4-30f6-4f59-ac74-5b2914903e0c",
    "status": "ERROR",
    "importDate": "2025-01-21T08:19:41.703653Z",
    "exportDate": "",
    "errorMessage": "Peppol export error: XML is not valid, please check PeppolValidation attachment"
}
  • 404 Not Found
{
    "message": "Document not found"
}

Note: Documents are retained by default for 90 days. If a document is older than 90 days it may have been removed and the endpoint will return a 404 Not Found response.

  • 401 Unauthorized
{
    "message": "Unauthorized"
}