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.
Endpoint
Section titled “Endpoint”- 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}
Request
Section titled “Request”Path parameters
Section titled “Path parameters”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
Headers
Section titled “Headers”- Authorization: Bearer token (requires
4Exchange/sendscope)
Request body
Section titled “Request body”none
Responses
Section titled “Responses”200 OK
Section titled “200 OK”- 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": ""
}
Status values
Section titled “Status values”- 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 - with error status
Section titled “200 OK - with error status”- 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
Section titled “404 Not Found”- 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
Section titled “401 Unauthorized”- 401 Unauthorized
{
"message": "Unauthorized"
}
