Manifestation
Manifestation is the process of assigning a courier to a confirmed order. After manifestation, the order becomes a shipment with a tracking number (AWB for B2C, LRN for B2B).
Manifestation Methods
Section titled “Manifestation Methods”| Method | Type | Description |
|---|---|---|
placeOrder |
B2C/B2B | Assign a courier to an order |
B2C Manifestation
Section titled “B2C Manifestation”const result = await client.placeOrder({ MasterCustomOrderId: '311276742', courierId: 5, riskTypeId: '2',});// After this, AWB is generated for the orderB2B Manifestation
Section titled “B2B Manifestation”const result = await client.placeOrder({ MasterCustomOrderId: '311276742', courierId: 25, riskTypeId: '2',});// After this, AWB/LRN is generated for the orderWhat Happens After Manifestation
Section titled “What Happens After Manifestation”- A courier is assigned to the order
- An AWB (B2C/B2B) is generated
- Shipping labels become available via
downloadDocument - The shipment becomes trackable via
trackOrder
Convenience: ShipmentWorkflow
Section titled “Convenience: ShipmentWorkflow”For B2C flows, the SDK provides a workflow builder that creates, manifests, and retrieves documents in a fluent API:
const result = await new ShipmentWorkflow(client) .create(orderPayload) .withCourier(5) .place() .finalize();
console.log(result.orderId);console.log(result.orderDetail?.getOrderDetails.AwbNumber);This is equivalent to calling createOrder → getServiceableCouriers → placeOrder → getOrderDetail, but saves you from managing intermediate IDs.
Full Flow Example
Section titled “Full Flow Example”// 1. Create the orderconst order = await client.createOrder({ segment_type: 'domestic_b2c', // ...payload});
// 2. Place it (manifest)const place = await client.placeOrder({ MasterCustomOrderId: order.data!.CustomGlobalOrderId, courierId: 5, riskTypeId: '2',});
// 3. Get the order detailsconst details = await client.getOrderDetail(order.data!.CustomGlobalOrderId);
// 4. Get the shipping labelconst label = await client.downloadDocument(order.data!.CustomGlobalOrderId, 'label');