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_placed
  • ready_for_pickup
  • in_transit
  • with_driver
  • delivery_attempted
  • awaiting_collection
  • await_collection
  • awaiting_drop_off
  • damaged
  • lost
  • insufficient_address
  • returned_to_sender
  • delivery_failed
  • with_customs
  • customs_on_hold
  • customs_awaiting_payment
  • customs_failed
  • return_booked
  • return_booking_failed
  • parcel_completed
  • partially_completed
  • cancelled
  • completed
  • return_requested
  • invalidated
  • pickup_failed
  • untrackable

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.