shipment.dispatched
The courier accepted the booking and assigned an airway bill. For API orders this arrives right after Create an order returns.
This event has its own flat body, unlike the other shipment events: shipment_id and
order_id are numeric IDs, and status is PENDING_PICKUP or PENDING_DROPOFF.
user-agent*stringAlways Fastrac-Webhook-Client/1.0.
x-webhook-id*stringUnique event ID. The same on every retry of one event; use it to drop duplicates.
uuidx-webhook-timestamp*stringUnix time in seconds when this attempt was sent. Part of the signed string; reject requests more than 300 seconds old.
^[0-9]+$x-webhook-signature*stringkeyId=<keyId>,sig=<hex>, where sig is
hex(HMAC_SHA256(secret, "<x-webhook-timestamp>.<x-webhook-id>.<hex(SHA256(raw body))>")).
Compute it on the raw request bytes and compare in constant time.
x-webhook-event-type*stringThe event name.
x-webhook-schema-version*stringVersion of the event body format.
x-webhook-attempt*stringDelivery attempt number, starting at 1.
^[0-9]+$application/json- body
shipment_id*integerNumeric shipment ID (the id in shipment responses).
shipment_code*stringorder_id*integerNumeric order ID (the order id, not its code).
status*string"PENDING_PICKUP""PENDING_DROPOFF"tracking_id*stringThe courier's booking reference. Usually equal to airway_bill.
tracking_url*|uriairway_bill*string|nullAny 2xx within your endpoint's timeoutMs (default 10 seconds) marks the event delivered.
The response body is ignored. Answer quickly and process the event asynchronously.
{ "shipment_id": 18452, "shipment_code": "SHP-261120-K9M2Q7", "order_id": 9021, "status": "PENDING_DROPOFF", "tracking_id": "CM12345678901", "tracking_url": null, "airway_bill": "CM12345678901"}{ "user-agent": "string", "x-webhook-id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "x-webhook-timestamp": "string", "x-webhook-signature": "string", "x-webhook-event-type": "shipment.dispatched", "x-webhook-schema-version": "string", "x-webhook-attempt": "string"}Was this page helpful?
Set your webhook endpoint POST
Registers, or replaces, the single webhook endpoint of your organisation. Calling it again replaces the URL, secret and event types; the new secret takes effect immediately with no overlap, so deploy it to your endpoint first. **Verification challenge.** Before saving, Shipping Engine sends your URL an unsigned `POST` with `{"challenge":"<uuid>"}` (10-second timeout). Reply with any `2xx` and the body `{"challenge":"<uuid>"}` or the raw uuid. - Challenge passed: the endpoint is saved as `verified` and starts receiving events. - Challenge failed on a **new** endpoint: it is saved with `verificationStatus: failed` (still `201`) and **receives no events**. Fix your endpoint and call this again. - Challenge failed while you already have a **verified** endpoint: `422`, and the current endpoint stays active and unchanged. Always check `data.challenge.success` in the response. Requires the `MANAGE_WEBHOOKS` permission.
shipment.pending_pickup Webhook
The shipment is waiting for the courier to collect it. Also sent when an instant courier assigns a driver: `driver_name`, `driver_phone` and `driver_license_plate` are then filled.