Skip to content

Delhivery waybills ​

DelhiveryClient exposes two waybill fetch methods. Both inject your clientName and token as cl, client_name, and token query parameters.

fetchWaybill() ​

Fetches one waybill from /waybill/api/fetch/json/.

ts
const result = await sdk.fetchWaybill();
console.log(result.waybill);
FieldTypeNotes
waybillstring | nullFetched waybill number
rawunknownOriginal Delhivery response

fetchWaybills(params) ​

Fetches waybills in bulk from /waybill/api/bulk/json/.

FieldTypeRequiredNotes
action"next" | "fetch"noDefaults to "next"
countnumbernoNumber of waybills to fetch
wbnstringnoSpecific waybill to fetch
ts
const bulk = await sdk.fetchWaybills({ count: 10 });

console.log(bulk.waybills);

DelhiveryBulkWaybillResponse exposes waybills and raw. Check raw when a request succeeds but waybills is empty; Delhivery may report the reason in the provider payload.