Skip to content

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.
  • 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
  • documentId (string, required): One of the IDs returned by the list endpoint.

Example: POST /v3/documents/export/8e6e870e-854b-46ef-a4d5-dfe5a5799cf8

  • Authorization: Bearer token (requires 4Exchange/receive scope)
  • Content-Type: application/json
{
    "status": "EXPORTED"
}

Sets the status of an exported document to ERROR with error feedback.

Request body:

{
    "status": "ERROR",
    "errorMessage": "Failed to retrieve document: connection timeout."
}
  • 200 OK
{
    "message": "Status updated to EXPORTED"
}
  • 401 Unauthorized
{
    "message": "Unauthorized"
}
  • 404 Not Found

Example: POST /v3/documents/export/8e6e870e-854b-46ef/status

{
    "Error": "Document not found"
}