Create webhook parameters
POST /merchants/webhooks
The parameters for creating a webhook through the webhooks API are:
| Name | Type | Required | Description |
|---|---|---|---|
webhook_url | string | true | The URL that receives webhook events. Must begin with http:// or https://. Max 2048 characters. |
enabled_states | string[] | true | The list of order states that trigger this webhook. Must contain at least one value. See valid states below. |
hide_delivery_address | boolean | false | Omit the delivery address from webhook payloads. Defaults to false. |
hide_receiver_details | boolean | false | Omit receiver details from webhook payloads. Defaults to false. |
enabled | boolean | false | Whether the webhook is active. Defaults to true. |
headers | Array, see table | false | Custom HTTP headers to include in outgoing webhook requests. Max 6 headers. Header keys must be unique. |
Valid enabled_states values
order_placedready_for_pickupin_transitwith_driverdelivery_attemptedawaiting_collectionawait_collectionawaiting_drop_offdamagedlostinsufficient_addressreturned_to_senderdelivery_failedwith_customscustoms_on_holdcustoms_awaiting_paymentcustoms_failedreturn_bookedreturn_booking_failedparcel_completedpartially_completedcancelledcompletedreturn_requestedinvalidatedpickup_faileduntrackable
Request schema for headers
| Name | Type | Required | Description |
|---|---|---|---|
key | string | true | The header name. No whitespace allowed. Must be unique across all headers in the array. |
value | string | true | The header value. Canβt be empty. |
To perform this operation, authenticate with an authentication token.