Skip to main content

Orders

Create Order​

Creates a shipping order from a quote_id. The shipping cost is deducted from your balance when the order is created.

POST /courier/v1/orders

Request Body​

ParameterTypeRequiredDescription
quote_idstringyesFrom the Shipping Rates response.
courier_codestringyesCourier code chosen from the rate list.
service_codestringyesService code chosen from the rate list.
recipient_namestringyesRecipient name (3–30 characters).
recipient_phonestringyesRecipient phone (max 20 characters).
recipient_addressstringyesRecipient address (max 500 characters).
product_namestringyesProduct name (max 100 characters).
product_priceintegeryesProduct price (min 1).
quantityintegernoItem quantity (default 1).
insurancebooleannoInclude insurance.
notestringnoNote for the courier.
picked_up_timestringyesPickup time (ISO 8601).

Example Request​

curl -X POST 'https://use.api.co.id/courier/v1/orders' \
-H 'x-api-co-id: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"quote_id": "qt_9f2a7c1b8e3d4a5f",
"courier_code": "ninja",
"service_code": "STANDARD",
"recipient_name": "Siti Rahma",
"recipient_phone": "08120000000",
"recipient_address": "Jl. Merdeka No. 45, Jakarta Pusat",
"product_name": "Kaos Katun",
"product_price": 90000,
"quantity": 1,
"insurance": false,
"note": "Titip ke satpam",
"picked_up_time": "2026-08-08T09:00:00+07:00"
}'

Example Response​

{
"is_success": true,
"message": "Order berhasil dibuat.",
"data": {
"id": "ord_3a9f",
"resi": "TRK00012345",
"no_order": "INV-20260808-0001",
"status": "processing",
"courier_code": "ninja",
"courier_service": "Standard",
"shipping_price": 12000,
"handling_fee": 2000,
"insurance_cost": 0,
"charged_amount": 14000,
"is_cod": false,
"cod_amount": 0,
"weight_gram": 1000,
"recipient_name": "Siti Rahma",
"recipient_phone": "08120000000",
"product_name": "Kaos Katun",
"created_at": "2026-08-07T14:03:00+07:00",
"completed_at": null
}
}
info

COD is coming soon. Submit orders as non-COD; the COD fields (is_cod, cod_amount) are always zero for now.

List Orders​

Paginated list of orders.

GET /courier/v1/orders

Query Parameters​

ParameterTypeRequiredDescription
pageintegernoPage (default 1).
per_pageintegernoItems per page.

Example Request​

curl -X GET 'https://use.api.co.id/courier/v1/orders?page=1&per_page=20' \
-H 'x-api-co-id: YOUR_API_KEY'

Example Response​

{
"is_success": true,
"message": "OK",
"data": [
{ "id": "ord_3a9f", "resi": "TRK00012345", "no_order": "INV-20260808-0001", "status": "processing", "charged_amount": 14000 }
],
"paging": { "page": 1, "per_page": 20, "total": 1 }
}

Order Detail​

Details of a single order by ID.

GET /courier/v1/orders/{id}

Example Request​

curl -X GET 'https://use.api.co.id/courier/v1/orders/{id}' \
-H 'x-api-co-id: YOUR_API_KEY'

Example Response​

{
"is_success": true,
"message": "OK",
"data": {
"id": "ord_3a9f",
"resi": "TRK00012345",
"no_order": "INV-20260808-0001",
"status": "processing",
"courier_code": "ninja",
"courier_service": "Standard",
"shipping_price": 12000,
"handling_fee": 2000,
"insurance_cost": 0,
"charged_amount": 14000,
"is_cod": false,
"cod_amount": 0,
"weight_gram": 1000,
"recipient_name": "Siti Rahma",
"recipient_phone": "08120000000",
"product_name": "Kaos Katun",
"created_at": "2026-08-07T14:03:00+07:00",
"completed_at": null
}
}

Cancel Order​

Cancels an order that has not been picked up yet. The shipping cost is refunded to your balance if eligible.

POST /courier/v1/orders/{id}/cancel

Example Request​

curl -X POST 'https://use.api.co.id/courier/v1/orders/{id}/cancel' \
-H 'x-api-co-id: YOUR_API_KEY'

Example Response​

{
"is_success": true,
"message": "Order berhasil dibatalkan.",
"data": { "id": "ord_3a9f", "status": "cancelled" }
}
warning

Orders already picked up by the courier cannot be cancelled via the API. Make sure the ID is correct before calling this endpoint.

Try it out​

tip

Use your sandbox Test Key to try these endpoints without creating real shipments or charges. See Sandbox.

  • GET/courier/v1/ordersList Orders
  • POST/courier/v1/ordersCreate Order
  • GET/courier/v1/orders/{id}Order Detail
  • POST/courier/v1/orders/{id}/cancelCancel Order
Was this page helpful?