API Reference
@agamya/bigship-sdk
Section titled “@agamya/bigship-sdk”Enumerations
Section titled “Enumerations”ShipmentDataType
Section titled “ShipmentDataType”Defined in: packages/sdk/src/core/types.ts:645
Shipment data type identifiers
Bigship API documentation
Enumeration Members
Section titled “Enumeration Members”| 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 |
Classes
Section titled “Classes”BigshipApiError
Section titled “BigshipApiError”Defined in: packages/sdk/src/errors/index.ts:30
Base API error with additional context information
Example
Section titled “Example”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); }}Extends
Section titled “Extends”Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BigshipApiError( message: string, statusCode: number, options?: BigshipApiErrorOptions): BigshipApiError;Defined in: packages/sdk/src/errors/index.ts:35
Parameters
Section titled “Parameters”message
Section titled “message”string
statusCode
Section titled “statusCode”number
options?
Section titled “options?”Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”| 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 |
Methods
Section titled “Methods”isAuthError()
Section titled “isAuthError()”isAuthError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:61
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isRateLimitError()
Section titled “isRateLimitError()”isRateLimitError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:57
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isValidationError()
Section titled “isValidationError()”isValidationError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:53
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipError.isValidationError
captureStackTrace()
Section titled “captureStackTrace()”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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”BigshipError.captureStackTrace
prepareStackTrace()
Section titled “prepareStackTrace()”static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”BigshipError.prepareStackTrace
BigshipAuthError
Section titled “BigshipAuthError”Defined in: packages/sdk/src/errors/index.ts:147
Error thrown when authentication fails
Example
Section titled “Example”try { await client.addSingleOrder(orderData);} catch (error) { if (error instanceof BigshipAuthError) { console.error('Authentication failed - check credentials'); }}Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BigshipAuthError(message?: string, options?: Omit<BigshipApiErrorOptions, "code" | "apiResponse">): BigshipAuthError;Defined in: packages/sdk/src/errors/index.ts:148
Parameters
Section titled “Parameters”message?
Section titled “message?”string = 'Authentication failed'
options?
Section titled “options?”Omit<BigshipApiErrorOptions, "code" | "apiResponse"> = {}
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”| 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 |
Methods
Section titled “Methods”isAuthError()
Section titled “isAuthError()”isAuthError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:61
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isRateLimitError()
Section titled “isRateLimitError()”isRateLimitError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:57
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isRateLimitError
isValidationError()
Section titled “isValidationError()”isValidationError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:53
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isValidationError
captureStackTrace()
Section titled “captureStackTrace()”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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”BigshipApiError.captureStackTrace
prepareStackTrace()
Section titled “prepareStackTrace()”static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”BigshipApiError.prepareStackTrace
BigshipClient
Section titled “BigshipClient”Defined in: packages/sdk/src/core/BigshipClient.ts:79
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BigshipClient(config: BigshipConfig & { loggerAdapter?: LoggerAdapter;}): BigshipClient;Defined in: packages/sdk/src/core/BigshipClient.ts:87
Parameters
Section titled “Parameters”config
Section titled “config”BigshipConfig & {
loggerAdapter?: LoggerAdapter;
}
Returns
Section titled “Returns”Methods
Section titled “Methods”addHeavyOrder()
Section titled “addHeavyOrder()”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
Parameters
Section titled “Parameters”payload
Section titled “payload”consignee_detail
Section titled “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;
} = ConsigneeDetailSchema
consignee_detail.company_name?
Section titled “consignee_detail.company_name?”string = ...
consignee_detail.consignee_address
Section titled “consignee_detail.consignee_address”{
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 = ...
consignee_detail.contact_number_primary
Section titled “consignee_detail.contact_number_primary”string = ...
consignee_detail.contact_number_secondary?
Section titled “consignee_detail.contact_number_secondary?”string = ...
consignee_detail.email_id?
Section titled “consignee_detail.email_id?”string = ...
consignee_detail.first_name
Section titled “consignee_detail.first_name”string = ...
consignee_detail.last_name
Section titled “consignee_detail.last_name”string = ...
order_detail
Section titled “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;
} = OrderDetailB2BSchema
order_detail.box_details
Section titled “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;
}[];
}[] = ...
order_detail.document_detail
Section titled “order_detail.document_detail”{
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 = ...
order_detail.ewaybill_number?
Section titled “order_detail.ewaybill_number?”string = ...
order_detail.invoice_date
Section titled “order_detail.invoice_date”string = ...
order_detail.invoice_id
Section titled “order_detail.invoice_id”string = ...
order_detail.payment_type
Section titled “order_detail.payment_type”"Prepaid" | "COD" | "ToPay" = ...
order_detail.shipment_invoice_amount
Section titled “order_detail.shipment_invoice_amount”number = ...
order_detail.total_collectable_amount?
Section titled “order_detail.total_collectable_amount?”number = ...
shipment_category
Section titled “shipment_category”"b2b" = ...
warehouse_detail
Section titled “warehouse_detail”{
pickup_location_id: number;
return_location_id: number;
} = WarehouseDetailSchema
warehouse_detail.pickup_location_id
Section titled “warehouse_detail.pickup_location_id”number = ...
warehouse_detail.return_location_id
Section titled “warehouse_detail.return_location_id”number = ...
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When request validation fails.
Throws
Section titled “Throws”When invoice ID already exists.
Throws
Section titled “Throws”When API request fails
addSingleOrder()
Section titled “addSingleOrder()”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
Parameters
Section titled “Parameters”payload
Section titled “payload”consignee_detail
Section titled “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;
} = ConsigneeDetailSchema
consignee_detail.company_name?
Section titled “consignee_detail.company_name?”string = ...
consignee_detail.consignee_address
Section titled “consignee_detail.consignee_address”{
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 = ...
consignee_detail.contact_number_primary
Section titled “consignee_detail.contact_number_primary”string = ...
consignee_detail.contact_number_secondary?
Section titled “consignee_detail.contact_number_secondary?”string = ...
consignee_detail.email_id?
Section titled “consignee_detail.email_id?”string = ...
consignee_detail.first_name
Section titled “consignee_detail.first_name”string = ...
consignee_detail.last_name
Section titled “consignee_detail.last_name”string = ...
order_detail
Section titled “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;
} = OrderDetailB2CSchema
order_detail.box_details
Section titled “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;
}[];
}[] = ...
order_detail.document_detail
Section titled “order_detail.document_detail”{
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 = ...
order_detail.ewaybill_number?
Section titled “order_detail.ewaybill_number?”string = ...
order_detail.invoice_date
Section titled “order_detail.invoice_date”string = ...
order_detail.invoice_id
Section titled “order_detail.invoice_id”string = ...
order_detail.payment_type
Section titled “order_detail.payment_type”"Prepaid" | "COD" = ...
order_detail.shipment_invoice_amount
Section titled “order_detail.shipment_invoice_amount”number = ...
order_detail.total_collectable_amount?
Section titled “order_detail.total_collectable_amount?”number = ...
shipment_category
Section titled “shipment_category”"b2c" = ...
warehouse_detail
Section titled “warehouse_detail”{
pickup_location_id: number;
return_location_id: number;
} = WarehouseDetailSchema
warehouse_detail.pickup_location_id
Section titled “warehouse_detail.pickup_location_id”number = ...
warehouse_detail.return_location_id
Section titled “warehouse_detail.return_location_id”number = ...
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When request validation fails.
Throws
Section titled “Throws”When invoice ID already exists.
Throws
Section titled “Throws”When API request fails
addWarehouse()
Section titled “addWarehouse()”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
Parameters
Section titled “Parameters”payload
Section titled “payload”address_landmark?
Section titled “address_landmark?”string = ...
address_line1
Section titled “address_line1”string = ...
address_line2?
Section titled “address_line2?”string = ...
address_pincode
Section titled “address_pincode”string = ...
contact_number_primary
Section titled “contact_number_primary”string = ...
options?
Section titled “options?”Returns
Section titled “Returns”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;
}>
Throws
Section titled “Throws”When request validation fails
calculateRate()
Section titled “calculateRate()”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
Parameters
Section titled “Parameters”payload
Section titled “payload”box_details
Section titled “box_details”{
box_count: number;
each_box_dead_weight: number;
each_box_height: number;
each_box_length: number;
each_box_width: number;
}[] = ...
destination_pincode
Section titled “destination_pincode”string = ...
payment_type
Section titled “payment_type”"Prepaid" | "COD" | "ToPay" = ...
pickup_pincode
Section titled “pickup_pincode”string = ...
risk_type?
Section titled “risk_type?”string = ...
shipment_category
Section titled “shipment_category”"B2C" | "B2B" | "b2c" | "b2b" = ...
shipment_invoice_amount
Section titled “shipment_invoice_amount”number = ...
options?
Section titled “options?”Returns
Section titled “Returns”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;
}>
Throws
Section titled “Throws”When request validation fails.
Throws
Section titled “Throws”When API request fails
cancelShipments()
Section titled “cancelShipments()”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
Parameters
Section titled “Parameters”string[]
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: | {
cancel_response: string;
courier_id: number;
master_awb: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When request validation fails.
Throws
Section titled “Throws”When API request fails
createAndFinalizeShipment()
Section titled “createAndFinalizeShipment()”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
Parameters
Section titled “Parameters”config
Section titled “config”awbPollDelay?
Section titled “awbPollDelay?”number
Delay between AWB poll attempts in ms (default: 2000)
awbPollMaxAttempts?
Section titled “awbPollMaxAttempts?”number
Max attempts to poll for AWB availability after manifest (default: 5)
courierId
Section titled “courierId”number
options?
Section titled “options?”| {
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;
};
}
Returns
Section titled “Returns”Promise<{
awb: string;
courierName: string;
labelData: string;
manifestData: string;
orderId: string;
}>
Throws
Section titled “Throws”When order creation or AWB polling fails
getAWB()
Section titled “getAWB()”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
Parameters
Section titled “Parameters”systemOrderId
Section titled “systemOrderId”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When API request fails
getCourierList()
Section titled “getCourierList()”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
Parameters
Section titled “Parameters”shipmentCategory?
Section titled “shipmentCategory?”"b2c" | "b2b"
options?
Section titled “options?”Returns
Section titled “Returns”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;
}>
Throws
Section titled “Throws”When API request fails
getCourierTransporterList()
Section titled “getCourierTransporterList()”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
Parameters
Section titled “Parameters”courierId
Section titled “courierId”number
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: | {
courier_id: number;
courier_name: string;
transport_id: string;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When API request fails
getPaymentCategory()
Section titled “getPaymentCategory()”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
Parameters
Section titled “Parameters”shipmentCategory?
Section titled “shipmentCategory?”"b2c" | "b2b"
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: | {
payment_category: "Prepaid" | "COD" | "ToPay";
status: boolean;
}[]
| null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When API request fails
getShipmentData()
Section titled “getShipmentData()”Call Signature
Section titled “Call Signature”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
Parameters
Section titled “Parameters”shipmentDataId
Section titled “shipmentDataId”1
systemOrderId
Section titled “systemOrderId”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: | {
courier_id: string;
courier_name: string;
lr_number: string | null;
master_awb: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When API request fails or invalid shipmentDataId
Call Signature
Section titled “Call Signature”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
Parameters
Section titled “Parameters”shipmentDataId
Section titled “shipmentDataId”2 | 3
systemOrderId
Section titled “systemOrderId”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: | string
| {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When API request fails or invalid shipmentDataId
Call Signature
Section titled “Call Signature”getShipmentData( shipmentDataId: number, systemOrderId: string,options?: RequestOptions): Promise<ShipmentDataAnyResponse>;Defined in: packages/sdk/src/core/BigshipClient.ts:434
Parameters
Section titled “Parameters”shipmentDataId
Section titled “shipmentDataId”number
systemOrderId
Section titled “systemOrderId”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<ShipmentDataAnyResponse>
Throws
Section titled “Throws”When API request fails or invalid shipmentDataId
getShipmentDetails()
Section titled “getShipmentDetails()”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
Parameters
Section titled “Parameters”orderId
Section titled “orderId”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
awb: string;
courierId: string;
courierName: string;
labelData: string;
manifestData: string;
}>
Throws
Section titled “Throws”When AWB, label, or manifest data is not available
getShipmentFile()
Section titled “getShipmentFile()”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
Parameters
Section titled “Parameters”shipmentDataId
Section titled “shipmentDataId”2 | 3
systemOrderId
Section titled “systemOrderId”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: | string
| {
res_FileContent: string;
res_FileName?: string;
res_MediaType?: string;
res_PrintFor?: string;
}
| null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When API request fails or data is null
getShippingRates()
Section titled “getShippingRates()”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
Parameters
Section titled “Parameters”systemOrderId
Section titled “systemOrderId”string
shipmentCategory?
Section titled “shipmentCategory?”"B2C" | "B2B" | "b2c" | "b2b"
riskType?
Section titled “riskType?”string = ''
options?
Section titled “options?”Returns
Section titled “Returns”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;
}>
Throws
Section titled “Throws”When API request fails
getWalletBalance()
Section titled “getWalletBalance()”getWalletBalance(options?: RequestOptions): Promise<{ data: string | null; message: string; responseCode: number; success: boolean;}>;Defined in: packages/sdk/src/core/BigshipClient.ts:263
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: string | null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When API request fails
getWarehouseList()
Section titled “getWarehouseList()”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
Parameters
Section titled “Parameters”pageIndex?
Section titled “pageIndex?”number = 1
pageSize?
Section titled “pageSize?”number = 10
options?
Section titled “options?”Returns
Section titled “Returns”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;
}>
Throws
Section titled “Throws”When API request fails
login()
Section titled “login()”login(): Promise<string>;Defined in: packages/sdk/src/core/BigshipClient.ts:256
Returns
Section titled “Returns”Promise<string>
Deprecated
Section titled “Deprecated”Token management is handled automatically by TokenManager
manifestAndGetAWB()
Section titled “manifestAndGetAWB()”manifestAndGetAWB( orderId: string, courierId: number, options?: RequestOptions): Promise<{ awb: string; courierName: string;}>;Defined in: packages/sdk/src/core/BigshipClient.ts:491
Parameters
Section titled “Parameters”orderId
Section titled “orderId”string
courierId
Section titled “courierId”number
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
awb: string;
courierName: string;
}>
Throws
Section titled “Throws”When AWB data is not available after manifest
manifestHeavy()
Section titled “manifestHeavy()”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
Parameters
Section titled “Parameters”payload
Section titled “payload”courier_id
Section titled “courier_id”number = ...
risk_type?
Section titled “risk_type?”string = ...
system_order_id
Section titled “system_order_id”string = ...
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When request validation fails.
Throws
Section titled “Throws”When API request fails
manifestSingle()
Section titled “manifestSingle()”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
Parameters
Section titled “Parameters”payload
Section titled “payload”courier_id
Section titled “courier_id”number = ...
system_order_id
Section titled “system_order_id”string = ...
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
data: null;
message: string;
responseCode: number;
success: boolean;
}>
Throws
Section titled “Throws”When request validation fails.
Throws
Section titled “Throws”When API request fails
trackShipment()
Section titled “trackShipment()”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
Parameters
Section titled “Parameters”trackingId
Section titled “trackingId”string
trackingType?
Section titled “trackingType?”"awb" | "lrn"
options?
Section titled “options?”Returns
Section titled “Returns”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;
}>
Throws
Section titled “Throws”When API request fails
workflow()
Section titled “workflow()”workflow(): ShipmentWorkflow;Defined in: packages/sdk/src/core/BigshipClient.ts:623
Returns
Section titled “Returns”fileToBase64DataURI()
Section titled “fileToBase64DataURI()”static fileToBase64DataURI(file: File): Promise<string>;Defined in: packages/sdk/src/core/BigshipClient.ts:325
Parameters
Section titled “Parameters”File
Returns
Section titled “Returns”Promise<string>
isValidBase64DataURI()
Section titled “isValidBase64DataURI()”static isValidBase64DataURI(value: string): boolean;Defined in: packages/sdk/src/core/BigshipClient.ts:329
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
BigshipDuplicateInvoiceError
Section titled “BigshipDuplicateInvoiceError”Defined in: packages/sdk/src/errors/index.ts:69
Error thrown when a duplicate invoice ID is detected
Example
Section titled “Example”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'); }}Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BigshipDuplicateInvoiceError(invoiceId: string, options?: Omit<BigshipApiErrorOptions, "code">): BigshipDuplicateInvoiceError;Defined in: packages/sdk/src/errors/index.ts:72
Parameters
Section titled “Parameters”invoiceId
Section titled “invoiceId”string
options?
Section titled “options?”Omit<BigshipApiErrorOptions, "code"> = {}
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”| 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 |
Methods
Section titled “Methods”isAuthError()
Section titled “isAuthError()”isAuthError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:61
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isRateLimitError()
Section titled “isRateLimitError()”isRateLimitError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:57
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isRateLimitError
isValidationError()
Section titled “isValidationError()”isValidationError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:53
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isValidationError
captureStackTrace()
Section titled “captureStackTrace()”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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”BigshipApiError.captureStackTrace
prepareStackTrace()
Section titled “prepareStackTrace()”static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”BigshipApiError.prepareStackTrace
BigshipError
Section titled “BigshipError”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
Example
Section titled “Example”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); }}Extends
Section titled “Extends”Error
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BigshipError( message: string, statusCode?: number, code?: string, apiResponse?: BigshipErrorData, options?: { cause?: Error;}): BigshipError;Defined in: packages/sdk/src/errors/BigshipError.ts:37
Parameters
Section titled “Parameters”message
Section titled “message”string
statusCode?
Section titled “statusCode?”number
string
apiResponse?
Section titled “apiResponse?”options?
Section titled “options?”cause?
Section titled “cause?”Error
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructorProperties
Section titled “Properties”| 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 |
Methods
Section titled “Methods”isAuthError()
Section titled “isAuthError()”isAuthError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:61
Returns
Section titled “Returns”boolean
isRateLimitError()
Section titled “isRateLimitError()”isRateLimitError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:57
Returns
Section titled “Returns”boolean
isValidationError()
Section titled “isValidationError()”isValidationError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:53
Returns
Section titled “Returns”boolean
captureStackTrace()
Section titled “captureStackTrace()”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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTraceprepareStackTrace()
Section titled “prepareStackTrace()”static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”Error.prepareStackTraceBigshipNetworkError
Section titled “BigshipNetworkError”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.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BigshipNetworkError(message: string, options?: Omit<BigshipApiErrorOptions, "code">): BigshipNetworkError;Defined in: packages/sdk/src/errors/index.ts:170
Parameters
Section titled “Parameters”message
Section titled “message”string
options?
Section titled “options?”Omit<BigshipApiErrorOptions, "code"> = {}
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”| 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 |
Methods
Section titled “Methods”isAuthError()
Section titled “isAuthError()”isAuthError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:61
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isRateLimitError()
Section titled “isRateLimitError()”isRateLimitError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:57
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isRateLimitError
isValidationError()
Section titled “isValidationError()”isValidationError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:53
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isValidationError
captureStackTrace()
Section titled “captureStackTrace()”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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”BigshipApiError.captureStackTrace
prepareStackTrace()
Section titled “prepareStackTrace()”static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”BigshipApiError.prepareStackTrace
BigshipValidationError
Section titled “BigshipValidationError”Defined in: packages/sdk/src/errors/index.ts:111
Error thrown when request validation fails
Example
Section titled “Example”try { await client.addSingleOrder(orderData);} catch (error) { if (error instanceof BigshipValidationError) { console.error('Validation errors:', error.validationErrors); // { invoice_id: ['Invalid format'], pincode: ['Invalid pincode'] } }}Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BigshipValidationError( message: string, validationErrors: Record<string, string[]>, options?: Omit<BigshipApiErrorOptions, "code" | "apiResponse">): BigshipValidationError;Defined in: packages/sdk/src/errors/index.ts:114
Parameters
Section titled “Parameters”message
Section titled “message”string
validationErrors
Section titled “validationErrors”Record<string, string[]>
options?
Section titled “options?”Omit<BigshipApiErrorOptions, "code" | "apiResponse"> = {}
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”| 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 |
Methods
Section titled “Methods”isAuthError()
Section titled “isAuthError()”isAuthError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:61
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isRateLimitError()
Section titled “isRateLimitError()”isRateLimitError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:57
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isRateLimitError
isValidationError()
Section titled “isValidationError()”isValidationError(): boolean;Defined in: packages/sdk/src/errors/BigshipError.ts:53
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BigshipApiError.isValidationError
captureStackTrace()
Section titled “captureStackTrace()”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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”BigshipApiError.captureStackTrace
prepareStackTrace()
Section titled “prepareStackTrace()”static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”BigshipApiError.prepareStackTrace
ShipmentWorkflow
Section titled “ShipmentWorkflow”Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:8
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ShipmentWorkflow(client: BigshipClient): ShipmentWorkflow;Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:14
Parameters
Section titled “Parameters”client
Section titled “client”Returns
Section titled “Returns”Methods
Section titled “Methods”create()
Section titled “create()”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
Parameters
Section titled “Parameters”| {
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;
};
}
Returns
Section titled “Returns”Promise<ShipmentWorkflow>
execute()
Section titled “execute()”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
Parameters
Section titled “Parameters”| {
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
Section titled “courierId”number
Returns
Section titled “Returns”Promise<{
awb: string;
courierName: string;
labelData: string;
manifestData: string;
}>
finalize()
Section titled “finalize()”finalize(): Promise<{ awb: string; courierName: string; labelData: string; manifestData: string;}>;Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:55
Returns
Section titled “Returns”Promise<{
awb: string;
courierName: string;
labelData: string;
manifestData: string;
}>
manifest()
Section titled “manifest()”manifest(): Promise<ShipmentWorkflow>;Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:41
Returns
Section titled “Returns”Promise<ShipmentWorkflow>
withCourier()
Section titled “withCourier()”withCourier(courierId: number): this;Defined in: packages/sdk/src/workflow/ShipmentWorkflow.ts:36
Parameters
Section titled “Parameters”courierId
Section titled “courierId”number
Returns
Section titled “Returns”this
Interfaces
Section titled “Interfaces”ApiResponse
Section titled “ApiResponse”Defined in: packages/sdk/src/core/types.ts:596
Base API response wrapper All Bigship API responses follow this structure
Type Parameters
Section titled “Type Parameters”T = unknown
Properties
Section titled “Properties”| 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 |
BigshipApiErrorOptions
Section titled “BigshipApiErrorOptions”Defined in: packages/sdk/src/errors/index.ts:5
Properties
Section titled “Properties”| 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 |
BigshipConfig
Section titled “BigshipConfig”Defined in: packages/sdk/src/core/types.ts:6
Properties
Section titled “Properties”| 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 |
BigshipErrorData
Section titled “BigshipErrorData”Defined in: packages/sdk/src/errors/BigshipError.ts:1
Properties
Section titled “Properties”| 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 |
LoggerAdapter
Section titled “LoggerAdapter”Defined in: packages/sdk/src/core/types.ts:32
Logger interface for pluggable logging. Implement this interface to integrate with Winston, pino, etc.
Methods
Section titled “Methods”debug()?
Section titled “debug()?”optional debug(message: string, data?: unknown): void;Defined in: packages/sdk/src/core/types.ts:33
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”void
error()?
Section titled “error()?”optional error(message: string, data?: unknown): void;Defined in: packages/sdk/src/core/types.ts:36
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”void
info()?
Section titled “info()?”optional info(message: string, data?: unknown): void;Defined in: packages/sdk/src/core/types.ts:34
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”void
warn()?
Section titled “warn()?”optional warn(message: string, data?: unknown): void;Defined in: packages/sdk/src/core/types.ts:35
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”void
RequestContext
Section titled “RequestContext”Defined in: packages/sdk/src/core/types.ts:43
Request context for event hooks Provides information about the current request for logging and debugging
Properties
Section titled “Properties”| 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 |
RequestOptions
Section titled “RequestOptions”Defined in: packages/sdk/src/core/BigshipClient.ts:72
Per-request options that can override client-level defaults.
Properties
Section titled “Properties”| 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 Aliases
Section titled “Type Aliases”AddHeavyOrderRequest
Section titled “AddHeavyOrderRequest”type AddHeavyOrderRequest = z.infer<typeof AddHeavyOrderRequestSchema>;Defined in: packages/sdk/src/core/types.ts:253
AddOrderResponse
Section titled “AddOrderResponse”type AddOrderResponse = z.infer<typeof AddOrderResponseSchema>;Defined in: packages/sdk/src/core/types.ts:528
AddSingleOrderRequest
Section titled “AddSingleOrderRequest”type AddSingleOrderRequest = z.infer<typeof AddSingleOrderRequestSchema>;Defined in: packages/sdk/src/core/types.ts:243
BigshipUtilsType
Section titled “BigshipUtilsType”type BigshipUtilsType = typeof BigshipUtils;Defined in: packages/sdk/src/utils/index.ts:72
CalculateRateResponse
Section titled “CalculateRateResponse”type CalculateRateResponse = z.infer<typeof CalculateRateResponseSchema>;Defined in: packages/sdk/src/core/types.ts:535
CancelResponse
Section titled “CancelResponse”type CancelResponse = z.infer<typeof CancelResponseSchema>;Defined in: packages/sdk/src/core/types.ts:530
CourierListResponse
Section titled “CourierListResponse”type CourierListResponse = z.infer<typeof CourierListResponseSchema>;Defined in: packages/sdk/src/core/types.ts:523
DocumentDetailB2B
Section titled “DocumentDetailB2B”type DocumentDetailB2B = z.infer<typeof DocumentDetailB2BSchema>;Defined in: packages/sdk/src/core/types.ts:162
Document files for B2B orders
Example
Section titled “Example”document_detail: { invoice_document_file: 'data:application/pdf;base64,JVBERi0xLjQKJ...', ewaybill_document_file: 'data:application/pdf;base64,JVBERi0xLjQKJ...'}DocumentDetailB2C
Section titled “DocumentDetailB2C”type DocumentDetailB2C = z.infer<typeof DocumentDetailB2CSchema>;Defined in: packages/sdk/src/core/types.ts:147
Document files for B2C orders
Example
Section titled “Example”document_detail: { invoice_document_file: 'data:application/pdf;base64,JVBERi0xLjQKJ...'}LoginRequest
Section titled “LoginRequest”type LoginRequest = z.infer<typeof LoginRequestSchema>;Defined in: packages/sdk/src/core/types.ts:64
LoginResponse
Section titled “LoginResponse”type LoginResponse = z.infer<typeof LoginResponseSchema>;Defined in: packages/sdk/src/core/types.ts:521
ManifestResponse
Section titled “ManifestResponse”type ManifestResponse = z.infer<typeof ManifestResponseSchema>;Defined in: packages/sdk/src/core/types.ts:529
PaymentCategoryResponse
Section titled “PaymentCategoryResponse”type PaymentCategoryResponse = z.infer<typeof PaymentCategoryResponseSchema>;Defined in: packages/sdk/src/core/types.ts:525
ProductCategory
Section titled “ProductCategory”type ProductCategory = typeof PRODUCT_CATEGORIES[number];Defined in: packages/sdk/src/core/types.ts:588
RateCalculatorRequest
Section titled “RateCalculatorRequest”type RateCalculatorRequest = z.infer<typeof RateCalculatorRequestSchema>;Defined in: packages/sdk/src/core/types.ts:207
ShipmentAWBResponse
Section titled “ShipmentAWBResponse”type ShipmentAWBResponse = z.infer<typeof ShipmentAWBResponseSchema>;Defined in: packages/sdk/src/core/types.ts:533
ShipmentDataAnyResponse
Section titled “ShipmentDataAnyResponse”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
ShipmentDataResponse
Section titled “ShipmentDataResponse”type ShipmentDataResponse = z.infer<typeof ShipmentDataResponseSchema>;Defined in: packages/sdk/src/core/types.ts:532
ShipmentFileResponse
Section titled “ShipmentFileResponse”type ShipmentFileResponse = z.infer<typeof ShipmentFileResponseSchema>;Defined in: packages/sdk/src/core/types.ts:534
ShippingRatesResponse
Section titled “ShippingRatesResponse”type ShippingRatesResponse = z.infer<typeof ShippingRatesResponseSchema>;Defined in: packages/sdk/src/core/types.ts:531
TrackingResponse
Section titled “TrackingResponse”type TrackingResponse = z.infer<typeof TrackingResponseSchema>;Defined in: packages/sdk/src/core/types.ts:536
TransporterListResponse
Section titled “TransporterListResponse”type TransporterListResponse = z.infer<typeof TransporterListResponseSchema>;Defined in: packages/sdk/src/core/types.ts:524
WalletBalanceResponse
Section titled “WalletBalanceResponse”type WalletBalanceResponse = z.infer<typeof WalletBalanceResponseSchema>;Defined in: packages/sdk/src/core/types.ts:522
WarehouseAddRequest
Section titled “WarehouseAddRequest”type WarehouseAddRequest = z.infer<typeof WarehouseAddRequestSchema>;Defined in: packages/sdk/src/core/types.ts:231
WarehouseAddResponse
Section titled “WarehouseAddResponse”type WarehouseAddResponse = z.infer<typeof WarehouseAddResponseSchema>;Defined in: packages/sdk/src/core/types.ts:526
WarehouseListResponse
Section titled “WarehouseListResponse”type WarehouseListResponse = z.infer<typeof WarehouseListResponseSchema>;Defined in: packages/sdk/src/core/types.ts:527
Variables
Section titled “Variables”AddHeavyOrderRequestSchema
Section titled “AddHeavyOrderRequestSchema”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
AdditionalChargesSchema
Section titled “AdditionalChargesSchema”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
AddOrderResponseSchema
Section titled “AddOrderResponseSchema”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
Example
Section titled “Example”// 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}AddSingleOrderRequestSchema
Section titled “AddSingleOrderRequestSchema”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
BigshipUtils
Section titled “BigshipUtils”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
Type Declaration
Section titled “Type Declaration”| 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 |
BoxDetailB2BSchema
Section titled “BoxDetailB2BSchema”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
BoxDetailB2CSchema
Section titled “BoxDetailB2CSchema”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
CalculateRateResponseSchema
Section titled “CalculateRateResponseSchema”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
CalculatorRateItemSchema
Section titled “CalculatorRateItemSchema”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
CancelRequestSchema
Section titled “CancelRequestSchema”const CancelRequestSchema: ZodArray<ZodString, "many">;Defined in: packages/sdk/src/core/types.ts:220
CancelResponseSchema
Section titled “CancelResponseSchema”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
ConsigneeAddressSchema
Section titled “ConsigneeAddressSchema”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
ConsigneeDetailSchema
Section titled “ConsigneeDetailSchema”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
CourierItemSchema
Section titled “CourierItemSchema”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
CourierListResponseSchema
Section titled “CourierListResponseSchema”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
DocumentDetailB2BSchema
Section titled “DocumentDetailB2BSchema”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
DocumentDetailB2CSchema
Section titled “DocumentDetailB2CSchema”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
LoginDataSchema
Section titled “LoginDataSchema”const LoginDataSchema: ZodObject<{ token: ZodString;}, "strip", ZodTypeAny, { token: string;}, { token: string;}>;Defined in: packages/sdk/src/core/types.ts:267
LoginRequestSchema
Section titled “LoginRequestSchema”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
LoginResponseSchema
Section titled “LoginResponseSchema”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
ManifestHeavyRequestSchema
Section titled “ManifestHeavyRequestSchema”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
ManifestResponseSchema
Section titled “ManifestResponseSchema”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
ManifestSingleRequestSchema
Section titled “ManifestSingleRequestSchema”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
OrderDetailB2BSchema
Section titled “OrderDetailB2BSchema”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
OrderDetailB2CSchema
Section titled “OrderDetailB2CSchema”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
PaymentCategoryItemSchema
Section titled “PaymentCategoryItemSchema”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
PaymentCategoryResponseSchema
Section titled “PaymentCategoryResponseSchema”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
PRODUCT_CATEGORIES
Section titled “PRODUCT_CATEGORIES”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.
Example
Section titled “Example”import { PRODUCT_CATEGORIES } from '@agamya/bigship-sdk';
// Get category name by IDconst category = PRODUCT_CATEGORIES.find(c => c.id === 4);console.log(category.name); // "Electronics"
// Use in order creationawait client.addSingleOrder({ ... order_detail: { ... box_details: [{ ... product_details: [{ product_category: category.name, ... }] }] }});ProductDetailSchema
Section titled “ProductDetailSchema”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
RateCalculatorBoxDetailSchema
Section titled “RateCalculatorBoxDetailSchema”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
RateCalculatorRequestSchema
Section titled “RateCalculatorRequestSchema”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
SDK_VERSION
Section titled “SDK_VERSION”const SDK_VERSION: string = '2.2.0';Defined in: packages/sdk/src/version.ts:3
ShipmentAWBDataSchema
Section titled “ShipmentAWBDataSchema”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
ShipmentAWBResponseSchema
Section titled “ShipmentAWBResponseSchema”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
ShipmentDataDataSchema
Section titled “ShipmentDataDataSchema”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
ShipmentDataResponseSchema
Section titled “ShipmentDataResponseSchema”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
ShipmentFileDataSchema
Section titled “ShipmentFileDataSchema”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
ShipmentFileResponseSchema
Section titled “ShipmentFileResponseSchema”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
ShippingRateItemSchema
Section titled “ShippingRateItemSchema”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
Example
Section titled “Example”// 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 }}ShippingRatesResponseSchema
Section titled “ShippingRatesResponseSchema”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
TrackingDataSchema
Section titled “TrackingDataSchema”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
TrackingEventSchema
Section titled “TrackingEventSchema”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
TrackingResponseSchema
Section titled “TrackingResponseSchema”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
TransporterItemSchema
Section titled “TransporterItemSchema”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
TransporterListResponseSchema
Section titled “TransporterListResponseSchema”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
WalletBalanceResponseSchema
Section titled “WalletBalanceResponseSchema”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
WarehouseAddRequestSchema
Section titled “WarehouseAddRequestSchema”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
WarehouseAddResponseSchema
Section titled “WarehouseAddResponseSchema”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
WarehouseDetailSchema
Section titled “WarehouseDetailSchema”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
WarehouseListDataSchema
Section titled “WarehouseListDataSchema”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
WarehouseListItemSchema
Section titled “WarehouseListItemSchema”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
WarehouseListResponseSchema
Section titled “WarehouseListResponseSchema”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
Functions
Section titled “Functions”ApiResponseSchema()
Section titled “ApiResponseSchema()”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
Type Parameters
Section titled “Type Parameters”T extends ZodTypeAny
Parameters
Section titled “Parameters”dataSchema
Section titled “dataSchema”T
Returns
Section titled “Returns”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] }>
calculateCollectableAmount()
Section titled “calculateCollectableAmount()”function calculateCollectableAmount(paymentType: "Prepaid" | "COD", codAmount: number): number;Defined in: packages/sdk/src/utils/index.ts:35
Parameters
Section titled “Parameters”paymentType
Section titled “paymentType”"Prepaid" | "COD"
codAmount
Section titled “codAmount”number
Returns
Section titled “Returns”number
fileToBase64DataURI()
Section titled “fileToBase64DataURI()”function fileToBase64DataURI(file: File): Promise<string>;Defined in: packages/sdk/src/utils/index.ts:10
Parameters
Section titled “Parameters”File
Returns
Section titled “Returns”Promise<string>
formatZodErrors()
Section titled “formatZodErrors()”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
Parameters
Section titled “Parameters”zodErrors
Section titled “zodErrors”ZodIssue[]
Returns
Section titled “Returns”Record<string, string[]>
Example
Section titled “Example”const errors = formatZodErrors(zodError.issues);// { 'order_detail.invoice_id': ['Invalid format'] }isBigshipApiError()
Section titled “isBigshipApiError()”function isBigshipApiError(error: unknown): error is BigshipApiError;Defined in: packages/sdk/src/errors/index.ts:199
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is BigshipApiError
isBigshipAuthError()
Section titled “isBigshipAuthError()”function isBigshipAuthError(error: unknown): error is BigshipAuthError;Defined in: packages/sdk/src/errors/index.ts:191
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is BigshipAuthError
isBigshipDuplicateInvoiceError()
Section titled “isBigshipDuplicateInvoiceError()”function isBigshipDuplicateInvoiceError(error: unknown): error is BigshipDuplicateInvoiceError;Defined in: packages/sdk/src/errors/index.ts:183
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is BigshipDuplicateInvoiceError
isBigshipNetworkError()
Section titled “isBigshipNetworkError()”function isBigshipNetworkError(error: unknown): error is BigshipNetworkError;Defined in: packages/sdk/src/errors/index.ts:195
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is BigshipNetworkError
isBigshipValidationError()
Section titled “isBigshipValidationError()”function isBigshipValidationError(error: unknown): error is BigshipValidationError;Defined in: packages/sdk/src/errors/index.ts:187
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is BigshipValidationError
isFailedResponse()
Section titled “isFailedResponse()”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.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”response
Section titled “response”ApiResponse<T>
Returns
Section titled “Returns”response is ApiResponse<T> & { data: null; success: false }
Example
Section titled “Example”const response = await client.addSingleOrder(orderData);if (isFailedResponse(response)) { console.log('Error:', response.message);}isSuccessResponse()
Section titled “isSuccessResponse()”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
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”response
Section titled “response”ApiResponse<T>
Returns
Section titled “Returns”response is ApiResponse<T> & { data: T; success: true }
Example
Section titled “Example”const response = await client.addSingleOrder(orderData);if (isSuccessResponse(response)) { console.log(response.data); // Order ID (string)}isValidBase64DataURI()
Section titled “isValidBase64DataURI()”function isValidBase64DataURI(value: string): boolean;Defined in: packages/sdk/src/utils/index.ts:31
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
validateOrderDetail()
Section titled “validateOrderDetail()”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
Parameters
Section titled “Parameters”orderDetail
Section titled “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
Section titled “shipmentCategory”"b2c" | "b2b"
Returns
Section titled “Returns”void