DOCS

Webhooks

/

Listen to events with webhooks

Real-time event notifications for your Zonos integration.

Webhooks provide a way for Zonos to proactively notify your external systems whenever certain events take place. When the subscribed event occurs, Zonos will send an HTTP POST request to the webhook URL you specify. The request body will contain the event details, allowing your system to handle the event programmatically.

Webhooks are useful for integrating Zonos with other platforms, triggering automated workflows, and keeping data in sync across systems in real-time. For example, you could use webhooks to:

  • Update your order management system when an order is created in Zonos
  • Notify your fulfillment provider when a shipment is canceled
  • Log status changes of international orders for auditing purposes

Managing webhooks 

Creating webhooks

To create a webhook via the API:

GraphQL

1
2
3
4
5
6
7
8
9
10
11
12
13
14
mutation {
  webhookCreate(
    input: {
      url: "https://example.com/webhooks/zonos"
      type: ORDER_CREATED
      status: ENABLED
    }
  ) {
    id
    url
    type
    status
  }
}

Edit webhook details

To edit an existing webhook via the API:

GraphQL

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mutation {
  webhookUpdate(
    input: {
      id: "webhook-id"
      url: "https://example.com/webhooks/zonos"
      type: ORDER_CREATED
      status: ENABLED
    }
  ) {
    id
    url
    type
    status
  }
}

View webhook logs

To view webhook logs via the API:

GraphQL

1
2
3
4
5
6
7
8
9
10
11
12
13
query {
  webhookLogs(first: 20, after: "yyyyyyy", filter: { type: ORDER_CREATED }) {
    edges {
      node {
        id
        type
        url
        createdAt
        responseStatus
      }
    }
  }
}

Event types 

Zonos supports the following event types that you can subscribe to:

Webhook TypeDescription
ORDER_CREATEDTriggered when a new order is created
ORDER_CANCELEDTriggered when an order is canceled
ORDER_STATUS_CHANGEDTriggered when an order's status changes
SHIPMENT_CREATEDTriggered when a new shipment is created for an order
SHIPMENT_CANCELEDTriggered when a shipment is canceled

Was this page helpful?