In this section, you will find information about how the Webhook of the Unico IDCloud platform works
The respective GetProcess articles for integration methods describe a way to obtain the status of a process through a call to an endpoint. This allows for polling to receive information about created processes, meaning the endpoint can be called multiple times for the same process to obtain the most recent status.
With the use of webhooks, it's possible to notify a specific endpoint every time the status of a process changes.
A webhook is a notification service that enables asynchronous integration between systems, where one system notifies another through a trigger. This allows webhooks to keep systems updated with the latest information without the need for constant polling for updates.
To configure the webhook, the following information is required:
Notification URL: This is the endpoint used by By Unico for notifications about status updates.
Authentication Type: This is the authentication method used to invoke the endpoint. The following options are available:
Basic Authorization
API Key
No authentication
Secret: This indicates a secret used for authentication. The secret is only necessary when the authentication type is Basic Authorization or API Key:
For Basic Authentication, it must be sent in the format user:pass
.
For API Key, it can be sent in two formats:
header:value
, when a specific header name is desired;
value
, when the desired header is the Authorization.
Retry Settings: Indicates the number of attempts in case of a failure in calling the endpoint:
Maximum number of attempts
Interval between attempts (in seconds)
Rate Limit: Maximum number of simultaneous sends (maximum: 500).
Timeout: Maximum wait time for the endpoint's response (in seconds).
Status to be Notified: Currently, the notification is sent whenever the state of a process changes to:
Sobre a autenticação:
The API can be protected by an authentication method such as Basic Authentication or API Key. A list of valid IPs for access can also be defined for additional protection.
By configuring a webhook on the platform, you can receive information about processes through notifications sent to an API endpoint developed by you to receive these updates.
The information sent by the platform to the API includes:
The request should be a POST method in a REST API, making it easier and safer to send information. All fields must be mandatory. The body of the request should accept the transaction ID and the state, as shown in the following example:
About response status:
Currently, the platform has a set of statuses that may vary in the future. Therefore, it is recommended that the statuses of interest for taking action be configurable.
The response must come synchronously. The status for successful requests should be in the range of 200 to 299. Any other status is considered a failure, and the platform will retry notifications (with exponential backoff between them) until receiving a 2xx response or until reaching the maximum number of attempts.
Still need help?
Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.
by Unico | by Client |
---|---|
by Unico | by Client |
---|---|
finished
: Process finished.
2
: In divergence;
3
: Completed;
4
: Canceled;
5
: Error.
processId
: ID of the transaction;
state
: State of the transaction;
flow
: Journey of the transaction.
id
: ID of the transaction;
status
: State of the transaction;