Skip to content

API Reference

Defined in: packages/sdk/src/core/types.ts:645

Shipment data type identifiers

Bigship API documentation

Enumeration Member Value Description Defined in
AWB 1 Air Waybill - Contains AWB number and courier details packages/sdk/src/core/types.ts:647
LABEL 2 Shipping label - Contains label download URL/data packages/sdk/src/core/types.ts:649
MANIFEST 3 Manifest document - Contains manifest download URL/data packages/sdk/src/core/types.ts:651

Defined in: packages/sdk/src/errors/index.ts:30

Base API error with additional context information

try {
await client.addSingleOrder(orderData);
} catch (error) {
if (error instanceof BigshipApiError) {
console.log('Request ID:', error.requestId);
console.log('Endpoint:', error.endpoint);
console.log('Response:', error.responseBody);
}
}
new BigshipApiError(
message: string,
statusCode: number,
options?: BigshipApiErrorOptions): BigshipApiError;

Defined in: packages/sdk/src/errors/index.ts:35

string

number

BigshipApiErrorOptions = {}

BigshipApiError

BigshipError.constructor

Property Modifier Type Description Inherited from Defined in
apiResponse? readonly BigshipErrorData - BigshipError.apiResponse packages/sdk/src/errors/BigshipError.ts:33
cause? public unknown - BigshipError.cause node_modules/typescript/lib/lib.es2022.error.d.ts:26
code? readonly string - BigshipError.code packages/sdk/src/errors/BigshipError.ts:32
endpoint? readonly string - - packages/sdk/src/errors/index.ts:32
message public string - BigshipError.message node_modules/typescript/lib/lib.es5.d.ts:1077
name public string - BigshipError.name node_modules/typescript/lib/lib.es5.d.ts:1076
requestId? readonly string - - packages/sdk/src/errors/index.ts:31
responseBody? readonly unknown - - packages/sdk/src/errors/index.ts:33
stack? public string - BigshipError.stack node_modules/typescript/lib/lib.es5.d.ts:1078
statusCode readonly number - BigshipError.statusCode packages/sdk/src/errors/BigshipError.ts:31
traceId? readonly string - BigshipError.traceId packages/sdk/src/errors/BigshipError.ts:35
validationErrors? readonly Record<string, string[]> - BigshipError.validationErrors packages/sdk/src/errors/BigshipError.ts:34
stackTraceLimit static number The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. BigshipError.stackTraceLimit node_modules/@types/node/globals.d.ts:68
isAuthError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:61

boolean

BigshipError.isAuthError

isRateLimitError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:57

boolean

BigshipError.isRateLimitError

isValidationError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:53

boolean

BigshipError.isValidationError

static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Defined in: node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

BigshipError.captureStackTrace

static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;

Defined in: node_modules/@types/node/globals.d.ts:56

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

BigshipError.prepareStackTrace


Defined in: packages/sdk/src/errors/index.ts:147

Error thrown when authentication fails

try {
await client.addSingleOrder(orderData);
} catch (error) {
if (error instanceof BigshipAuthError) {
console.error('Authentication failed - check credentials');
}
}
new BigshipAuthError(message?: string, options?: Omit<BigshipApiErrorOptions, "code" | "apiResponse">): BigshipAuthError;

Defined in: packages/sdk/src/errors/index.ts:148

string = 'Authentication failed'

Omit<BigshipApiErrorOptions, "code" | "apiResponse"> = {}

BigshipAuthError

BigshipApiError.constructor

Property Modifier Type Description Inherited from Defined in
apiResponse? readonly BigshipErrorData - BigshipApiError.apiResponse packages/sdk/src/errors/BigshipError.ts:33
cause? public unknown - BigshipApiError.cause node_modules/typescript/lib/lib.es2022.error.d.ts:26
code? readonly string - BigshipApiError.code packages/sdk/src/errors/BigshipError.ts:32
endpoint? readonly string - BigshipApiError.endpoint packages/sdk/src/errors/index.ts:32
message public string - BigshipApiError.message node_modules/typescript/lib/lib.es5.d.ts:1077
name public string - BigshipApiError.name node_modules/typescript/lib/lib.es5.d.ts:1076
requestId? readonly string - BigshipApiError.requestId packages/sdk/src/errors/index.ts:31
responseBody? readonly unknown - BigshipApiError.responseBody packages/sdk/src/errors/index.ts:33
stack? public string - BigshipApiError.stack node_modules/typescript/lib/lib.es5.d.ts:1078
statusCode readonly number - BigshipApiError.statusCode packages/sdk/src/errors/BigshipError.ts:31
traceId? readonly string - BigshipApiError.traceId packages/sdk/src/errors/BigshipError.ts:35
validationErrors? readonly Record<string, string[]> - BigshipApiError.validationErrors packages/sdk/src/errors/BigshipError.ts:34
stackTraceLimit static number The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. BigshipApiError.stackTraceLimit node_modules/@types/node/globals.d.ts:68
isAuthError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:61

boolean

BigshipApiError.isAuthError

isRateLimitError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:57

boolean

BigshipApiError.isRateLimitError

isValidationError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:53

boolean

BigshipApiError.isValidationError

static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Defined in: node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

BigshipApiError.captureStackTrace

static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;

Defined in: node_modules/@types/node/globals.d.ts:56

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

BigshipApiError.prepareStackTrace


Defined in: packages/sdk/src/core/BigshipClient.ts:79

new BigshipClient(config: BigshipConfig & {
loggerAdapter?: LoggerAdapter;
}): BigshipClient;

Defined in: packages/sdk/src/core/BigshipClient.ts:87

BigshipConfig & { loggerAdapter?: LoggerAdapter; }

BigshipClient

addHeavyOrder(payload: {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2b";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}, options?: RequestOptions): Promise<{
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:348

{ company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; } = ConsigneeDetailSchema

string = ...

{ address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; } = ConsigneeAddressSchema

consignee_detail.consignee_address.address_landmark?
Section titled “consignee_detail.consignee_address.address_landmark?”

string = ...

consignee_detail.consignee_address.address_line1
Section titled “consignee_detail.consignee_address.address_line1”

string = ...

consignee_detail.consignee_address.address_line2?
Section titled “consignee_detail.consignee_address.address_line2?”

string = ...

consignee_detail.consignee_address.pincode
Section titled “consignee_detail.consignee_address.pincode”

string = ...

string = ...

consignee_detail.contact_number_secondary?
Section titled “consignee_detail.contact_number_secondary?”

string = ...

string = ...

string = ...

string = ...

{ box_details: { box_count: number; each_box_collectable_amount?: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount?: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD" | "ToPay"; shipment_invoice_amount: number; total_collectable_amount?: number; } = OrderDetailB2BSchema

{ box_count: number; each_box_collectable_amount?: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount?: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[] = ...

{ ewaybill_document_file?: string; invoice_document_file: string; } = DocumentDetailB2BSchema

order_detail.document_detail.ewaybill_document_file?
Section titled “order_detail.document_detail.ewaybill_document_file?”

string = ...

order_detail.document_detail.invoice_document_file
Section titled “order_detail.document_detail.invoice_document_file”

string = ...

string = ...

string = ...

string = ...

"Prepaid" | "COD" | "ToPay" = ...

number = ...

number = ...

"b2b" = ...

{ pickup_location_id: number; return_location_id: number; } = WarehouseDetailSchema

number = ...

number = ...

RequestOptions

Promise<{ data: string | null; message: string; responseCode: number; success: boolean; }>

When request validation fails.

When invoice ID already exists.

When API request fails

addSingleOrder(payload: {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2c";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}, options?: RequestOptions): Promise<{
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:336

{ company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; } = ConsigneeDetailSchema

string = ...

{ address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; } = ConsigneeAddressSchema

consignee_detail.consignee_address.address_landmark?
Section titled “consignee_detail.consignee_address.address_landmark?”

string = ...

consignee_detail.consignee_address.address_line1
Section titled “consignee_detail.consignee_address.address_line1”

string = ...

consignee_detail.consignee_address.address_line2?
Section titled “consignee_detail.consignee_address.address_line2?”

string = ...

consignee_detail.consignee_address.pincode
Section titled “consignee_detail.consignee_address.pincode”

string = ...

string = ...

consignee_detail.contact_number_secondary?
Section titled “consignee_detail.contact_number_secondary?”

string = ...

string = ...

string = ...

string = ...

{ box_details: { box_count: 1; each_box_collectable_amount: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file?: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD"; shipment_invoice_amount: number; total_collectable_amount?: number; } = OrderDetailB2CSchema

{ box_count: 1; each_box_collectable_amount: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[] = ...

{ ewaybill_document_file?: string; invoice_document_file?: string; } = DocumentDetailB2CSchema

order_detail.document_detail.ewaybill_document_file?
Section titled “order_detail.document_detail.ewaybill_document_file?”

string = ...

order_detail.document_detail.invoice_document_file?
Section titled “order_detail.document_detail.invoice_document_file?”

string = ...

string = ...

string = ...

string = ...

"Prepaid" | "COD" = ...

number = ...

number = ...

"b2c" = ...

{ pickup_location_id: number; return_location_id: number; } = WarehouseDetailSchema

number = ...

number = ...

RequestOptions

Promise<{ data: string | null; message: string; responseCode: number; success: boolean; }>

When request validation fails.

When invoice ID already exists.

When API request fails

addWarehouse(payload: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
address_pincode: string;
contact_number_primary: string;
}, options?: RequestOptions): Promise<{
data: | {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:297

string = ...

string = ...

string = ...

string = ...

string = ...

RequestOptions

Promise<{ data: | { address_city: string; address_country?: string; address_email_id?: string; address_landmark: string | null; address_line1: string; address_line2: string | null; address_pincode: string; address_state: string; create_date?: string; warehouse_contact_number_primary: string; warehouse_contact_person: string; warehouse_id: number; warehouse_name: string; } | null; message: string; responseCode: number; success: boolean; }>

When request validation fails

calculateRate(payload: {
box_details: {
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}[];
destination_pincode: string;
payment_type: "Prepaid" | "COD" | "ToPay";
pickup_pincode: string;
risk_type?: string;
shipment_category: "B2C" | "B2B" | "b2c" | "b2b";
shipment_invoice_amount: number;
}, options?: RequestOptions): Promise<{
data: | {
billable_weight: number;
courier_charge: number;
courier_id: number;
courier_name: string;
courier_type: string;
other_additional_charges: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name: string | null;
tat: number;
total_shipping_charges: number;
zone: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:394

{ box_count: number; each_box_dead_weight: number; each_box_height: number; each_box_length: number; each_box_width: number; }[] = ...

string = ...

"Prepaid" | "COD" | "ToPay" = ...

string = ...

string = ...

"B2C" | "B2B" | "b2c" | "b2b" = ...

number = ...

RequestOptions

Promise<{ data: | { billable_weight: number; courier_charge: number; courier_id: number; courier_name: string; courier_type: string; other_additional_charges: | { courier_charge?: number; green_tax?: number; handling_charge?: number; lr_cost?: number; oda?: number; odc_charge?: number; pickup_charge?: number; risk_type_charge?: number; state_tax?: number; to_pay?: number; warai_charge?: number; } | null; risk_type_name: string | null; tat: number; total_shipping_charges: number; zone: string; }[] | null; message: string; responseCode: number; success: boolean; }>

When request validation fails.

When API request fails

cancelShipments(awbs: string[], options?: RequestOptions): Promise<{
data: | {
cancel_response: string;
courier_id: number;
master_awb: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:384

string[]

RequestOptions

Promise<{ data: | { cancel_response: string; courier_id: number; master_awb: string; }[] | null; message: string; responseCode: number; success: boolean; }>

When request validation fails.

When API request fails

createAndFinalizeShipment(config: {
awbPollDelay?: number;
awbPollMaxAttempts?: number;
courierId: number;
options?: RequestOptions;
order: | {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2c";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}
| {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2b";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
};
}): Promise<{
awb: string;
courierName: string;
labelData: string;
manifestData: string;
orderId: string;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:545

number

Delay between AWB poll attempts in ms (default: 2000)

number

Max attempts to poll for AWB availability after manifest (default: 5)

number

RequestOptions

| { consignee_detail: { company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; }; order_detail: { box_details: { box_count: 1; each_box_collectable_amount: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file?: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD"; shipment_invoice_amount: number; total_collectable_amount?: number; }; shipment_category: "b2c"; warehouse_detail: { pickup_location_id: number; return_location_id: number; }; } | { consignee_detail: { company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; }; order_detail: { box_details: { box_count: number; each_box_collectable_amount?: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount?: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD" | "ToPay"; shipment_invoice_amount: number; total_collectable_amount?: number; }; shipment_category: "b2b"; warehouse_detail: { pickup_location_id: number; return_location_id: number; }; }

Promise<{ awb: string; courierName: string; labelData: string; manifestData: string; orderId: string; }>

When order creation or AWB polling fails

getAWB(systemOrderId: string, options?: RequestOptions): Promise<{
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:407

string

RequestOptions

Promise<{ data: | { courier_id: string; courier_name: string; lr_number: string | null; master_awb: string; } | null; message: string; responseCode: number; success: boolean; }>

When API request fails

getCourierList(shipmentCategory?: "b2c" | "b2b", options?: RequestOptions): Promise<{
data: | {
admin_status?: boolean;
courier_id: number;
courier_name: string;
courier_status?: boolean;
courier_type?: "Surface" | "Air";
shipment_category: "b2c" | "b2b";
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:272

"b2c" | "b2b"

RequestOptions

Promise<{ data: | { admin_status?: boolean; courier_id: number; courier_name: string; courier_status?: boolean; courier_type?: "Surface" | "Air"; shipment_category: "b2c" | "b2b"; }[] | null; message: string; responseCode: number; success: boolean; }>

When API request fails

getCourierTransporterList(courierId: number, options?: RequestOptions): Promise<{
data: | {
courier_id: number;
courier_name: string;
transport_id: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:279

number

RequestOptions

Promise<{ data: | { courier_id: number; courier_name: string; transport_id: string; }[] | null; message: string; responseCode: number; success: boolean; }>

When API request fails

getPaymentCategory(shipmentCategory?: "b2c" | "b2b", options?: RequestOptions): Promise<{
data: | {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:288

"b2c" | "b2b"

RequestOptions

Promise<{ data: | { payment_category: "Prepaid" | "COD" | "ToPay"; status: boolean; }[] | null; message: string; responseCode: number; success: boolean; }>

When API request fails

getShipmentData(
shipmentDataId: 1,
systemOrderId: string,
options?: RequestOptions): Promise<{
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:432

1

string

RequestOptions

Promise<{ data: | { courier_id: string; courier_name: string; lr_number: string | null; master_awb: string; } | null; message: string; responseCode: number; success: boolean; }>

When API request fails or invalid shipmentDataId

getShipmentData(
shipmentDataId: 2 | 3,
systemOrderId: string,
options?: RequestOptions): Promise<{
data: | string
| {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:433

2 | 3

string

RequestOptions

Promise<{ data: | string | { res_FileContent: string; res_FileName?: string; res_MediaType?: string; res_PrintFor?: string; } | null; message: string; responseCode: number; success: boolean; }>

When API request fails or invalid shipmentDataId

getShipmentData(
shipmentDataId: number,
systemOrderId: string,
options?: RequestOptions): Promise<ShipmentDataAnyResponse>;

Defined in: packages/sdk/src/core/BigshipClient.ts:434

number

string

RequestOptions

Promise<ShipmentDataAnyResponse>

When API request fails or invalid shipmentDataId

getShipmentDetails(orderId: string, options?: RequestOptions): Promise<{
awb: string;
courierId: string;
courierName: string;
labelData: string;
manifestData: string;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:513

string

RequestOptions

Promise<{ awb: string; courierId: string; courierName: string; labelData: string; manifestData: string; }>

When AWB, label, or manifest data is not available

getShipmentFile(
shipmentDataId: 2 | 3,
systemOrderId: string,
options?: RequestOptions): Promise<{
data: | string
| {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:414

2 | 3

string

RequestOptions

Promise<{ data: | string | { res_FileContent: string; res_FileName?: string; res_MediaType?: string; res_PrintFor?: string; } | null; message: string; responseCode: number; success: boolean; }>

When API request fails or data is null

getShippingRates(
systemOrderId: string,
shipmentCategory?: "B2C" | "B2B" | "b2c" | "b2b",
riskType?: string,
options?: RequestOptions): Promise<{
data: | {
billable_weight?: number;
cod_charge?: number;
courier_charge?: number;
courier_id: number;
courier_name: string;
courier_type?: string;
freight_charge?: number;
other_additional_charges?: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name?: string | null;
system_order_id?: number;
tat?: number;
total_shipping_charges: number;
zone?: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:376

string

"B2C" | "B2B" | "b2c" | "b2b"

string = ''

RequestOptions

Promise<{ data: | { billable_weight?: number; cod_charge?: number; courier_charge?: number; courier_id: number; courier_name: string; courier_type?: string; freight_charge?: number; other_additional_charges?: | { courier_charge?: number; green_tax?: number; handling_charge?: number; lr_cost?: number; oda?: number; odc_charge?: number; pickup_charge?: number; risk_type_charge?: number; state_tax?: number; to_pay?: number; warai_charge?: number; } | null; risk_type_name?: string | null; system_order_id?: number; tat?: number; total_shipping_charges: number; zone?: string; }[] | null; message: string; responseCode: number; success: boolean; }>

When API request fails

getWalletBalance(options?: RequestOptions): Promise<{
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:263

RequestOptions

Promise<{ data: string | null; message: string; responseCode: number; success: boolean; }>

When API request fails

getWarehouseList(
pageIndex?: number,
pageSize?: number,
options?: RequestOptions): Promise<{
data: | {
result_count: number;
result_data: {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}[];
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:305

number = 1

number = 10

RequestOptions

Promise<{ data: | { result_count: number; result_data: { address_city: string; address_country?: string; address_email_id?: string; address_landmark: string | null; address_line1: string; address_line2: string | null; address_pincode: string; address_state: string; create_date?: string; warehouse_contact_number_primary: string; warehouse_contact_person: string; warehouse_id: number; warehouse_name: string; }[]; } | null; message: string; responseCode: number; success: boolean; }>

When API request fails

login(): Promise<string>;

Defined in: packages/sdk/src/core/BigshipClient.ts:256

Promise<string>

Token management is handled automatically by TokenManager

manifestAndGetAWB(
orderId: string,
courierId: number,
options?: RequestOptions): Promise<{
awb: string;
courierName: string;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:491

string

number

RequestOptions

Promise<{ awb: string; courierName: string; }>

When AWB data is not available after manifest

manifestHeavy(payload: {
courier_id: number;
risk_type?: string;
system_order_id: string;
}, options?: RequestOptions): Promise<{
data: null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:368

number = ...

string = ...

string = ...

RequestOptions

Promise<{ data: null; message: string; responseCode: number; success: boolean; }>

When request validation fails.

When API request fails

manifestSingle(payload: {
courier_id: number;
system_order_id: string;
}, options?: RequestOptions): Promise<{
data: null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:360

number = ...

string = ...

RequestOptions

Promise<{ data: null; message: string; responseCode: number; success: boolean; }>

When request validation fails.

When API request fails

trackShipment(
trackingId: string,
trackingType?: "awb" | "lrn",
options?: RequestOptions): Promise<{
data: | {
order_detail: {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
};
scan_histories: {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}[];
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/BigshipClient.ts:450

string

"awb" | "lrn"

RequestOptions

Promise<{ data: | { order_detail: { courier_name?: string; current_tracking_datetime?: string; current_tracking_status?: string; invoice_id?: string; order_manifest_datetime?: string; tracking_id: string; tracking_type: string; }; scan_histories: { scan_datetime: string; scan_location?: string; scan_remarks?: string; scan_status: string; }[]; } | null; message: string; responseCode: number; success: boolean; }>

When API request fails

workflow(): ShipmentWorkflow;

Defined in: packages/sdk/src/core/BigshipClient.ts:623

ShipmentWorkflow

static fileToBase64DataURI(file: File): Promise<string>;

Defined in: packages/sdk/src/core/BigshipClient.ts:325

File

Promise<string>

static isValidBase64DataURI(value: string): boolean;

Defined in: packages/sdk/src/core/BigshipClient.ts:329

string

boolean


Defined in: packages/sdk/src/errors/index.ts:69

Error thrown when a duplicate invoice ID is detected

try {
await client.addSingleOrder(orderData);
} catch (error) {
if (error instanceof BigshipDuplicateInvoiceError) {
console.log('Duplicate invoice ID:', error.invoiceId);
console.log('Please use a different invoice number');
}
}
new BigshipDuplicateInvoiceError(invoiceId: string, options?: Omit<BigshipApiErrorOptions, "code">): BigshipDuplicateInvoiceError;

Defined in: packages/sdk/src/errors/index.ts:72

string

Omit<BigshipApiErrorOptions, "code"> = {}

BigshipDuplicateInvoiceError

BigshipApiError.constructor

Property Modifier Type Description Inherited from Defined in
apiResponse? readonly BigshipErrorData - BigshipApiError.apiResponse packages/sdk/src/errors/BigshipError.ts:33
cause? public unknown - BigshipApiError.cause node_modules/typescript/lib/lib.es2022.error.d.ts:26
code? readonly string - BigshipApiError.code packages/sdk/src/errors/BigshipError.ts:32
endpoint? readonly string - BigshipApiError.endpoint packages/sdk/src/errors/index.ts:32
invoiceId readonly string - - packages/sdk/src/errors/index.ts:70
message public string - BigshipApiError.message node_modules/typescript/lib/lib.es5.d.ts:1077
name public string - BigshipApiError.name node_modules/typescript/lib/lib.es5.d.ts:1076
requestId? readonly string - BigshipApiError.requestId packages/sdk/src/errors/index.ts:31
responseBody? readonly unknown - BigshipApiError.responseBody packages/sdk/src/errors/index.ts:33
stack? public string - BigshipApiError.stack node_modules/typescript/lib/lib.es5.d.ts:1078
statusCode readonly number - BigshipApiError.statusCode packages/sdk/src/errors/BigshipError.ts:31
traceId? readonly string - BigshipApiError.traceId packages/sdk/src/errors/BigshipError.ts:35
validationErrors? readonly Record<string, string[]> - BigshipApiError.validationErrors packages/sdk/src/errors/BigshipError.ts:34
stackTraceLimit static number The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. BigshipApiError.stackTraceLimit node_modules/@types/node/globals.d.ts:68
isAuthError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:61

boolean

BigshipApiError.isAuthError

isRateLimitError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:57

boolean

BigshipApiError.isRateLimitError

isValidationError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:53

boolean

BigshipApiError.isValidationError

static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Defined in: node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

BigshipApiError.captureStackTrace

static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;

Defined in: node_modules/@types/node/globals.d.ts:56

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

BigshipApiError.prepareStackTrace


Defined in: packages/sdk/src/errors/BigshipError.ts:30

Custom error class for Bigship API errors Provides structured access to error details and helper methods for error type checking

try {
await client.addSingleOrder(orderData);
} catch (error) {
if (error instanceof BigshipError) {
if (error.isValidationError()) {
console.error('Validation failed:', error.validationErrors);
}
if (error.isRateLimitError()) {
console.error('Rate limited, retry after 60s');
}
console.error('Status:', error.statusCode);
console.error('Trace ID:', error.traceId);
}
}
  • Error
new BigshipError(
message: string,
statusCode?: number,
code?: string,
apiResponse?: BigshipErrorData,
options?: {
cause?: Error;
}): BigshipError;

Defined in: packages/sdk/src/errors/BigshipError.ts:37

string

number

string

BigshipErrorData

Error

BigshipError

Error.constructor
Property Modifier Type Description Inherited from Defined in
apiResponse? readonly BigshipErrorData - - packages/sdk/src/errors/BigshipError.ts:33
cause? public unknown - Error.cause node_modules/typescript/lib/lib.es2022.error.d.ts:26
code? readonly string - - packages/sdk/src/errors/BigshipError.ts:32
message public string - Error.message node_modules/typescript/lib/lib.es5.d.ts:1077
name public string - Error.name node_modules/typescript/lib/lib.es5.d.ts:1076
stack? public string - Error.stack node_modules/typescript/lib/lib.es5.d.ts:1078
statusCode readonly number - - packages/sdk/src/errors/BigshipError.ts:31
traceId? readonly string - - packages/sdk/src/errors/BigshipError.ts:35
validationErrors? readonly Record<string, string[]> - - packages/sdk/src/errors/BigshipError.ts:34
stackTraceLimit static number The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. Error.stackTraceLimit node_modules/@types/node/globals.d.ts:68
isAuthError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:61

boolean

isRateLimitError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:57

boolean

isValidationError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:53

boolean

static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Defined in: node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

Error.captureStackTrace
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;

Defined in: node_modules/@types/node/globals.d.ts:56

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Error.prepareStackTrace

Defined in: packages/sdk/src/errors/index.ts:169

Error thrown when network request fails Uses statusCode -1 since this is not an HTTP error. Check error instanceof BigshipNetworkError rather than comparing statusCode.

new BigshipNetworkError(message: string, options?: Omit<BigshipApiErrorOptions, "code">): BigshipNetworkError;

Defined in: packages/sdk/src/errors/index.ts:170

string

Omit<BigshipApiErrorOptions, "code"> = {}

BigshipNetworkError

BigshipApiError.constructor

Property Modifier Type Description Inherited from Defined in
apiResponse? readonly BigshipErrorData - BigshipApiError.apiResponse packages/sdk/src/errors/BigshipError.ts:33
cause? public unknown - BigshipApiError.cause node_modules/typescript/lib/lib.es2022.error.d.ts:26
code? readonly string - BigshipApiError.code packages/sdk/src/errors/BigshipError.ts:32
endpoint? readonly string - BigshipApiError.endpoint packages/sdk/src/errors/index.ts:32
message public string - BigshipApiError.message node_modules/typescript/lib/lib.es5.d.ts:1077
name public string - BigshipApiError.name node_modules/typescript/lib/lib.es5.d.ts:1076
requestId? readonly string - BigshipApiError.requestId packages/sdk/src/errors/index.ts:31
responseBody? readonly unknown - BigshipApiError.responseBody packages/sdk/src/errors/index.ts:33
stack? public string - BigshipApiError.stack node_modules/typescript/lib/lib.es5.d.ts:1078
statusCode readonly number - BigshipApiError.statusCode packages/sdk/src/errors/BigshipError.ts:31
traceId? readonly string - BigshipApiError.traceId packages/sdk/src/errors/BigshipError.ts:35
validationErrors? readonly Record<string, string[]> - BigshipApiError.validationErrors packages/sdk/src/errors/BigshipError.ts:34
stackTraceLimit static number The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. BigshipApiError.stackTraceLimit node_modules/@types/node/globals.d.ts:68
isAuthError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:61

boolean

BigshipApiError.isAuthError

isRateLimitError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:57

boolean

BigshipApiError.isRateLimitError

isValidationError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:53

boolean

BigshipApiError.isValidationError

static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Defined in: node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

BigshipApiError.captureStackTrace

static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;

Defined in: node_modules/@types/node/globals.d.ts:56

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

BigshipApiError.prepareStackTrace


Defined in: packages/sdk/src/errors/index.ts:111

Error thrown when request validation fails

try {
await client.addSingleOrder(orderData);
} catch (error) {
if (error instanceof BigshipValidationError) {
console.error('Validation errors:', error.validationErrors);
// { invoice_id: ['Invalid format'], pincode: ['Invalid pincode'] }
}
}
new BigshipValidationError(
message: string,
validationErrors: Record<string, string[]>,
options?: Omit<BigshipApiErrorOptions, "code" | "apiResponse">): BigshipValidationError;

Defined in: packages/sdk/src/errors/index.ts:114

string

Record<string, string[]>

Omit<BigshipApiErrorOptions, "code" | "apiResponse"> = {}

BigshipValidationError

BigshipApiError.constructor

Property Modifier Type Description Overrides Inherited from Defined in
apiResponse? readonly BigshipErrorData - - BigshipApiError.apiResponse packages/sdk/src/errors/BigshipError.ts:33
cause? public unknown - - BigshipApiError.cause node_modules/typescript/lib/lib.es2022.error.d.ts:26
code? readonly string - - BigshipApiError.code packages/sdk/src/errors/BigshipError.ts:32
endpoint? readonly string - - BigshipApiError.endpoint packages/sdk/src/errors/index.ts:32
message public string - - BigshipApiError.message node_modules/typescript/lib/lib.es5.d.ts:1077
name public string - - BigshipApiError.name node_modules/typescript/lib/lib.es5.d.ts:1076
requestId? readonly string - - BigshipApiError.requestId packages/sdk/src/errors/index.ts:31
responseBody? readonly unknown - - BigshipApiError.responseBody packages/sdk/src/errors/index.ts:33
stack? public string - - BigshipApiError.stack node_modules/typescript/lib/lib.es5.d.ts:1078
statusCode readonly number - - BigshipApiError.statusCode packages/sdk/src/errors/BigshipError.ts:31
traceId? readonly string - - BigshipApiError.traceId packages/sdk/src/errors/BigshipError.ts:35
validationErrors readonly Record<string, string[]> - BigshipApiError.validationErrors - packages/sdk/src/errors/index.ts:112
stackTraceLimit static number The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. - BigshipApiError.stackTraceLimit node_modules/@types/node/globals.d.ts:68
isAuthError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:61

boolean

BigshipApiError.isAuthError

isRateLimitError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:57

boolean

BigshipApiError.isRateLimitError

isValidationError(): boolean;

Defined in: packages/sdk/src/errors/BigshipError.ts:53

boolean

BigshipApiError.isValidationError

static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Defined in: node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

BigshipApiError.captureStackTrace

static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;

Defined in: node_modules/@types/node/globals.d.ts:56

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

BigshipApiError.prepareStackTrace


Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:8

new ShipmentWorkflow(client: BigshipClient): ShipmentWorkflow;

Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:14

BigshipClient

ShipmentWorkflow

create(order:
| {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2c";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}
| {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2b";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}): Promise<ShipmentWorkflow>;

Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:18

| { consignee_detail: { company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; }; order_detail: { box_details: { box_count: 1; each_box_collectable_amount: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file?: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD"; shipment_invoice_amount: number; total_collectable_amount?: number; }; shipment_category: "b2c"; warehouse_detail: { pickup_location_id: number; return_location_id: number; }; } | { consignee_detail: { company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; }; order_detail: { box_details: { box_count: number; each_box_collectable_amount?: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount?: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD" | "ToPay"; shipment_invoice_amount: number; total_collectable_amount?: number; }; shipment_category: "b2b"; warehouse_detail: { pickup_location_id: number; return_location_id: number; }; }

Promise<ShipmentWorkflow>

execute(order:
| {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2c";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}
| {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2b";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}, courierId: number): Promise<{
awb: string;
courierName: string;
labelData: string;
manifestData: string;
}>;

Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:77

| { consignee_detail: { company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; }; order_detail: { box_details: { box_count: 1; each_box_collectable_amount: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file?: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD"; shipment_invoice_amount: number; total_collectable_amount?: number; }; shipment_category: "b2c"; warehouse_detail: { pickup_location_id: number; return_location_id: number; }; } | { consignee_detail: { company_name?: string; consignee_address: { address_landmark?: string; address_line1: string; address_line2?: string; pincode: string; }; contact_number_primary: string; contact_number_secondary?: string; email_id?: string; first_name: string; last_name: string; }; order_detail: { box_details: { box_count: number; each_box_collectable_amount?: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount?: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD" | "ToPay"; shipment_invoice_amount: number; total_collectable_amount?: number; }; shipment_category: "b2b"; warehouse_detail: { pickup_location_id: number; return_location_id: number; }; }

number

Promise<{ awb: string; courierName: string; labelData: string; manifestData: string; }>

finalize(): Promise<{
awb: string;
courierName: string;
labelData: string;
manifestData: string;
}>;

Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:55

Promise<{ awb: string; courierName: string; labelData: string; manifestData: string; }>

manifest(): Promise<ShipmentWorkflow>;

Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:41

Promise<ShipmentWorkflow>

withCourier(courierId: number): this;

Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:36

number

this

Defined in: packages/sdk/src/core/types.ts:596

Base API response wrapper All Bigship API responses follow this structure

T = unknown

Property Type Defined in
data T | null packages/sdk/src/core/types.ts:600
message string packages/sdk/src/core/types.ts:598
responseCode number packages/sdk/src/core/types.ts:599
success boolean packages/sdk/src/core/types.ts:597

Defined in: packages/sdk/src/errors/index.ts:5

Property Type Defined in
apiResponse? BigshipErrorData packages/sdk/src/errors/index.ts:7
cause? Error packages/sdk/src/errors/index.ts:11
code? string packages/sdk/src/errors/index.ts:6
endpoint? string packages/sdk/src/errors/index.ts:9
requestId? string packages/sdk/src/errors/index.ts:8
responseBody? unknown packages/sdk/src/errors/index.ts:10

Defined in: packages/sdk/src/core/types.ts:6

Property Type Defined in
accessKey string packages/sdk/src/core/types.ts:10
baseURL string packages/sdk/src/core/types.ts:7
enableDetailedLogging? boolean packages/sdk/src/core/types.ts:14
maxRetries? number packages/sdk/src/core/types.ts:15
maxRetryDelay? number packages/sdk/src/core/types.ts:17
onBeforeRequest? (config: InternalAxiosRequestConfig) => | InternalAxiosRequestConfig<any, any> | Promise<InternalAxiosRequestConfig<any, any>> packages/sdk/src/core/types.ts:25
onError? (error: BigshipError, context: RequestContext) => void | Promise<void> packages/sdk/src/core/types.ts:23
onResponse? (response: ApiResponse<unknown>, context: RequestContext) => void | Promise<void> packages/sdk/src/core/types.ts:22
onRetry? (attempt: number, error: BigshipError, context: RequestContext) => void | Promise<void> packages/sdk/src/core/types.ts:24
password string packages/sdk/src/core/types.ts:9
retryDelay? number packages/sdk/src/core/types.ts:16
retryOnStatusCodes? number[] packages/sdk/src/core/types.ts:18
timeout? number packages/sdk/src/core/types.ts:11
tokenTtlMs? number packages/sdk/src/core/types.ts:19
userName string packages/sdk/src/core/types.ts:8

Defined in: packages/sdk/src/errors/BigshipError.ts:1

Property Type Defined in
errors? Record<string, string[]> packages/sdk/src/errors/BigshipError.ts:4
message? string packages/sdk/src/errors/BigshipError.ts:3
status? string packages/sdk/src/errors/BigshipError.ts:2
trace_id? string packages/sdk/src/errors/BigshipError.ts:5

Defined in: packages/sdk/src/core/types.ts:32

Logger interface for pluggable logging. Implement this interface to integrate with Winston, pino, etc.

optional debug(message: string, data?: unknown): void;

Defined in: packages/sdk/src/core/types.ts:33

string

unknown

void

optional error(message: string, data?: unknown): void;

Defined in: packages/sdk/src/core/types.ts:36

string

unknown

void

optional info(message: string, data?: unknown): void;

Defined in: packages/sdk/src/core/types.ts:34

string

unknown

void

optional warn(message: string, data?: unknown): void;

Defined in: packages/sdk/src/core/types.ts:35

string

unknown

void


Defined in: packages/sdk/src/core/types.ts:43

Request context for event hooks Provides information about the current request for logging and debugging

Property Type Defined in
attempt? number packages/sdk/src/core/types.ts:47
duration? number packages/sdk/src/core/types.ts:49
endpoint string packages/sdk/src/core/types.ts:44
method string packages/sdk/src/core/types.ts:45
requestId? string packages/sdk/src/core/types.ts:46
startTime number packages/sdk/src/core/types.ts:48

Defined in: packages/sdk/src/core/BigshipClient.ts:72

Per-request options that can override client-level defaults.

Property Type Description Defined in
signal? AbortSignal AbortSignal to cancel the request packages/sdk/src/core/BigshipClient.ts:76
timeout? number Override the default timeout (ms) for this request packages/sdk/src/core/BigshipClient.ts:74
type AddHeavyOrderRequest = z.infer<typeof AddHeavyOrderRequestSchema>;

Defined in: packages/sdk/src/core/types.ts:253


type AddOrderResponse = z.infer<typeof AddOrderResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:528


type AddSingleOrderRequest = z.infer<typeof AddSingleOrderRequestSchema>;

Defined in: packages/sdk/src/core/types.ts:243


type BigshipUtilsType = typeof BigshipUtils;

Defined in: packages/sdk/src/utils/index.ts:72


type CalculateRateResponse = z.infer<typeof CalculateRateResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:535


type CancelResponse = z.infer<typeof CancelResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:530


type CourierListResponse = z.infer<typeof CourierListResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:523


type DocumentDetailB2B = z.infer<typeof DocumentDetailB2BSchema>;

Defined in: packages/sdk/src/core/types.ts:162

Document files for B2B orders

document_detail: {
invoice_document_file: 'data:application/pdf;base64,JVBERi0xLjQKJ...',
ewaybill_document_file: 'data:application/pdf;base64,JVBERi0xLjQKJ...'
}

type DocumentDetailB2C = z.infer<typeof DocumentDetailB2CSchema>;

Defined in: packages/sdk/src/core/types.ts:147

Document files for B2C orders

document_detail: {
invoice_document_file: 'data:application/pdf;base64,JVBERi0xLjQKJ...'
}

type LoginRequest = z.infer<typeof LoginRequestSchema>;

Defined in: packages/sdk/src/core/types.ts:64


type LoginResponse = z.infer<typeof LoginResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:521


type ManifestResponse = z.infer<typeof ManifestResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:529


type PaymentCategoryResponse = z.infer<typeof PaymentCategoryResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:525


type ProductCategory = typeof PRODUCT_CATEGORIES[number];

Defined in: packages/sdk/src/core/types.ts:588


type RateCalculatorRequest = z.infer<typeof RateCalculatorRequestSchema>;

Defined in: packages/sdk/src/core/types.ts:207


type ShipmentAWBResponse = z.infer<typeof ShipmentAWBResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:533


type ShipmentDataAnyResponse =
| ShipmentAWBResponse
| ShipmentFileResponse;

Defined in: packages/sdk/src/core/types.ts:542

Union type for all possible shipment data responses Use this when the shipment data type is unknown at compile time


type ShipmentDataResponse = z.infer<typeof ShipmentDataResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:532


type ShipmentFileResponse = z.infer<typeof ShipmentFileResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:534


type ShippingRatesResponse = z.infer<typeof ShippingRatesResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:531


type TrackingResponse = z.infer<typeof TrackingResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:536


type TransporterListResponse = z.infer<typeof TransporterListResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:524


type WalletBalanceResponse = z.infer<typeof WalletBalanceResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:522


type WarehouseAddRequest = z.infer<typeof WarehouseAddRequestSchema>;

Defined in: packages/sdk/src/core/types.ts:231


type WarehouseAddResponse = z.infer<typeof WarehouseAddResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:526


type WarehouseListResponse = z.infer<typeof WarehouseListResponseSchema>;

Defined in: packages/sdk/src/core/types.ts:527

const AddHeavyOrderRequestSchema: ZodObject<{
consignee_detail: ZodObject<{
company_name: ZodOptional<ZodString>;
consignee_address: ZodObject<{
address_landmark: ZodOptional<ZodString>;
address_line1: ZodString;
address_line2: ZodOptional<ZodString>;
pincode: ZodString;
}, "strip", ZodTypeAny, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}>;
contact_number_primary: ZodString;
contact_number_secondary: ZodOptional<ZodString>;
email_id: ZodOptional<ZodString>;
first_name: ZodString;
last_name: ZodString;
}, "strip", ZodTypeAny, {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
}, {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
}>;
order_detail: ZodObject<{
box_details: ZodArray<ZodObject<{
box_count: ZodNumber;
each_box_collectable_amount: ZodOptional<ZodNumber>;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_invoice_amount: ZodOptional<ZodNumber>;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
product_details: ZodArray<ZodObject<{
each_product_collectable_amount: ZodOptional<...>;
each_product_invoice_amount: ZodOptional<...>;
hsn: ZodOptional<...>;
product_category: ZodString;
product_name: ZodString;
product_quantity: ZodNumber;
product_sub_category: ZodOptional<...>;
}, "strip", ZodTypeAny, {
each_product_collectable_amount?: ... | ...;
each_product_invoice_amount?: ... | ...;
hsn?: ... | ...;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: ... | ...;
}, {
each_product_collectable_amount?: ... | ...;
each_product_invoice_amount?: ... | ...;
hsn?: ... | ...;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: ... | ...;
}>, "many">;
}, "strip", ZodTypeAny, {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}, {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}>, "many">;
document_detail: ZodObject<{
ewaybill_document_file: ZodOptional<ZodString>;
invoice_document_file: ZodString;
}, "strip", ZodTypeAny, {
ewaybill_document_file?: string;
invoice_document_file: string;
}, {
ewaybill_document_file?: string;
invoice_document_file: string;
}>;
ewaybill_number: ZodOptional<ZodString>;
invoice_date: ZodString;
invoice_id: ZodString;
payment_type: ZodEnum<["Prepaid", "COD", "ToPay"]>;
shipment_invoice_amount: ZodNumber;
total_collectable_amount: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}, {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}>;
shipment_category: ZodLiteral<"b2b">;
warehouse_detail: ZodObject<{
pickup_location_id: ZodNumber;
return_location_id: ZodNumber;
}, "strip", ZodTypeAny, {
pickup_location_id: number;
return_location_id: number;
}, {
pickup_location_id: number;
return_location_id: number;
}>;
}, "strip", ZodTypeAny, {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2b";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}, {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2b";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}>;

Defined in: packages/sdk/src/core/types.ts:246


const AdditionalChargesSchema: ZodObject<{
courier_charge: ZodOptional<ZodNumber>;
green_tax: ZodOptional<ZodNumber>;
handling_charge: ZodOptional<ZodNumber>;
lr_cost: ZodOptional<ZodNumber>;
oda: ZodOptional<ZodNumber>;
odc_charge: ZodOptional<ZodNumber>;
pickup_charge: ZodOptional<ZodNumber>;
risk_type_charge: ZodOptional<ZodNumber>;
state_tax: ZodOptional<ZodNumber>;
to_pay: ZodOptional<ZodNumber>;
warai_charge: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}>;

Defined in: packages/sdk/src/core/types.ts:384

Additional charges breakdown for shipping rates


const AddOrderResponseSchema: ZodObject<{
data: ZodNullable<ZodString>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: string | null;
message: string;
responseCode: number;
success: boolean;
}, {
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:357

Response from addSingleOrder or addHeavyOrder

// Success response
{
success: true,
message: "Order added successfully.",
responseCode: 200,
data: "1005202970" // This is the system_order_id
}
// Error response
{
success: false,
message: "Invalid pincode",
responseCode: 400,
data: null
}

const AddSingleOrderRequestSchema: ZodObject<{
consignee_detail: ZodObject<{
company_name: ZodOptional<ZodString>;
consignee_address: ZodObject<{
address_landmark: ZodOptional<ZodString>;
address_line1: ZodString;
address_line2: ZodOptional<ZodString>;
pincode: ZodString;
}, "strip", ZodTypeAny, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}>;
contact_number_primary: ZodString;
contact_number_secondary: ZodOptional<ZodString>;
email_id: ZodOptional<ZodString>;
first_name: ZodString;
last_name: ZodString;
}, "strip", ZodTypeAny, {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
}, {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
}>;
order_detail: ZodObject<{
box_details: ZodArray<ZodObject<{
box_count: ZodLiteral<1>;
each_box_collectable_amount: ZodNumber;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_invoice_amount: ZodNumber;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
product_details: ZodArray<ZodObject<{
each_product_collectable_amount: ZodOptional<...>;
each_product_invoice_amount: ZodOptional<...>;
hsn: ZodOptional<...>;
product_category: ZodString;
product_name: ZodString;
product_quantity: ZodNumber;
product_sub_category: ZodOptional<...>;
}, "strip", ZodTypeAny, {
each_product_collectable_amount?: ... | ...;
each_product_invoice_amount?: ... | ...;
hsn?: ... | ...;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: ... | ...;
}, {
each_product_collectable_amount?: ... | ...;
each_product_invoice_amount?: ... | ...;
hsn?: ... | ...;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: ... | ...;
}>, "many">;
}, "strip", ZodTypeAny, {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}, {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}>, "many">;
document_detail: ZodObject<{
ewaybill_document_file: ZodOptional<ZodString>;
invoice_document_file: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
ewaybill_document_file?: string;
invoice_document_file?: string;
}, {
ewaybill_document_file?: string;
invoice_document_file?: string;
}>;
ewaybill_number: ZodOptional<ZodString>;
invoice_date: ZodString;
invoice_id: ZodString;
payment_type: ZodEnum<["Prepaid", "COD"]>;
shipment_invoice_amount: ZodNumber;
total_collectable_amount: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}, {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}>;
shipment_category: ZodLiteral<"b2c">;
warehouse_detail: ZodObject<{
pickup_location_id: ZodNumber;
return_location_id: ZodNumber;
}, "strip", ZodTypeAny, {
pickup_location_id: number;
return_location_id: number;
}, {
pickup_location_id: number;
return_location_id: number;
}>;
}, "strip", ZodTypeAny, {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2c";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}, {
consignee_detail: {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
};
order_detail: {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
};
shipment_category: "b2c";
warehouse_detail: {
pickup_location_id: number;
return_location_id: number;
};
}>;

Defined in: packages/sdk/src/core/types.ts:236


const BigshipUtils: {
calculateCollectableAmount: (paymentType: "Prepaid" | "COD", codAmount: number) => number;
fileToBase64DataURI: (file: File) => Promise<string>;
formatZodErrors: (zodErrors: ZodIssue[]) => Record<string, string[]>;
isValidBase64DataURI: (value: string) => boolean;
validateOrderDetail: (orderDetail:
| {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}
| {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}, shipmentCategory: "b2c" | "b2b") => void;
};

Defined in: packages/sdk/src/utils/index.ts:64

Name Type Defined in
calculateCollectableAmount() (paymentType: "Prepaid" | "COD", codAmount: number) => number packages/sdk/src/utils/index.ts:67
fileToBase64DataURI() (file: File) => Promise<string> packages/sdk/src/utils/index.ts:65
formatZodErrors() (zodErrors: ZodIssue[]) => Record<string, string[]> packages/sdk/src/utils/index.ts:69
isValidBase64DataURI() (value: string) => boolean packages/sdk/src/utils/index.ts:66
validateOrderDetail() (orderDetail: | { box_details: { box_count: 1; each_box_collectable_amount: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file?: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD"; shipment_invoice_amount: number; total_collectable_amount?: number; } | { box_details: { box_count: number; each_box_collectable_amount?: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount?: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD" | "ToPay"; shipment_invoice_amount: number; total_collectable_amount?: number; }, shipmentCategory: "b2c" | "b2b") => void packages/sdk/src/utils/index.ts:68

const BoxDetailB2BSchema: ZodObject<{
box_count: ZodNumber;
each_box_collectable_amount: ZodOptional<ZodNumber>;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_invoice_amount: ZodOptional<ZodNumber>;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
product_details: ZodArray<ZodObject<{
each_product_collectable_amount: ZodOptional<ZodNumber>;
each_product_invoice_amount: ZodOptional<ZodNumber>;
hsn: ZodOptional<ZodString>;
product_category: ZodString;
product_name: ZodString;
product_quantity: ZodNumber;
product_sub_category: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}>, "many">;
}, "strip", ZodTypeAny, {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}, {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}>;

Defined in: packages/sdk/src/core/types.ts:112


const BoxDetailB2CSchema: ZodObject<{
box_count: ZodLiteral<1>;
each_box_collectable_amount: ZodNumber;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_invoice_amount: ZodNumber;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
product_details: ZodArray<ZodObject<{
each_product_collectable_amount: ZodOptional<ZodNumber>;
each_product_invoice_amount: ZodOptional<ZodNumber>;
hsn: ZodOptional<ZodString>;
product_category: ZodString;
product_name: ZodString;
product_quantity: ZodNumber;
product_sub_category: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}>, "many">;
}, "strip", ZodTypeAny, {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}, {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}>;

Defined in: packages/sdk/src/core/types.ts:100


const CalculateRateResponseSchema: ZodObject<{
data: ZodNullable<ZodArray<ZodObject<{
billable_weight: ZodNumber;
courier_charge: ZodNumber;
courier_id: ZodNumber;
courier_name: ZodString;
courier_type: ZodString;
other_additional_charges: ZodNullable<ZodObject<{
courier_charge: ZodOptional<ZodNumber>;
green_tax: ZodOptional<ZodNumber>;
handling_charge: ZodOptional<ZodNumber>;
lr_cost: ZodOptional<ZodNumber>;
oda: ZodOptional<ZodNumber>;
odc_charge: ZodOptional<ZodNumber>;
pickup_charge: ZodOptional<ZodNumber>;
risk_type_charge: ZodOptional<ZodNumber>;
state_tax: ZodOptional<ZodNumber>;
to_pay: ZodOptional<ZodNumber>;
warai_charge: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}>>;
risk_type_name: ZodNullable<ZodString>;
tat: ZodNumber;
total_shipping_charges: ZodNumber;
zone: ZodString;
}, "strip", ZodTypeAny, {
billable_weight: number;
courier_charge: number;
courier_id: number;
courier_name: string;
courier_type: string;
other_additional_charges: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name: string | null;
tat: number;
total_shipping_charges: number;
zone: string;
}, {
billable_weight: number;
courier_charge: number;
courier_id: number;
courier_name: string;
courier_type: string;
other_additional_charges: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name: string | null;
tat: number;
total_shipping_charges: number;
zone: string;
}>, "many">>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
billable_weight: number;
courier_charge: number;
courier_id: number;
courier_name: string;
courier_type: string;
other_additional_charges: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name: string | null;
tat: number;
total_shipping_charges: number;
zone: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
billable_weight: number;
courier_charge: number;
courier_id: number;
courier_name: string;
courier_type: string;
other_additional_charges: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name: string | null;
tat: number;
total_shipping_charges: number;
zone: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:495


const CalculatorRateItemSchema: ZodObject<{
billable_weight: ZodNumber;
courier_charge: ZodNumber;
courier_id: ZodNumber;
courier_name: ZodString;
courier_type: ZodString;
other_additional_charges: ZodNullable<ZodObject<{
courier_charge: ZodOptional<ZodNumber>;
green_tax: ZodOptional<ZodNumber>;
handling_charge: ZodOptional<ZodNumber>;
lr_cost: ZodOptional<ZodNumber>;
oda: ZodOptional<ZodNumber>;
odc_charge: ZodOptional<ZodNumber>;
pickup_charge: ZodOptional<ZodNumber>;
risk_type_charge: ZodOptional<ZodNumber>;
state_tax: ZodOptional<ZodNumber>;
to_pay: ZodOptional<ZodNumber>;
warai_charge: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}>>;
risk_type_name: ZodNullable<ZodString>;
tat: ZodNumber;
total_shipping_charges: ZodNumber;
zone: ZodString;
}, "strip", ZodTypeAny, {
billable_weight: number;
courier_charge: number;
courier_id: number;
courier_name: string;
courier_type: string;
other_additional_charges: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name: string | null;
tat: number;
total_shipping_charges: number;
zone: string;
}, {
billable_weight: number;
courier_charge: number;
courier_id: number;
courier_name: string;
courier_type: string;
other_additional_charges: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name: string | null;
tat: number;
total_shipping_charges: number;
zone: string;
}>;

Defined in: packages/sdk/src/core/types.ts:482


const CancelRequestSchema: ZodArray<ZodString, "many">;

Defined in: packages/sdk/src/core/types.ts:220


const CancelResponseSchema: ZodObject<{
data: ZodNullable<ZodNullable<ZodArray<ZodObject<{
cancel_response: ZodString;
courier_id: ZodNumber;
master_awb: ZodString;
}, "strip", ZodTypeAny, {
cancel_response: string;
courier_id: number;
master_awb: string;
}, {
cancel_response: string;
courier_id: number;
master_awb: string;
}>, "many">>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
cancel_response: string;
courier_id: number;
master_awb: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
cancel_response: string;
courier_id: number;
master_awb: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:361


const ConsigneeAddressSchema: ZodObject<{
address_landmark: ZodOptional<ZodString>;
address_line1: ZodString;
address_line2: ZodOptional<ZodString>;
pincode: ZodString;
}, "strip", ZodTypeAny, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}>;

Defined in: packages/sdk/src/core/types.ts:72


const ConsigneeDetailSchema: ZodObject<{
company_name: ZodOptional<ZodString>;
consignee_address: ZodObject<{
address_landmark: ZodOptional<ZodString>;
address_line1: ZodString;
address_line2: ZodOptional<ZodString>;
pincode: ZodString;
}, "strip", ZodTypeAny, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
}>;
contact_number_primary: ZodString;
contact_number_secondary: ZodOptional<ZodString>;
email_id: ZodOptional<ZodString>;
first_name: ZodString;
last_name: ZodString;
}, "strip", ZodTypeAny, {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
}, {
company_name?: string;
consignee_address: {
address_landmark?: string;
address_line1: string;
address_line2?: string;
pincode: string;
};
contact_number_primary: string;
contact_number_secondary?: string;
email_id?: string;
first_name: string;
last_name: string;
}>;

Defined in: packages/sdk/src/core/types.ts:79


const CourierItemSchema: ZodObject<{
admin_status: ZodOptional<ZodBoolean>;
courier_id: ZodNumber;
courier_name: ZodString;
courier_status: ZodOptional<ZodBoolean>;
courier_type: ZodOptional<ZodEnum<["Surface", "Air"]>>;
shipment_category: ZodEnum<["b2c", "b2b"]>;
}, "strip", ZodTypeAny, {
admin_status?: boolean;
courier_id: number;
courier_name: string;
courier_status?: boolean;
courier_type?: "Surface" | "Air";
shipment_category: "b2c" | "b2b";
}, {
admin_status?: boolean;
courier_id: number;
courier_name: string;
courier_status?: boolean;
courier_type?: "Surface" | "Air";
shipment_category: "b2c" | "b2b";
}>;

Defined in: packages/sdk/src/core/types.ts:277


const CourierListResponseSchema: ZodObject<{
data: ZodNullable<ZodArray<ZodObject<{
admin_status: ZodOptional<ZodBoolean>;
courier_id: ZodNumber;
courier_name: ZodString;
courier_status: ZodOptional<ZodBoolean>;
courier_type: ZodOptional<ZodEnum<["Surface", "Air"]>>;
shipment_category: ZodEnum<["b2c", "b2b"]>;
}, "strip", ZodTypeAny, {
admin_status?: boolean;
courier_id: number;
courier_name: string;
courier_status?: boolean;
courier_type?: "Surface" | "Air";
shipment_category: "b2c" | "b2b";
}, {
admin_status?: boolean;
courier_id: number;
courier_name: string;
courier_status?: boolean;
courier_type?: "Surface" | "Air";
shipment_category: "b2c" | "b2b";
}>, "many">>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
admin_status?: boolean;
courier_id: number;
courier_name: string;
courier_status?: boolean;
courier_type?: "Surface" | "Air";
shipment_category: "b2c" | "b2b";
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
admin_status?: boolean;
courier_id: number;
courier_name: string;
courier_status?: boolean;
courier_type?: "Surface" | "Air";
shipment_category: "b2c" | "b2b";
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:286


const DocumentDetailB2BSchema: ZodObject<{
ewaybill_document_file: ZodOptional<ZodString>;
invoice_document_file: ZodString;
}, "strip", ZodTypeAny, {
ewaybill_document_file?: string;
invoice_document_file: string;
}, {
ewaybill_document_file?: string;
invoice_document_file: string;
}>;

Defined in: packages/sdk/src/core/types.ts:130


const DocumentDetailB2CSchema: ZodObject<{
ewaybill_document_file: ZodOptional<ZodString>;
invoice_document_file: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
ewaybill_document_file?: string;
invoice_document_file?: string;
}, {
ewaybill_document_file?: string;
invoice_document_file?: string;
}>;

Defined in: packages/sdk/src/core/types.ts:124


const LoginDataSchema: ZodObject<{
token: ZodString;
}, "strip", ZodTypeAny, {
token: string;
}, {
token: string;
}>;

Defined in: packages/sdk/src/core/types.ts:267


const LoginRequestSchema: ZodObject<{
access_key: ZodString;
password: ZodString;
user_name: ZodString;
}, "strip", ZodTypeAny, {
access_key: string;
password: string;
user_name: string;
}, {
access_key: string;
password: string;
user_name: string;
}>;

Defined in: packages/sdk/src/core/types.ts:58


const LoginResponseSchema: ZodObject<{
data: ZodNullable<ZodObject<{
token: ZodString;
}, "strip", ZodTypeAny, {
token: string;
}, {
token: string;
}>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
token: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
token: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:271


const ManifestHeavyRequestSchema: ZodObject<{
courier_id: ZodNumber;
system_order_id: ZodString;
} & {
risk_type: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
courier_id: number;
risk_type?: string;
system_order_id: string;
}, {
courier_id: number;
risk_type?: string;
system_order_id: string;
}>;

Defined in: packages/sdk/src/core/types.ts:215


const ManifestResponseSchema: ZodObject<{
data: ZodNullable<ZodNull>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: null;
message: string;
responseCode: number;
success: boolean;
}, {
data: null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:359


const ManifestSingleRequestSchema: ZodObject<{
courier_id: ZodNumber;
system_order_id: ZodString;
}, "strip", ZodTypeAny, {
courier_id: number;
system_order_id: string;
}, {
courier_id: number;
system_order_id: string;
}>;

Defined in: packages/sdk/src/core/types.ts:210


const OrderDetailB2BSchema: ZodObject<{
box_details: ZodArray<ZodObject<{
box_count: ZodNumber;
each_box_collectable_amount: ZodOptional<ZodNumber>;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_invoice_amount: ZodOptional<ZodNumber>;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
product_details: ZodArray<ZodObject<{
each_product_collectable_amount: ZodOptional<ZodNumber>;
each_product_invoice_amount: ZodOptional<ZodNumber>;
hsn: ZodOptional<ZodString>;
product_category: ZodString;
product_name: ZodString;
product_quantity: ZodNumber;
product_sub_category: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}>, "many">;
}, "strip", ZodTypeAny, {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}, {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}>, "many">;
document_detail: ZodObject<{
ewaybill_document_file: ZodOptional<ZodString>;
invoice_document_file: ZodString;
}, "strip", ZodTypeAny, {
ewaybill_document_file?: string;
invoice_document_file: string;
}, {
ewaybill_document_file?: string;
invoice_document_file: string;
}>;
ewaybill_number: ZodOptional<ZodString>;
invoice_date: ZodString;
invoice_id: ZodString;
payment_type: ZodEnum<["Prepaid", "COD", "ToPay"]>;
shipment_invoice_amount: ZodNumber;
total_collectable_amount: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}, {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}>;

Defined in: packages/sdk/src/core/types.ts:177


const OrderDetailB2CSchema: ZodObject<{
box_details: ZodArray<ZodObject<{
box_count: ZodLiteral<1>;
each_box_collectable_amount: ZodNumber;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_invoice_amount: ZodNumber;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
product_details: ZodArray<ZodObject<{
each_product_collectable_amount: ZodOptional<ZodNumber>;
each_product_invoice_amount: ZodOptional<ZodNumber>;
hsn: ZodOptional<ZodString>;
product_category: ZodString;
product_name: ZodString;
product_quantity: ZodNumber;
product_sub_category: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}>, "many">;
}, "strip", ZodTypeAny, {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}, {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}>, "many">;
document_detail: ZodObject<{
ewaybill_document_file: ZodOptional<ZodString>;
invoice_document_file: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
ewaybill_document_file?: string;
invoice_document_file?: string;
}, {
ewaybill_document_file?: string;
invoice_document_file?: string;
}>;
ewaybill_number: ZodOptional<ZodString>;
invoice_date: ZodString;
invoice_id: ZodString;
payment_type: ZodEnum<["Prepaid", "COD"]>;
shipment_invoice_amount: ZodNumber;
total_collectable_amount: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}, {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}>;

Defined in: packages/sdk/src/core/types.ts:165


const PaymentCategoryItemSchema: ZodObject<{
payment_category: ZodEnum<["COD", "Prepaid", "ToPay"]>;
status: ZodBoolean;
}, "strip", ZodTypeAny, {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}, {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:297


const PaymentCategoryResponseSchema: ZodObject<{
data: ZodNullable<ZodArray<ZodObject<{
payment_category: ZodEnum<["COD", "Prepaid", "ToPay"]>;
status: ZodBoolean;
}, "strip", ZodTypeAny, {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}, {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}>, "many">>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:302


const PRODUCT_CATEGORIES: readonly [{
id: 1;
name: "Accessories";
}, {
id: 2;
name: "FashionClothing";
}, {
id: 3;
name: "BookStationary";
}, {
id: 4;
name: "Electronics";
}, {
id: 5;
name: "FMCG";
}, {
id: 6;
name: "Footwear";
}, {
id: 7;
name: "Toys";
}, {
id: 8;
name: "SportsEquipment";
}, {
id: 9;
name: "Others";
}, {
id: 10;
name: "Wellness";
}, {
id: 11;
name: "Medicines";
}];

Defined in: packages/sdk/src/core/types.ts:574

Static list of product categories supported by Bigship API. These categories are used in the product_category field when creating orders.

import { PRODUCT_CATEGORIES } from '@agamya/bigship-sdk';
// Get category name by ID
const category = PRODUCT_CATEGORIES.find(c => c.id === 4);
console.log(category.name); // "Electronics"
// Use in order creation
await client.addSingleOrder({
...
order_detail: {
...
box_details: [{
...
product_details: [{
product_category: category.name,
...
}]
}]
}
});

const ProductDetailSchema: ZodObject<{
each_product_collectable_amount: ZodOptional<ZodNumber>;
each_product_invoice_amount: ZodOptional<ZodNumber>;
hsn: ZodOptional<ZodString>;
product_category: ZodString;
product_name: ZodString;
product_quantity: ZodNumber;
product_sub_category: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}, {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}>;

Defined in: packages/sdk/src/core/types.ts:89


const RateCalculatorBoxDetailSchema: ZodObject<{
box_count: ZodNumber;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
}, "strip", ZodTypeAny, {
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}, {
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}>;

Defined in: packages/sdk/src/core/types.ts:189


const RateCalculatorRequestSchema: ZodObject<{
box_details: ZodArray<ZodObject<{
box_count: ZodNumber;
each_box_dead_weight: ZodNumber;
each_box_height: ZodNumber;
each_box_length: ZodNumber;
each_box_width: ZodNumber;
}, "strip", ZodTypeAny, {
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}, {
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}>, "many">;
destination_pincode: ZodString;
payment_type: ZodEnum<["COD", "Prepaid", "ToPay"]>;
pickup_pincode: ZodString;
risk_type: ZodOptional<ZodString>;
shipment_category: ZodEnum<["B2C", "B2B", "b2c", "b2b"]>;
shipment_invoice_amount: ZodNumber;
}, "strip", ZodTypeAny, {
box_details: {
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}[];
destination_pincode: string;
payment_type: "Prepaid" | "COD" | "ToPay";
pickup_pincode: string;
risk_type?: string;
shipment_category: "B2C" | "B2B" | "b2c" | "b2b";
shipment_invoice_amount: number;
}, {
box_details: {
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}[];
destination_pincode: string;
payment_type: "Prepaid" | "COD" | "ToPay";
pickup_pincode: string;
risk_type?: string;
shipment_category: "B2C" | "B2B" | "b2c" | "b2b";
shipment_invoice_amount: number;
}>;

Defined in: packages/sdk/src/core/types.ts:197


const SDK_VERSION: string = '2.2.0';

Defined in: packages/sdk/src/version.ts:3


const ShipmentAWBDataSchema: ZodObject<{
courier_id: ZodString;
courier_name: ZodString;
lr_number: ZodNullable<ZodString>;
master_awb: ZodString;
}, "strip", ZodTypeAny, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}>;

Defined in: packages/sdk/src/core/types.ts:454


const ShipmentAWBResponseSchema: ZodObject<{
data: ZodNullable<ZodObject<{
courier_id: ZodString;
courier_name: ZodString;
lr_number: ZodNullable<ZodString>;
master_awb: ZodString;
}, "strip", ZodTypeAny, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:474


const ShipmentDataDataSchema: ZodObject<{
courier_id: ZodString;
courier_name: ZodString;
lr_number: ZodNullable<ZodString>;
master_awb: ZodString;
}, "strip", ZodTypeAny, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}> = ShipmentAWBDataSchema;

Defined in: packages/sdk/src/core/types.ts:478


const ShipmentDataResponseSchema: ZodObject<{
data: ZodNullable<ZodObject<{
courier_id: ZodString;
courier_name: ZodString;
lr_number: ZodNullable<ZodString>;
master_awb: ZodString;
}, "strip", ZodTypeAny, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}, {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}> = ShipmentAWBResponseSchema;

Defined in: packages/sdk/src/core/types.ts:479


const ShipmentFileDataSchema: ZodUnion<[ZodString, ZodObject<{
res_FileContent: ZodString;
res_FileName: ZodOptional<ZodString>;
res_MediaType: ZodOptional<ZodString>;
res_PrintFor: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}, {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}>, ZodNull]>;

Defined in: packages/sdk/src/core/types.ts:462


const ShipmentFileResponseSchema: ZodObject<{
data: ZodNullable<ZodUnion<[ZodString, ZodObject<{
res_FileContent: ZodString;
res_FileName: ZodOptional<ZodString>;
res_MediaType: ZodOptional<ZodString>;
res_PrintFor: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}, {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}>, ZodNull]>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | string
| {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | string
| {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:475


const ShippingRateItemSchema: ZodObject<{
billable_weight: ZodOptional<ZodNumber>;
cod_charge: ZodOptional<ZodNumber>;
courier_charge: ZodOptional<ZodNumber>;
courier_id: ZodNumber;
courier_name: ZodString;
courier_type: ZodOptional<ZodString>;
freight_charge: ZodOptional<ZodNumber>;
other_additional_charges: ZodOptional<ZodNullable<ZodObject<{
courier_charge: ZodOptional<ZodNumber>;
green_tax: ZodOptional<ZodNumber>;
handling_charge: ZodOptional<ZodNumber>;
lr_cost: ZodOptional<ZodNumber>;
oda: ZodOptional<ZodNumber>;
odc_charge: ZodOptional<ZodNumber>;
pickup_charge: ZodOptional<ZodNumber>;
risk_type_charge: ZodOptional<ZodNumber>;
state_tax: ZodOptional<ZodNumber>;
to_pay: ZodOptional<ZodNumber>;
warai_charge: ZodOptional<ZodNumber>;
}, "strip", ZodTypeAny, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}, {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}>>>;
risk_type_name: ZodOptional<ZodNullable<ZodString>>;
system_order_id: ZodOptional<ZodNumber>;
tat: ZodOptional<ZodNumber>;
total_shipping_charges: ZodNumber;
zone: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
billable_weight?: number;
cod_charge?: number;
courier_charge?: number;
courier_id: number;
courier_name: string;
courier_type?: string;
freight_charge?: number;
other_additional_charges?: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name?: string | null;
system_order_id?: number;
tat?: number;
total_shipping_charges: number;
zone?: string;
}, {
billable_weight?: number;
cod_charge?: number;
courier_charge?: number;
courier_id: number;
courier_name: string;
courier_type?: string;
freight_charge?: number;
other_additional_charges?: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name?: string | null;
system_order_id?: number;
tat?: number;
total_shipping_charges: number;
zone?: string;
}>;

Defined in: packages/sdk/src/core/types.ts:433

Shipping rate quote from a courier

// Response from getShippingRates
{
courier_id: 123,
courier_name: "Delhivery",
courier_type: "Surface",
zone: "North",
tat: 3,
total_shipping_charges: 150.50,
freight_charge: 100,
cod_charge: 25,
other_additional_charges: {
oda: 15,
handling_charge: 10.50
}
}

const ShippingRatesResponseSchema: ZodObject<{
data: ZodNullable<ZodArray<ZodObject<{
billable_weight: ZodOptional<ZodNumber>;
cod_charge: ZodOptional<ZodNumber>;
courier_charge: ZodOptional<ZodNumber>;
courier_id: ZodNumber;
courier_name: ZodString;
courier_type: ZodOptional<ZodString>;
freight_charge: ZodOptional<ZodNumber>;
other_additional_charges: ZodOptional<ZodNullable<ZodObject<{
courier_charge: ZodOptional<...>;
green_tax: ZodOptional<...>;
handling_charge: ZodOptional<...>;
lr_cost: ZodOptional<...>;
oda: ZodOptional<...>;
odc_charge: ZodOptional<...>;
pickup_charge: ZodOptional<...>;
risk_type_charge: ZodOptional<...>;
state_tax: ZodOptional<...>;
to_pay: ZodOptional<...>;
warai_charge: ZodOptional<...>;
}, "strip", ZodTypeAny, {
courier_charge?: ... | ...;
green_tax?: ... | ...;
handling_charge?: ... | ...;
lr_cost?: ... | ...;
oda?: ... | ...;
odc_charge?: ... | ...;
pickup_charge?: ... | ...;
risk_type_charge?: ... | ...;
state_tax?: ... | ...;
to_pay?: ... | ...;
warai_charge?: ... | ...;
}, {
courier_charge?: ... | ...;
green_tax?: ... | ...;
handling_charge?: ... | ...;
lr_cost?: ... | ...;
oda?: ... | ...;
odc_charge?: ... | ...;
pickup_charge?: ... | ...;
risk_type_charge?: ... | ...;
state_tax?: ... | ...;
to_pay?: ... | ...;
warai_charge?: ... | ...;
}>>>;
risk_type_name: ZodOptional<ZodNullable<ZodString>>;
system_order_id: ZodOptional<ZodNumber>;
tat: ZodOptional<ZodNumber>;
total_shipping_charges: ZodNumber;
zone: ZodOptional<ZodString>;
}, "strip", ZodTypeAny, {
billable_weight?: number;
cod_charge?: number;
courier_charge?: number;
courier_id: number;
courier_name: string;
courier_type?: string;
freight_charge?: number;
other_additional_charges?: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name?: string | null;
system_order_id?: number;
tat?: number;
total_shipping_charges: number;
zone?: string;
}, {
billable_weight?: number;
cod_charge?: number;
courier_charge?: number;
courier_id: number;
courier_name: string;
courier_type?: string;
freight_charge?: number;
other_additional_charges?: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name?: string | null;
system_order_id?: number;
tat?: number;
total_shipping_charges: number;
zone?: string;
}>, "many">>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
billable_weight?: number;
cod_charge?: number;
courier_charge?: number;
courier_id: number;
courier_name: string;
courier_type?: string;
freight_charge?: number;
other_additional_charges?: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name?: string | null;
system_order_id?: number;
tat?: number;
total_shipping_charges: number;
zone?: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
billable_weight?: number;
cod_charge?: number;
courier_charge?: number;
courier_id: number;
courier_name: string;
courier_type?: string;
freight_charge?: number;
other_additional_charges?: | {
courier_charge?: number;
green_tax?: number;
handling_charge?: number;
lr_cost?: number;
oda?: number;
odc_charge?: number;
pickup_charge?: number;
risk_type_charge?: number;
state_tax?: number;
to_pay?: number;
warai_charge?: number;
}
| null;
risk_type_name?: string | null;
system_order_id?: number;
tat?: number;
total_shipping_charges: number;
zone?: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:449


const TrackingDataSchema: ZodObject<{
order_detail: ZodObject<{
courier_name: ZodOptional<ZodString>;
current_tracking_datetime: ZodOptional<ZodString>;
current_tracking_status: ZodOptional<ZodString>;
invoice_id: ZodOptional<ZodString>;
order_manifest_datetime: ZodOptional<ZodString>;
tracking_id: ZodString;
tracking_type: ZodString;
}, "strip", ZodTypeAny, {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
}, {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
}>;
scan_histories: ZodArray<ZodObject<{
scan_datetime: ZodString;
scan_location: ZodOptional<ZodString>;
scan_remarks: ZodOptional<ZodString>;
scan_status: ZodString;
}, "strip", ZodTypeAny, {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}, {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}>, "many">;
}, "strip", ZodTypeAny, {
order_detail: {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
};
scan_histories: {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}[];
}, {
order_detail: {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
};
scan_histories: {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}[];
}>;

Defined in: packages/sdk/src/core/types.ts:505


const TrackingEventSchema: ZodObject<{
scan_datetime: ZodString;
scan_location: ZodOptional<ZodString>;
scan_remarks: ZodOptional<ZodString>;
scan_status: ZodString;
}, "strip", ZodTypeAny, {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}, {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}>;

Defined in: packages/sdk/src/core/types.ts:498


const TrackingResponseSchema: ZodObject<{
data: ZodNullable<ZodObject<{
order_detail: ZodObject<{
courier_name: ZodOptional<ZodString>;
current_tracking_datetime: ZodOptional<ZodString>;
current_tracking_status: ZodOptional<ZodString>;
invoice_id: ZodOptional<ZodString>;
order_manifest_datetime: ZodOptional<ZodString>;
tracking_id: ZodString;
tracking_type: ZodString;
}, "strip", ZodTypeAny, {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
}, {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
}>;
scan_histories: ZodArray<ZodObject<{
scan_datetime: ZodString;
scan_location: ZodOptional<ZodString>;
scan_remarks: ZodOptional<ZodString>;
scan_status: ZodString;
}, "strip", ZodTypeAny, {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}, {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}>, "many">;
}, "strip", ZodTypeAny, {
order_detail: {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
};
scan_histories: {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}[];
}, {
order_detail: {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
};
scan_histories: {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}[];
}>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
order_detail: {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
};
scan_histories: {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}[];
}
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
order_detail: {
courier_name?: string;
current_tracking_datetime?: string;
current_tracking_status?: string;
invoice_id?: string;
order_manifest_datetime?: string;
tracking_id: string;
tracking_type: string;
};
scan_histories: {
scan_datetime: string;
scan_location?: string;
scan_remarks?: string;
scan_status: string;
}[];
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:518


const TransporterItemSchema: ZodObject<{
courier_id: ZodNumber;
courier_name: ZodString;
transport_id: ZodString;
}, "strip", ZodTypeAny, {
courier_id: number;
courier_name: string;
transport_id: string;
}, {
courier_id: number;
courier_name: string;
transport_id: string;
}>;

Defined in: packages/sdk/src/core/types.ts:288


const TransporterListResponseSchema: ZodObject<{
data: ZodNullable<ZodArray<ZodObject<{
courier_id: ZodNumber;
courier_name: ZodString;
transport_id: ZodString;
}, "strip", ZodTypeAny, {
courier_id: number;
courier_name: string;
transport_id: string;
}, {
courier_id: number;
courier_name: string;
transport_id: string;
}>, "many">>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
courier_id: number;
courier_name: string;
transport_id: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
courier_id: number;
courier_name: string;
transport_id: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:294


const WalletBalanceResponseSchema: ZodObject<{
data: ZodNullable<ZodString>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: string | null;
message: string;
responseCode: number;
success: boolean;
}, {
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:274


const WarehouseAddRequestSchema: ZodObject<{
address_landmark: ZodOptional<ZodString>;
address_line1: ZodString;
address_line2: ZodOptional<ZodString>;
address_pincode: ZodString;
contact_number_primary: ZodString;
}, "strip", ZodTypeAny, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
address_pincode: string;
contact_number_primary: string;
}, {
address_landmark?: string;
address_line1: string;
address_line2?: string;
address_pincode: string;
contact_number_primary: string;
}>;

Defined in: packages/sdk/src/core/types.ts:223


const WarehouseAddResponseSchema: ZodObject<{
data: ZodNullable<ZodObject<{
address_city: ZodString;
address_country: ZodOptional<ZodString>;
address_email_id: ZodOptional<ZodString>;
address_landmark: ZodNullable<ZodString>;
address_line1: ZodString;
address_line2: ZodNullable<ZodString>;
address_pincode: ZodString;
address_state: ZodString;
create_date: ZodOptional<ZodString>;
warehouse_contact_number_primary: ZodString;
warehouse_contact_person: ZodString;
warehouse_id: ZodNumber;
warehouse_name: ZodString;
}, "strip", ZodTypeAny, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:321


const WarehouseDetailSchema: ZodObject<{
pickup_location_id: ZodNumber;
return_location_id: ZodNumber;
}, "strip", ZodTypeAny, {
pickup_location_id: number;
return_location_id: number;
}, {
pickup_location_id: number;
return_location_id: number;
}>;

Defined in: packages/sdk/src/core/types.ts:67


const WarehouseListDataSchema: ZodObject<{
result_count: ZodNumber;
result_data: ZodArray<ZodObject<{
address_city: ZodString;
address_country: ZodOptional<ZodString>;
address_email_id: ZodOptional<ZodString>;
address_landmark: ZodNullable<ZodString>;
address_line1: ZodString;
address_line2: ZodNullable<ZodString>;
address_pincode: ZodString;
address_state: ZodString;
create_date: ZodOptional<ZodString>;
warehouse_contact_number_primary: ZodString;
warehouse_contact_person: ZodString;
warehouse_id: ZodNumber;
warehouse_name: ZodString;
}, "strip", ZodTypeAny, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}>, "many">;
}, "strip", ZodTypeAny, {
result_count: number;
result_data: {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}[];
}, {
result_count: number;
result_data: {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}[];
}>;

Defined in: packages/sdk/src/core/types.ts:323


const WarehouseListItemSchema: ZodObject<{
address_city: ZodString;
address_country: ZodOptional<ZodString>;
address_email_id: ZodOptional<ZodString>;
address_landmark: ZodNullable<ZodString>;
address_line1: ZodString;
address_line2: ZodNullable<ZodString>;
address_pincode: ZodString;
address_state: ZodString;
create_date: ZodOptional<ZodString>;
warehouse_contact_number_primary: ZodString;
warehouse_contact_person: ZodString;
warehouse_id: ZodNumber;
warehouse_name: ZodString;
}, "strip", ZodTypeAny, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}>;

Defined in: packages/sdk/src/core/types.ts:305


const WarehouseListResponseSchema: ZodObject<{
data: ZodNullable<ZodObject<{
result_count: ZodNumber;
result_data: ZodArray<ZodObject<{
address_city: ZodString;
address_country: ZodOptional<ZodString>;
address_email_id: ZodOptional<ZodString>;
address_landmark: ZodNullable<ZodString>;
address_line1: ZodString;
address_line2: ZodNullable<ZodString>;
address_pincode: ZodString;
address_state: ZodString;
create_date: ZodOptional<ZodString>;
warehouse_contact_number_primary: ZodString;
warehouse_contact_person: ZodString;
warehouse_id: ZodNumber;
warehouse_name: ZodString;
}, "strip", ZodTypeAny, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}, {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}>, "many">;
}, "strip", ZodTypeAny, {
result_count: number;
result_data: {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}[];
}, {
result_count: number;
result_data: {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}[];
}>>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, {
data: | {
result_count: number;
result_data: {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}[];
}
| null;
message: string;
responseCode: number;
success: boolean;
}, {
data: | {
result_count: number;
result_data: {
address_city: string;
address_country?: string;
address_email_id?: string;
address_landmark: string | null;
address_line1: string;
address_line2: string | null;
address_pincode: string;
address_state: string;
create_date?: string;
warehouse_contact_number_primary: string;
warehouse_contact_person: string;
warehouse_id: number;
warehouse_name: string;
}[];
}
| null;
message: string;
responseCode: number;
success: boolean;
}>;

Defined in: packages/sdk/src/core/types.ts:328

function ApiResponseSchema<T>(dataSchema: T): ZodObject<{
data: ZodNullable<T>;
message: ZodString;
responseCode: ZodNumber;
success: ZodBoolean;
}, "strip", ZodTypeAny, { [k in "message" | "success" | "responseCode" | "data"]: addQuestionMarks<baseObjectOutputType<{ data: ZodNullable<T>; message: ZodString; responseCode: ZodNumber; success: ZodBoolean }>, any>[k] }, { [k in "message" | "success" | "responseCode" | "data"]: baseObjectInputType<{ data: ZodNullable<T>; message: ZodString; responseCode: ZodNumber; success: ZodBoolean }>[k] }>;

Defined in: packages/sdk/src/core/types.ts:258

T extends ZodTypeAny

T

ZodObject<{ data: ZodNullable<T>; message: ZodString; responseCode: ZodNumber; success: ZodBoolean; }, "strip", ZodTypeAny, { [k in “message” | “success” | “responseCode” | “data”]: addQuestionMarks<baseObjectOutputType<{ data: ZodNullable<T>; message: ZodString; responseCode: ZodNumber; success: ZodBoolean }>, any>[k] }, { [k in “message” | “success” | “responseCode” | “data”]: baseObjectInputType<{ data: ZodNullable<T>; message: ZodString; responseCode: ZodNumber; success: ZodBoolean }>[k] }>


function calculateCollectableAmount(paymentType: "Prepaid" | "COD", codAmount: number): number;

Defined in: packages/sdk/src/utils/index.ts:35

"Prepaid" | "COD"

number

number


function fileToBase64DataURI(file: File): Promise<string>;

Defined in: packages/sdk/src/utils/index.ts:10

File

Promise<string>


function formatZodErrors(zodErrors: ZodIssue[]): Record<string, string[]>;

Defined in: packages/sdk/src/utils/index.ts:83

Helper function to format Zod errors into a readable format

ZodIssue[]

Record<string, string[]>

const errors = formatZodErrors(zodError.issues);
// { 'order_detail.invoice_id': ['Invalid format'] }

function isBigshipApiError(error: unknown): error is BigshipApiError;

Defined in: packages/sdk/src/errors/index.ts:199

unknown

error is BigshipApiError


function isBigshipAuthError(error: unknown): error is BigshipAuthError;

Defined in: packages/sdk/src/errors/index.ts:191

unknown

error is BigshipAuthError


function isBigshipDuplicateInvoiceError(error: unknown): error is BigshipDuplicateInvoiceError;

Defined in: packages/sdk/src/errors/index.ts:183

unknown

error is BigshipDuplicateInvoiceError


function isBigshipNetworkError(error: unknown): error is BigshipNetworkError;

Defined in: packages/sdk/src/errors/index.ts:195

unknown

error is BigshipNetworkError


function isBigshipValidationError(error: unknown): error is BigshipValidationError;

Defined in: packages/sdk/src/errors/index.ts:187

unknown

error is BigshipValidationError


function isFailedResponse<T>(response: ApiResponse<T>): response is ApiResponse<T> & { data: null; success: false };

Defined in: packages/sdk/src/core/types.ts:637

Type guard to check if an API response failed Narrows the type to ensure data is null.

Breaking change from v1.0.0: Previously also matched data: undefined. Now only matches data: null to align with the Zod schema and ApiResponse interface. If your code relied on undefined matching, add an explicit data === undefined check.

T

ApiResponse<T>

response is ApiResponse<T> & { data: null; success: false }

const response = await client.addSingleOrder(orderData);
if (isFailedResponse(response)) {
console.log('Error:', response.message);
}

function isSuccessResponse<T>(response: ApiResponse<T>): response is ApiResponse<T> & { data: T; success: true };

Defined in: packages/sdk/src/core/types.ts:617

Type guard to check if an API response is successful Narrows the type to ensure data is non-null

T

ApiResponse<T>

response is ApiResponse<T> & { data: T; success: true }

const response = await client.addSingleOrder(orderData);
if (isSuccessResponse(response)) {
console.log(response.data); // Order ID (string)
}

function isValidBase64DataURI(value: string): boolean;

Defined in: packages/sdk/src/utils/index.ts:31

string

boolean


function validateOrderDetail(orderDetail:
| {
box_details: {
box_count: 1;
each_box_collectable_amount: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file?: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}
| {
box_details: {
box_count: number;
each_box_collectable_amount?: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_invoice_amount?: number;
each_box_length: number;
each_box_width: number;
product_details: {
each_product_collectable_amount?: number;
each_product_invoice_amount?: number;
hsn?: string;
product_category: string;
product_name: string;
product_quantity: number;
product_sub_category?: string;
}[];
}[];
document_detail: {
ewaybill_document_file?: string;
invoice_document_file: string;
};
ewaybill_number?: string;
invoice_date: string;
invoice_id: string;
payment_type: "Prepaid" | "COD" | "ToPay";
shipment_invoice_amount: number;
total_collectable_amount?: number;
}, shipmentCategory: "b2c" | "b2b"): void;

Defined in: packages/sdk/src/utils/index.ts:45

| { box_details: { box_count: 1; each_box_collectable_amount: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file?: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD"; shipment_invoice_amount: number; total_collectable_amount?: number; } | { box_details: { box_count: number; each_box_collectable_amount?: number; each_box_dead_weight: number; each_box_height: number; each_box_invoice_amount?: number; each_box_length: number; each_box_width: number; product_details: { each_product_collectable_amount?: number; each_product_invoice_amount?: number; hsn?: string; product_category: string; product_name: string; product_quantity: number; product_sub_category?: string; }[]; }[]; document_detail: { ewaybill_document_file?: string; invoice_document_file: string; }; ewaybill_number?: string; invoice_date: string; invoice_id: string; payment_type: "Prepaid" | "COD" | "ToPay"; shipment_invoice_amount: number; total_collectable_amount?: number; }

"b2c" | "b2b"

void