The Callback was the strategy defined to provide status for any process on our platform. It is a service that notifies client services based on changes/events and was designed to ensure the delivery of the notification, even if some instability occurs in their service. Attempts will be made for 24 hours at 30-minute intervals and if there's no success after that, the notification is no longer sent and an e-mail is sent to admin registered for the callback.
In order to use this resource, it’s necessary that the client has a REST API Service that will be requested by the Callback Service. The callback to the client service must be configured with: the Service URL, the Trigger Type and Request Headers if needed.
If the client service is behind a firewall, an inbound rule must be configured with the following IP range:
Environment | IP Range |
---|---|
Sandbox | 104.41.9.254, 104.41.13.4, 104.41.15.87, 104.41.14.246 |
Production | 191.235.80.91, 191.235.86.218, ,191.235.81.80, 191.235.85.39 |
These are the fields for callback configuration.
Name | Type | Description |
---|---|---|
url | string | Url address for client API service. |
trigger | string | Callback behavior options. |
headers | Header[] | Request headers for the client service API as NameValue |
The Callback is the recommended way to retrieve the status of the document flow if there are signers out of your environment, i,e, if some signer does not has a login in your system. Otherwise, if all signers are into your system, you could use the JavaScript API which provides the status immediately after the signature has been performed.
Determines when the callback service will be fired, sending the status to the client service APIs.
Name | Description |
---|---|
FLOW | The callback will be fired only in the end of the flow (when all signatures have been performed) |
STEP | The callback will be fired in the end of each step and also in the end of the flow. |
ACTION | The callback will be fired in each action performed, in the end of each step and also in the end of the flow. |
The client service API must be ready to receive the parameters sent by the Callback Service. The parameters are represented by the model below.
Name | Type | Description |
---|---|---|
documentId | string | Document Id |
name | string | The person's name who performed the action (signature, authorization, etc.) |
identifier | string | The person's CPF who performed the action (signature, authorization, etc.) |
action | Action | Possible actions to be send, according to callback behavior configuration |
Action details.
Name | Type | Description |
---|---|---|
SIGNATURE-ELETRONIC | string | Electronic signature performed by signer without an digital certificate. |
SIGNATURE-DIGITAL | string | Digital signature performed by signer using an digital certificate. |
SIGNATURE-SERVER | string | Digital signature performed by server using an company digital certificate. |
SIGNATURE-NOK | string | Signature rejected by signer. |
AUTHORIZATION-OK | string | Document authorized by authorizer. |
AUTHORIZATION-NOK | string | Document not authorized by authorizer. |
APPROVAL-OK | string | Document approved by aprover. |
APPROVAL-NOK | string | Document not approved by aprover. |
STEP-(step_number) | string | All signatures performed for the step. |
FLOW | string | Document flow completed. All signatures performed. |
Sample of callback post request to the client service:
{
"documentID": 123456,
"name": "João da Silva",
"identifier": "307.625.739-02",
"action": "SIGNATURE-DIGITAL",
"message": ""
"apiDownload": "https://api-sbx.portaldeassinaturas.com.br/api/v2/document/Package?key=4B4659AB34847973&includeOriginal;=false"
}
The Callback is the only way to retrieve the status of the Registered Mail.
Determines when the callback service will be fired, sending the status to the client service APIs.
Name | Description |
---|---|
DELIVERED | The callback will be fired when the certificate of delivered is ready. |
OPENED | The callback will be fired when the certificate of the access to the content is ready. Valid only for html emails. |
The client service API must be ready to receive the parameters sent by the Callback Service. The parameters are represented by the model below.
Name | Type | Description |
---|---|---|
type | string | Identifies the callback Type |
registeredMailId | string | Registered Mail Id |
recipient | string | Recipient of registered mail |
info | object | Information regarding delivery proccess |
action | Action | Possible actions to be send, according to callback behavior configuration |
Action details.
Name | Type | Description |
---|---|---|
DELIVERED | string | Email has been delivered and certificate is ready. |
NOT-DELIVERED | string | Email was not delivered for the reason described in the info field. |
OPENED | string | Email content has been accessed and the Content Access Addendum Certificate is ready. |
Sample of callback post request to the client service:
{
"type": "REGISTERED-MAIL",
"registeredMailId": 123456,
"recipient": "joao.silva@mail.com",
"action": "DELIVERED",
"info":{"message":"Successfully delivered"}
}