Skip to content

Shiprocket tracking ​

ShiprocketClient exposes three tracking methods. They return the same TrackByAWBResponse, but each calls a different Shiprocket endpoint.

Methods ​

MethodArgumentEndpoint
trackByAWB(awbCode)AWB string/courier/track/awb/<awb>
trackByShipmentId(shipmentId)Numeric shipment id/courier/track/shipment/<id>
trackByOrderId(orderId)Order reference string/orders/track/<orderId>
ts
const tracking = await sdk.trackByAWB("1234567890");

console.log(tracking.tracking_data.track_status);
console.log(tracking.tracking_data.track_url);

Return type ​

FieldNotes
tracking_data.track_statusNumeric tracking status
tracking_data.shipment_statusNumeric shipment status
tracking_data.shipment_trackShipment-level events
tracking_data.shipment_track_activitiesScan history
tracking_data.track_urlCustomer-facing tracking page

Use trackByAWB() when you have the AWB, trackByShipmentId() when you stored Shiprocket's numeric shipment id, and trackByOrderId() when you only have your own order reference.