Cancel an order
Cancels every shipment of an order and refunds what was paid for each. Shipments that are already cancelled are skipped. Shipments not yet handed to the courier are cancelled immediately; for dispatched shipments the courier is asked to cancel first, and a courier refusal is returned as an error.
The order is refused as a whole if any shipment is already DELIVERED. Shipments are cancelled
one by one, so if an error occurs part-way, earlier shipments stay cancelled. To cancel a
single shipment, use Cancel a shipment.
Requires the READ_ORDER permission.
bearerAuthAuthorizationBearer <token>An access token from the OAuth2 client-credentials grant. Exchange your API key
(client_id + client_secret) at the token endpoint and send
Authorization: Bearer <access_token>.
orderCode*stringThe order code returned by Create an order.
^FSO-[0-9]{6}-[A-Z0-9]{6}$Every shipment of the order is cancelled.
application/json- response
statusCode*integermessage*stringdata?nullAlways empty.
curl -X POST 'https://sandbox-api.fastrac.example/b2b/orders/string/cancel'{ "statusCode": 200, "message": "Order successfully cancelled."}Was this page helpful?
Create an order POST
Books one or more quoted shipments **and pays for them in the same call**. Each shipment references a `shippingRateCode` from **Get shipping rates**; price, courier service, insurance, COD and packages are taken from that rate. The courier is booked before the response returns, so a successful response already carries each shipment's `airwayBill` and status `PENDING_PICKUP` or `PENDING_DROPOFF`. Requires the `CREATE_ORDER` permission. Orders that use a COD rate also require `USE_COD`. **Payment.** Non-COD orders deduct each shipment's `priceDetail.totalPrice` from your `shippingCredit` balance. COD orders deduct nothing upfront, and every shipment in one order must be either COD or non-COD. **Receivers** are matched to the rate's destinations by position: send them in the same order as the rate's `destinations` (`stopOrder`). If you send fewer receivers than destinations, the last receiver is reused. **Fulfilment.** `shippingOptions.fulfillmentMethod` defaults to `PICKUP` for instant services and `DROPOFF` otherwise. A regular-courier pickup needs `sender.coordinate`. A pickup `schedule` must be at least 15 minutes ahead (Asia/Jakarta); omitted, it is now + 15 minutes. For Lalamove and Dash instant services the pickup time is fixed by the quote: send the same `scheduledAt` you quoted with, or omit `schedule`. **If payment or courier booking fails**, the response is `400` with the message `Payment failed, but order '<code>' was created successfully. Reason: …`. The order stays unpaid and any charge is refunded; quote again and create a new order. If a courier rejects one shipment outright, the order still succeeds and that shipment is returned as `CANCELLED` and refunded. This call is not idempotent. On a timeout, check **List shipments** (filter by `search` or date) before you retry.
List shipments GET
Lists your shipments, newest first, with filters and per-status counts. Unpaid shipments are never listed. Use it for an order dashboard, or to find a shipment after a timeout. `data.count` covers all your shipments in the `startDate`–`endDate` range and ignores the other filters. `count.RTS` adds up `RTS_CONFIRMED` and `RTS_TRANSIT`. Requires the `READ_ORDER` permission.