Managing Callbacks#
The document APIs are asynchronous and respond via callbacks. Any external system that intends to integrate with the document APIs must be able to handle exceptions that may occur.Making a Request#
When making a request, you must pass the callback URL to be called when the operation is complete in the body of the request.{
...
"callback": "https://your_callback"
}
The callback URL must be an authenticated URL and accept POST request.
Response#
The response will have the following format in case of success:{
 "success": true
 "id": "7571b744-8e2d-4dde-99d8-b60c0dff1aca"
}
In case of an error, the response will have the following format:{
  "success": false,
  "message": "Error message"
}
Handling Exceptions#
The external system must be able to handle any exceptions that may occur when the callback is invoked. This includes exceptions such as:The callback request body is not in the correct format.
An internal error occurred on the document server.
If an exception occurs, the external system should log the error and take any appropriate action, such as retrying the request or notifying the user.