Webhooks
List your webhooks.
Register a webhook URL that receives shipment status changes.
Registers an HTTPS URL of your system. Whenever the status of one of your shipments changes, we POST a JSON event to it shortly after we process the tracking data of the carrier, so you do not have to poll the tracking endpoint.
Events. The only event so far is shipment.status_changed. It fires when the aggregated Zaslat status of a shipment changes (for example INTRANSIT → ONDELIVERY → DELIVERED), not for every tracking row the carrier reports. The payload is described in the callback below and uses the same status dictionary as the tracking endpoint. It carries only identifiers and the new status; fetch the shipment detail through the API when you need more.
Signature. Every request carries the X-Zaslat-Signature header with the value sha256=<hex>, where <hex> is the HMAC-SHA256 of the raw request body computed with the webhook secret. Recompute it on your side from the exact bytes you received and compare with a constant-time comparison; reject the request when it does not match. We never send your API key to the webhook URL. The X-Zaslat-Event and X-Zaslat-Event-Id headers duplicate the event and eventId fields of the body for routing.
Delivery and retries. Your endpoint must answer with a 2xx status within 10 seconds. A 5xx response, 408, 429, a timeout or a connection error is retried with an increasing delay: 1, 5, 15 and 30 minutes, then 1, 2, 4, 8, 12 and 24 hours after the previous attempt (10 retries in total), always with the same eventId, so deduplicate by eventId on your side. Any other 4xx response is treated as a permanent rejection of that event and is not retried. A redirect is never followed and counts as a failure.
Automatic pause. When every delivery attempt has been failing for 24 hours in a row, we set active to false, record the time in disabledAt and send an e-mail to the account notification address. Events that occur while a webhook is paused are not sent and are not replayed later. Fix the endpoint and re-enable the webhook with the update endpoint (active: true), which also resets failureCount. The deliveries endpoint shows the recent attempts with status codes and errors.
URL rules. Only https:// URLs without credentials are accepted and the host must resolve to a public IP address. Private, loopback and link-local addresses (for example 10.x, 192.168.x, 127.0.0.1, 169.254.x) are refused with 400.
Limits. At most 10 webhooks per account. The same URL can be registered only once per event (409).
Secret. You can supply your own signing secret (16 to 128 characters). When you omit it, we generate a random one and return it in the secret field of this response only. It cannot be retrieved later; to rotate it, delete the webhook and create it again.
Register a webhook URL that receives shipment status changes. › Request Body
urlHTTPS URL we POST the events to. It must be reachable from the internet: private, local and reserved addresses are refused.
eventEvent to subscribe to. Currently the only event is shipment.status_changed (default).
secretYour own signing secret, 16 to 128 characters. When omitted, we generate a random secret and return it once in the response.
Register a webhook URL that receives shipment status changes. › Responses
Ok.
idWebhook ID, use it in the detail, update, deliveries and delete endpoints
urlURL the events are sent to
eventSubscribed event
activeWhether events are currently being sent. false either because you paused the webhook or because we disabled it after it kept failing (see disabledAt).
createdAtWhen the webhook was created (ISO 8601)
failureCountConsecutive failed delivery attempts since the last successful delivery. Reset to 0 by a success or by re-enabling the webhook.
lastSuccessAtLast successful delivery (ISO 8601), null when nothing was delivered yet
lastFailureAtLast failed delivery attempt (ISO 8601), null when none failed yet
disabledAtWhen we disabled the webhook automatically because deliveries had been failing for 24 hours (ISO 8601). null while the webhook is active or when you paused it yourself. Cleared when you re-enable the webhook.
secretSigning secret used for the X-Zaslat-Signature header. Returned only once, in the response of the create endpoint; everywhere else it is null. Store it, it cannot be retrieved later.
Get one webhook.
Returns a single webhook of your account. The signing secret is not included.
path Parameters
idWebhook ID from the create or list response
Get one webhook. › Responses
Ok.
idWebhook ID, use it in the detail, update, deliveries and delete endpoints
urlURL the events are sent to
eventSubscribed event
activeWhether events are currently being sent. false either because you paused the webhook or because we disabled it after it kept failing (see disabledAt).
createdAtWhen the webhook was created (ISO 8601)
failureCountConsecutive failed delivery attempts since the last successful delivery. Reset to 0 by a success or by re-enabling the webhook.
lastSuccessAtLast successful delivery (ISO 8601), null when nothing was delivered yet
lastFailureAtLast failed delivery attempt (ISO 8601), null when none failed yet
disabledAtWhen we disabled the webhook automatically because deliveries had been failing for 24 hours (ISO 8601). null while the webhook is active or when you paused it yourself. Cleared when you re-enable the webhook.
secretSigning secret used for the X-Zaslat-Signature header. Returned only once, in the response of the create endpoint; everywhere else it is null. Store it, it cannot be retrieved later.
Pause, resume or re-point a webhook.
Changes the URL and/or the active flag of a webhook. Send only the fields you want to change; a body without any field is refused with 400. A paused webhook (active: false) keeps its configuration but receives no events until it is resumed; events from the paused period are not replayed. Setting active: true also resets failureCount and disabledAt, use it to re-enable a webhook we paused automatically. The new URL must follow the same rules as on create.
path Parameters
idWebhook ID from the create or list response
Pause, resume or re-point a webhook. › Request Body
urlNew HTTPS URL of the webhook. The same rules as on create apply. Omit to keep the current URL.
activefalse pauses the webhook (no events are sent), true resumes it. Omit to keep the current state.
Pause, resume or re-point a webhook. › Responses
Ok.
idWebhook ID, use it in the detail, update, deliveries and delete endpoints
urlURL the events are sent to
eventSubscribed event
activeWhether events are currently being sent. false either because you paused the webhook or because we disabled it after it kept failing (see disabledAt).
createdAtWhen the webhook was created (ISO 8601)
failureCountConsecutive failed delivery attempts since the last successful delivery. Reset to 0 by a success or by re-enabling the webhook.
lastSuccessAtLast successful delivery (ISO 8601), null when nothing was delivered yet
lastFailureAtLast failed delivery attempt (ISO 8601), null when none failed yet
disabledAtWhen we disabled the webhook automatically because deliveries had been failing for 24 hours (ISO 8601). null while the webhook is active or when you paused it yourself. Cleared when you re-enable the webhook.
secretSigning secret used for the X-Zaslat-Signature header. Returned only once, in the response of the create endpoint; everywhere else it is null. Store it, it cannot be retrieved later.
Recent delivery attempts of a webhook.
Returns the last 50 delivery attempts of the webhook, newest first: event, attempt number, HTTP status your endpoint returned, whether it succeeded and the error description. Use it to debug your endpoint. Attempts older than 30 days are removed.
path Parameters
idWebhook ID from the create or list response
Recent delivery attempts of a webhook. › Responses
Ok.
Most recent delivery attempts of the webhook, newest first
Send a test event to a webhook.
Immediately POSTs one shipment.status_changed event with made-up shipment data and "test": true to the webhook URL, signed exactly like a real event, and returns what your endpoint answered. Use it to verify your signature check and parsing before real shipments start flowing. The test is sent even when the webhook is paused and it never changes the health counters or triggers the automatic pause; the attempt is recorded in the deliveries endpoint with "test": true. A failed test is still a 200 response here, look at delivered, statusCode and error.
Rate limit. At most 10 test events per 60 seconds per account; the state is returned in the X-Rate-Limit-Limit, X-Rate-Limit-Remaining and X-Rate-Limit-Reset headers, exceeding it returns 429.
path Parameters
idWebhook ID from the create or list response
Send a test event to a webhook. › Responses
Ok.
eventIdeventId of the test event that was sent, look it up in the deliveries endpoint
deliveredtrue when your endpoint answered with a 2xx status
statusCodeHTTP status your endpoint returned, null when it did not respond (timeout, connection error)
errorWhy the delivery failed, null on success
Delete a webhook.
Removes the webhook permanently. Events that are already queued for delivery to it are dropped. Use the update endpoint with active: false when you only want to pause it.
path Parameters
idWebhook ID from the create or list response
Delete a webhook. › Responses
Ok. No content.