Webhooks - Create New Webook
Overview
This endpoint allows you to create a webhook.
Request
POST /v1/accounts/{account_uuid}/webhooks
Mandatory Request Values
Key | Type | Description | Example |
---|---|---|---|
url | string | The URL where the webhooks will be sent to | https://example.com/webhooks |
events | object Events | The subscribed events, you do not need to send every event but send the ones you want to enable |
Optional Request Values
Key | Type | Description | Example |
---|---|---|---|
secret_token | string | The secret token which will be sent in the Auth-Token header of each request | secretToken123 |
options | object Options | Extra options for the webhook |
Example Request
POST /v1/accounts/3584a197b5a9/orders
{
"url": "https://example.com/webhooks",
"secret_token": "secret_token123",
"events": {
"driver_location_updated": true,
"order_status_updated": true,
"driver_eta_updated": true,
"order_assigned": true,
"order_unassigned": true,
"delivery_status_updated": true,
"item_status_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"analytics_report_ready": true,
"driver_shift_updated": true,
"order_preparation_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"order_kds_print_request": false
},
"options": {
"skip_unassigned_if_assigned_to_other_task_group": true
}
}
Example Response
{
"uuid": "DPTCye18PXXAG2gv",
"url": "https://example.com/webhooks",
"secret_token": "secret_token123",
"enabled": true,
"events": {
"driver_location_updated": true,
"order_status_updated": true,
"driver_eta_updated": true,
"order_assigned": true,
"order_unassigned": true,
"delivery_status_updated": true,
"item_status_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"analytics_report_ready": true,
"driver_shift_updated": true,
"order_preparation_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"order_kds_print_request": false
},
"options": {
"skip_unassigned_if_assigned_to_other_task_group": true
}
}