Webhook and event
Webhook
Webhooks is a notification mechanism to inform third-party systems about contract events. Every time an event occurs, Oneflow makes a corresponding HTTP request to the webhooks connected to the template type, using the URLs defined in the account the contract that the contract is in.
Note:
The webhook will retry the request until it receives a successful response (HTTP 200) or makes a total of 10 unsuccessful attempts.
The table below shows all the attributes available for each webhook notification:
Attribute | Type | Description |
---|---|---|
contract | object | Indicates the contract linked to the webhook. See Contract ID. |
callback_id | string | The callback ID. This identifier is the same for all calls (retries) of the same event webhook. Thus, it can be used to ensure that events are processed only once. It is also used to authenticate the request by calculating the webhook signature. |
events | array[object] | The list of event objects. See Event. |
signature | string | The signature of the webhook request. See Webhook API Security. |
Contract ID
Attribute | Type | Description |
---|---|---|
id | integer(signed_integer_id) | The ID of the contract. |
Event
A contract event is created by actions or changes in the contract and is also the basis for triggering webhooks.
The table below displays all the attributes available for each contract event:
Attribute | Type | Description |
---|---|---|
created_time | string(datetime) | The time the event was created. |
id | integer(signed_integer_id) | The ID of the event. |
type | string | The type of event that triggered this webhook. See the Webhook type page. |
Note:
A webhook contains only the attributes listed in the table above. If you need additional information about an event or related contract changes, they need to be requested using the REST API.
Updated over 1 year ago