Skip to Content
FastracDocs
API reference

Track a shipment

GET
/b2b/shipments/track/{trackingCode}

Asks the courier for the latest tracking events and returns them merged with the stored history. If the courier reports a new status, the shipment is updated (and the matching webhook is sent) as part of this call. If the courier can't be reached, the stored history is returned.

Pass either the shipment code or the courier's airway bill. A shipment can be tracked only after the courier has assigned an airway bill.

Prefer webhooks for status changes; call this when a user opens a tracking page.

Requires the READ_ORDER permission.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An access token from the OAuth2 client-credentials grant. Exchange your API key (client_id + client_secret) at the token endpoint and send Authorization: Bearer <access_token>.

Path Parameters

trackingCode*string

A shipment code (SHP-…) or the courier's airway bill.

Response Body

Current status and full tracking history, oldest event first.

application/json
  1. response
statusCode*integer
message*string
data*
Example Request
curl -X GET 'https://sandbox-api.fastrac.example/b2b/shipments/track/string'
Example Response
{  "statusCode": 200,  "message": "Request successful.",  "data": {    "currentStatus": "IN_TRANSIT",    "trackingUrl": null,    "courier": "JNE",    "service": "JNE Reguler",    "histories": [      {        "timestamp": "2026-11-20T03:12:00.000Z",        "status": "PENDING_DROPOFF",        "description": "Shipment created, waiting for drop-off"      },      {        "timestamp": "2026-11-20T08:40:00.000Z",        "status": "IN_TRANSIT",        "description": "Paket diterima di counter agen",        "location": "JAKARTA SELATAN"      },      {        "timestamp": "2026-11-20T21:05:00.000Z",        "status": "IN_TRANSIT",        "description": "Paket diberangkatkan ke kota tujuan",        "location": "JAKARTA"      }    ]  }}

Was this page helpful?