Webhooks Object
Example Webhooks Object
status_updated
parameter of the webhooks object. The body will mimic the response received from the standard GET https://api.zinc.io/v1/orders/<request_id>
request. A webhook will also be sent if order fails, gets placed, or if tracking gets updated.
Note that the case_updated
webhook is specifically for ZMA order cases.
Attributes
Attribute | Type | Description |
---|---|---|
request_succeeded | String | The webhook URL to send data to when a request succeeds |
order_placed | String | (deprecated) Synonym for request_succeeded (placing orders call only) |
request_failed | String | The webhook URL to send data to when a request fails |
order_failed | String | (deprecated) Synonym for request_failed (placing orders call only) |
tracking_obtained | String | The webhook URL to send data to when ALL tracking for an order is retrieved (placing orders call only) |
tracking_updated | String | The webhook URL to send data to when ANY tracking for an order is retrieved (placing orders call only) |
status_updated | String | The webhook URL to send data to when the status of a request is updated |
case_updated | String | The webhook URL to send data to when a ZMA case associated with the order receives an update |
Additional Notes
Multiple Webhooks
You can optionally pass an Array of webhooks instead of a String, and Zinc will hit all of the webhooks.Delivery Semantics
Note that webhooks have “at least once” delivery semantics and may be called more than one time each. If you need to do something only once on an event (for example, sending an “order completed” email in response torequest_succeeded
), you should deduplicate in your own application.
Security Considerations
Webhooks are not signed, but it is possible to increase webhook security by including a secret query parameter or HTTP basic auth credentials in the webhook, like the following:/v1/orders/:order_id
API endpoint.