TrackingService class (accessed via client.tracking) answers the question “where is my parcel right now?”. It offers a public lookup by tracking number (safe to call from a customer-facing page with a publishable key) and a detailed events timeline for shipments you own.
trackShipment
Looks up a shipment by its tracking number and returns its current status plus, while the parcel is moving, the rider’s live location.This is a public endpoint — it works with a publishable key (
tybrite_pk_*), so you can safely build a “track my order” page in the browser without exposing a secret key. It only reveals delivery-progress fields, not your full order data.getShipmentTracking
Returns the full chronological events timeline for a shipment you own — every status transition from booking through delivery. Use this for detailed audit views or to drive a stepper UI.This is keyed on the shipment id rather than the tracking number, so it identifies a shipment in
your own account and returns its complete record. Either key type can read it;
trackShipment remains the endpoint for a page shown to a recipient, since it
needs only the tracking number and returns a narrower view.
The two views differ in shape as well as in what they expose: an event here carries
created_at/event_type and coordinates, where the public view flattens the same record to
timestamp/status and a text location.
