Orders and Shipments
The Bigship SDK has two distinct concepts: Orders and Shipments. Understanding the difference is essential for using the API correctly.
Orders
Section titled “Orders”An order is the data submission stage. You provide shipment details — consignee information, product details, payment method, and documents. At this point, no courier has been assigned and no physical movement has occurred.
Order methods:
| Method | Type | Description |
|---|---|---|
createOrder({ segment_type: 'domestic_b2c' }) |
B2C | Submit a single-box consumer order |
createOrder({ segment_type: 'domestic_b2b' }) |
B2B | Submit a multi-box business order |
const order = await client.createOrder({ segment_type: 'domestic_b2c', MasterOrderPickUpLocation: 123456, MasterOrderReturnLocation: 123456, MasterOrderDate: new Date().toISOString().replace('T', ' ').substring(0, 19), MasterOrderPaymentMode: 1, OrderInvoiceNo: `INV-${Date.now()}`, MasterOrderInvoiceAmount: 2500, MasterOrderShippingName: 'Jane Doe', MasterOrderShippingMobileNo: '9876543210', MasterOrderShippingAddress: '123 Main St', MasterOrderShippingZipCode: '400001', MasterOrderShippingCity: 'Mumbai', MasterOrderShippingState: 'Maharashtra', MasterOrderShippingCountry: 'India', totalNumOfBoxes: 1, boxes: [{ weight_unit: 'kg', dimension_unit: 'cm', noOfBoxes: 1, dimensions: [{ length: 20, breadth: 15, height: 10, weight: 0.5 }], products: [{ productName: 'Laptop', qty: '1', amount: '2500', totalAmount: 2500, collectableAmount: 0, categoryId: '4', }], }], invoice_document_file: 'data:application/pdf;base64,...',});Shipments
Section titled “Shipments”A shipment is the physical movement stage. After an order is manifested, a courier is assigned, an AWB or LRN is generated, and the package can be tracked and labeled.
Shipment methods:
| Method | Description |
|---|---|
placeOrder |
Assign courier to an order (manifest) |
getOrderDetail |
Retrieve full order details including AWB |
downloadDocument |
Retrieve shipping label or other documents |
// Place the order to create a shipmentconst place = await client.placeOrder({ MasterCustomOrderId: '311276742', courierId: 5, riskTypeId: '2',});
// Now retrieve the order detailsconst details = await client.getOrderDetail('311276742');
// Get the shipping labelconst label = await client.downloadDocument('311276742', 'label');Lifecycle
Section titled “Lifecycle”Order Created ──→ Placed ──→ Shipment Active ──→ Delivered(createOrder) (placeOrder) (AWB assigned) (tracked)An order becomes a shipment after manifestation (placeOrder). Until then, it exists only as a data record with no courier assignment or tracking number.