Parcel tracking (add-on)
A parcel's tracking history, asking the carrier again, and the webhook the aggregator posts to.
Tracking reads take kahunacart.orders.view. The webhook routes are unauthenticated: the secret in the path is the credential, compared in constant time, and a wrong one answers 404. See Tracking.
Read a parcels tracking
/api/v1/kahunacart/shipping/labels/{id}/tracking
Every tracking event recorded for one parcel, oldest first, with the carrier's own wording beside each normalised status and a flag saying whether the event needs somebody to act on it. Reads what has already been written and asks no carrier.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The label's id. |
Ask the carrier for fresh tracking
/api/v1/kahunacart/shipping/labels/{id}/tracking/refresh
Ask the carrier where a parcel is, now, and write anything new. Costs one carrier call. An event already recorded is not written twice, so this is safe to call repeatedly.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The label's id. |
Receive a tracking update
/api/v1/kahunacart/shipping/public/webhook/{aggregator}/{secret}
Where the aggregator tells the store a parcel has moved. {aggregator} names the driver and {secret} is the store's own webhook secret. The update is logged and queued, and the job reads the parcel again with the store's own key before anything is recorded. No tool: a carrier posts to this, nobody else.
Probe the tracking webhook
/api/v1/kahunacart/shipping/public/webhook/{aggregator}/{secret}
Several aggregators check an address with a HEAD before they will save it. Answered 200 with no body.
The webhook caps a body at 256 KB, logs every delivery for thirty days, and makes no outbound call: it checks, logs, queues and answers 200. A body nobody can read still gets a 200, because an aggregator treats a 4xx as a reason to retry for days.
On a store running the demo carrier there is one more public route, GET /kahunacart/shipping/public/demo-track/{number}, the tracking page the simulation serves for itself. See Developers.