Skip to content

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).

Method Type Description
placeOrder B2C/B2B Assign a courier to an order
const result = await client.placeOrder({
MasterCustomOrderId: '311276742',
courierId: 5,
riskTypeId: '2',
});
// After this, AWB is generated for the order
const result = await client.placeOrder({
MasterCustomOrderId: '311276742',
courierId: 25,
riskTypeId: '2',
});
// After this, AWB/LRN is generated for the order
  1. A courier is assigned to the order
  2. An AWB (B2C/B2B) is generated
  3. Shipping labels become available via downloadDocument
  4. The shipment becomes trackable via trackOrder

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.

// 1. Create the order
const 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 details
const details = await client.getOrderDetail(order.data!.CustomGlobalOrderId);
// 4. Get the shipping label
const label = await client.downloadDocument(order.data!.CustomGlobalOrderId, 'label');