Update webhook parameters

PATCH /merchants/webhooks/:publishable_id

The parameters for updating a webhook through the webhooks API are:

Name In Type Required Description
publishable_id path string true The publishable_id of the webhook to update (prefixed twhs_). Obtained from the GET or POST response.

All body fields are optional—only the fields you provide are updated, and omitted fields stay unchanged.

Name In Type Required Description
webhook_url body string false New URL for the webhook. Must begin with http:// or https://. Max 2048 characters.
enabled_states body string[] false Replaces the full list of order states. Must contain at least one value. Duplicates are silently removed. See valid states below.
hide_delivery_address body boolean false Whether to omit the delivery address from webhook payloads.
hide_receiver_details body boolean false Whether to omit receiver details from webhook payloads.
enabled body boolean false Whether the webhook is active.
headers body object[] false Replaces all existing custom headers. Pass an empty array to remove all headers. Each object requires a key (string, no whitespace) and a value (string, non-empty). Max 6 headers, keys must be unique. Omit this field entirely to leave existing headers untouched.

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

To perform this operation, authenticate with an authentication token.