Get webhooks responses

Possible responses when retrieving webhooks:

Status Meaning Description
200 OK Returns all webhooks configured for the authenticated merchant. Returns an empty array if no webhooks exist.
401 Unauthorized The API returns this when the API key given doesn’t match a valid merchant account.
403 Forbidden The API returns this when the API secret doesn’t have the required permission.

To perform this operation, authenticate with an authentication token.

Response field reference

Name Type Description
publishable_id string Stable identifier for the webhook, prefixed twhs_.
webhook_url string The URL receiving webhook events.
enabled_states string[] Order states that trigger this webhook.
hide_delivery_address boolean Whether the payload omits the delivery address.
hide_receiver_details boolean Whether the payload omits receiver details.
enabled boolean Whether the webhook is currently active.
headers object[] Custom HTTP headers (key / value). Header values are always masked as *****.

Examples

Successful get webhooks response

The API returns all webhooks for the merchant in a single array—there is no pagination.

{
  "webhooks": [
    {
      "publishable_id": "twhs_abc123xyz",
      "webhook_url": "https://example.com/shippit-webhook",
      "enabled_states": ["ready_for_pickup", "in_transit", "completed"],
      "hide_delivery_address": false,
      "hide_receiver_details": false,
      "enabled": true,
      "headers": [
        { "key": "X-Custom-Token", "value": "*****" }
      ]
    },
    {
      "publishable_id": "twhs_def456uvw",
      "webhook_url": "https://example.com/another-webhook",
      "enabled_states": ["order_placed"],
      "hide_delivery_address": true,
      "hide_receiver_details": false,
      "enabled": false,
      "headers": []
    }
  ]
}

Custom header values are always masked (*****) in all responses—they’re write-only and you can’t retrieve them after creation.

Unknown error occurs

Shippit may return this if it has trouble with the combination of the input or merchant account configuration.

{
  "error": "system",
  "error_description": "An unknown error has occurred."
}