Webhooks
Webhooks allow you to receive immediate updates from the system rather than polling.
Index
See your current list of active webhooks.
Index - Service Provider Endpoint
GET
/webhooks
Index - Merchant Endpoint
GET
/merchants/{MERCHANT_ID}/webhooks
Index - Response
The response format is the same for both endpoints.
Example Response
{
"webhooks": [
{
"id": 70,
"created_at": "2022-03-28T10:34:07.000000Z",
"updated_at": "2022-03-28T10:34:07.000000Z",
"url": "test.com\/webhook",
"types": {
"invoice": {
"created": true
},
"inbound_shipment": {
"notes_updated": false,
"created": false,
"shipped": false,
"received": false
},
"outbound_shipment": {
"notes_updated": false,
"created": false,
"shipped": false,
"closed": false
},
"order": {
"shipped": false
}
},
"secret": "nxi8Mp4n56yLr3q37WZvjCfjqaqTTWpkVSeMfRCQ"
}
]
}
Create
Create - Service Provider Endpoint
POST
/webhooks
Parameter | Type | Examples | Description |
---|---|---|---|
url
| string | https://test.com/webhook | The URL you would like to send webhooks to |
types
| object | {"invoice": {"created": true}} | The types of webhooks you would like us to send to this endpoint. See the Types page. |
types.invoice.created
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.notes_updated
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.shipped
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.shipped
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.received
| boolean | false | Enable / disable this webhook type |
types.outbound_shipment.created
| boolean | false | Enable / disable this webhook type |
types.outbound_shipment.shipped
| boolean | false | Enable / disable this webhook type |
types.outbound_shipment.notes_updated
| boolean | false | Enable / disable this webhook type |
types.order.shipped
| boolean | false | Enable / disable this webhook type |
types.order.created
| boolean | false | Enable / disable this webhook type |
Create - Merchant Endpoint
Use the same parameters as the service provider endpoint.
POST
/merchants/{MERCHANT_ID}/webhooks
Create - Response
The response format is the same for both endpoints.
Example Response
{
"message": "Webhook created",
"webhook": {
"id": 70,
"created_at": "2022-03-28T10:34:07.000000Z",
"updated_at": "2022-03-28T10:34:07.000000Z",
"url": "test.com\/webhook",
"types": {
"invoice": {
"created": true
},
"inbound_shipment": {
"notes_updated": false,
"created": false,
"shipped": false,
"received": false
},
"outbound_shipment": {
"notes_updated": false,
"created": false,
"shipped": false,
"closed": false
},
"order": {
"shipped": false
}
},
"secret": "nxi8Mp4n56yLr3q37WZvjCfjqaqTTWpkVSeMfRCQ"
}
}
Update
PUT
/webhooks/{WEBHOOK_ID}
Parameter | Type | Examples | Description |
---|---|---|---|
url
| string | https://test.com/webhook | The URL you would like to send webhooks to |
types
| object | {"invoice": {"created": true}} | The types of webhooks you would like us to send to this endpoint. See the Types page. |
types.invoice.created
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.notes_updated
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.shipped
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.shipped
| boolean | false | Enable / disable this webhook type |
types.inbound_shipment.received
| boolean | false | Enable / disable this webhook type |
types.outbound_shipment.created
| boolean | false | Enable / disable this webhook type |
types.outbound_shipment.shipped
| boolean | false | Enable / disable this webhook type |
types.outbound_shipment.notes_updated
| boolean | false | Enable / disable this webhook type |
types.order.shipped
| boolean | false | Enable / disable this webhook type |
types.order.created
| boolean | false | Enable / disable this webhook type |
Example Response
{
"message": "Webhook updated",
"webhook": {
"id": 70,
"created_at": "2022-03-28T10:34:07.000000Z",
"updated_at": "2022-03-28T10:34:07.000000Z",
"url": "test.com\/webhook",
"types": {
"invoice": {
"created": true
},
"inbound_shipment": {
"notes_updated": false,
"created": false,
"shipped": false,
"received": false
},
"outbound_shipment": {
"notes_updated": false,
"created": false,
"shipped": false,
"closed": false
},
"order": {
"shipped": false
}
},
"secret": "nxi8Mp4n56yLr3q37WZvjCfjqaqTTWpkVSeMfRCQ"
}
}