Tracking
Track shipments using the trackShipment method. B2C shipments are tracked by AWB, while B2B shipments are tracked by LRN.
Imports
Section titled “Imports”import { BigshipClient, isSuccessResponse,} from '@agamya/bigship-sdk';Track by AWB (B2C)
Section titled “Track by AWB (B2C)”const tracking = await client.trackShipment('13090318586270', 'awb');if (isSuccessResponse(tracking)) { console.log('Status:', tracking.data);}Track by LRN (B2B)
Section titled “Track by LRN (B2B)”B2B shipments use LRN (Lorry Receipt Number) instead of AWB.
const tracking = await client.trackShipment('LR-6554921441', 'lrn');if (isSuccessResponse(tracking)) { console.log('Status:', tracking.data);}Method Signature
Section titled “Method Signature”trackShipment(id: string, type: 'awb' | 'lrn'): Promise<ApiResponse<TrackingData>>| Parameter | Type | Description |
|---|---|---|
id |
string |
AWB number or LRN |
type |
'awb' or 'lrn' |
Identifier type |