Webhooks
Receive signed order and tracking events at your own endpoint, and verify each request with HMAC-SHA256.
Webhooks let RouteOne call your server whenever an order or shipment changes, so you do not have to keep polling the tracking endpoint. Each payload is signed with a secret you choose, so you can check that it really came from RouteOne.
Set up a webhook
- 1Open Settings and choose Webhooks.
- 2Click Setup New Webhook.
- 3Choose the Event: Tracking Update or Order Update. Add a Description if you like.
- 4Enter your Endpoint URL. It must be a public http or https address; local and private addresses are refused.
- 5Set a Signing Secret of at least 8 characters. Store it on your server.
- 6Click Save Webhook, or Save & Test to save it and send a sample request straight away.
From the list you can Test a webhook again, Pause and Enable it, or delete it.
Events and payloads
RouteOne sends a POST with a JSON body. Any 2xx response marks it delivered. Otherwise it is retried, up to 5 attempts. Requests time out after 10 seconds, so reply quickly and do heavy work afterwards.
| Event type | When it fires | Body fields |
|---|---|---|
ORDER_UPDATE | An order is created (from the API, dashboard, import or a channel) or cancelled. Events: created, cancelled. | type, event, timestamp, order_id (your reference), order_ref_id (RouteOne id), status, and shipment_id on created. |
TRACKING_UPDATE | A shipment's status changes. Event is one of SHIPPED, IN_TRANSIT, OUT_FOR_DELIVERY, DELIVERED, RTO, NDR, CANCELLED, or the raw status for other changes. | type, event, timestamp, shipment_id, awb, status, courier, order_id. |
The Test button sends a sample body with sample: true and event: "test", so you can wire up your receiver before real events arrive.
Headers
X-RouteOne-Eventis the event name.X-RouteOne-Deliveryis unique per delivery. Use it to ignore duplicates when a retry arrives.X-RouteOne-Signatureissha256=followed by the hex HMAC-SHA256 of the raw request body, using your signing secret.
Verify the signature
- 1Read the raw request body before parsing the JSON.
- 2Compute the HMAC-SHA256 of that body with your signing secret and prefix it with
sha256=. - 3Compare it with
X-RouteOne-Signatureusing a constant-time comparison. Reject the request if it does not match. - 4Check the body's
timestampand reject events older than a few minutes, to block replays.
In Node.js: const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody, "utf8").digest("hex"), then compare with crypto.timingSafeEqual.
GET /track. See API endpoints.Related guides
Still need help? Email support@routeone.app with your order ID or AWB, or raise a ticket from Help Center › Ticket in the app.
