Skip to Content
FastracDocs
API reference

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.

Header Parameters

user-agent*string

Always Fastrac-Webhook-Client/1.0.

x-webhook-id*string

Unique event ID. The same on every retry of one event; use it to drop duplicates.

Formatuuid
x-webhook-timestamp*string

Unix time in seconds when this attempt was sent. Part of the signed string; reject requests more than 300 seconds old.

Match^[0-9]+$
x-webhook-signature*string

keyId=<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*string

The event name.

x-webhook-schema-version*string

Version of the event body format.

x-webhook-attempt*string

Delivery attempt number, starting at 1.

Match^[0-9]+$

Request Body

application/json
  1. body
shipment_id*integer

Numeric shipment ID (the id in shipment responses).

shipment_code*string
order_id*integer

Numeric order ID (the order id, not its code).

status*string
Value in"PENDING_PICKUP""PENDING_DROPOFF"
tracking_id*string

The courier's booking reference. Usually equal to airway_bill.

tracking_url*|
Formaturi
airway_bill*string|null

Response Body

Any 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.

Example Requests
POST/shipment.dispatched
Request Body
application/json
{  "shipment_id": 18452,  "shipment_code": "SHP-261120-K9M2Q7",  "order_id": 9021,  "status": "PENDING_DROPOFF",  "tracking_id": "CM12345678901",  "tracking_url": null,  "airway_bill": "CM12345678901"}
Header Parameters
{  "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?