3 Set export status
This API is used to set the retrieval status of a document that has been exported. The status can be set to either EXPORTED or ERROR:
- If set to
EXPORTED, the document will be marked as successfully retrieved and will not appear in future export listings. - If set to
ERROR, the document will also be hidden from the next export listing, but the error can be logged or retried separately if needed. - If no status is submitted, the document remains available for retrieval in the next export run.
Endpoint
Section titled “Endpoint”- Method: POST
- Path:
/v3/documents/export/{documentId}/status
Full URLs
- Test:
https://apitest.4exchange.app/v3/documents/export/{documentId}/status - Production:
https://api.4exchange.app/v3/documents/export/{documentId}/status
Request
Section titled “Request”Path parameters
Section titled “Path parameters”documentId(string, required): One of the IDs returned by the list endpoint.
Example: POST /v3/documents/export/8e6e870e-854b-46ef-a4d5-dfe5a5799cf8
Headers
Section titled “Headers”- Authorization: Bearer token (requires
4Exchange/receivescope) - Content-Type: application/json
Request body
Section titled “Request body”{
"status": "EXPORTED"
}
Example 1
Section titled “Example 1”Sets the status of an exported document to ERROR with error feedback.
Request body:
{
"status": "ERROR",
"errorMessage": "Failed to retrieve document: connection timeout."
}
Responses
Section titled “Responses”200 OK
Section titled “200 OK”- 200 OK
{
"message": "Status updated to EXPORTED"
}
401 Unauthorized
Section titled “401 Unauthorized”- 401 Unauthorized
{
"message": "Unauthorized"
}
404 Not Found
Section titled “404 Not Found”- 404 Not Found
Example: POST /v3/documents/export/8e6e870e-854b-46ef/status
{
"Error": "Document not found"
}
