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
| Parameter | Type | Required | Description |
|---|---|---|---|
quote_id | string | yes | From the Shipping Rates response. |
courier_code | string | yes | Courier code chosen from the rate list. |
service_code | string | yes | Service code chosen from the rate list. |
recipient_name | string | yes | Recipient name (3–30 characters). |
recipient_phone | string | yes | Recipient phone (max 20 characters). |
recipient_address | string | yes | Recipient address (max 500 characters). |
product_name | string | yes | Product name (max 100 characters). |
product_price | integer | yes | Product price (min 1). |
quantity | integer | no | Item quantity (default 1). |
insurance | boolean | no | Include insurance. |
note | string | no | Note for the courier. |
picked_up_time | string | yes | Pickup time (ISO 8601). |
Example Request
- cURL
- JavaScript
- Python
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"
}'
const res = await fetch('https://use.api.co.id/courier/v1/orders', {
method: 'POST',
headers: {
'x-api-co-id': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"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"
}),
});
const data = await res.json();
import requests
res = requests.post(
"https://use.api.co.id/courier/v1/orders",
json={"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"},
headers={"x-api-co-id": "YOUR_API_KEY"},
)
data = res.json()
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
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page (default 1). |
per_page | integer | no | Items per page. |
Example Request
- cURL
- JavaScript
- Python
curl -X GET 'https://use.api.co.id/courier/v1/orders?page=1&per_page=20' \
-H 'x-api-co-id: YOUR_API_KEY'
const res = await fetch('https://use.api.co.id/courier/v1/orders?page=1&per_page=20', {
method: 'GET',
headers: {
'x-api-co-id': 'YOUR_API_KEY',
},
});
const data = await res.json();
import requests
res = requests.get(
"https://use.api.co.id/courier/v1/orders",
params={"page":"1","per_page":"20"},
headers={"x-api-co-id": "YOUR_API_KEY"},
)
data = res.json()
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
- JavaScript
- Python
curl -X GET 'https://use.api.co.id/courier/v1/orders/{id}' \
-H 'x-api-co-id: YOUR_API_KEY'
const res = await fetch('https://use.api.co.id/courier/v1/orders/{id}', {
method: 'GET',
headers: {
'x-api-co-id': 'YOUR_API_KEY',
},
});
const data = await res.json();
import requests
res = requests.get(
"https://use.api.co.id/courier/v1/orders/{id}",
headers={"x-api-co-id": "YOUR_API_KEY"},
)
data = res.json()
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
- JavaScript
- Python
curl -X POST 'https://use.api.co.id/courier/v1/orders/{id}/cancel' \
-H 'x-api-co-id: YOUR_API_KEY'
const res = await fetch('https://use.api.co.id/courier/v1/orders/{id}/cancel', {
method: 'POST',
headers: {
'x-api-co-id': 'YOUR_API_KEY',
},
});
const data = await res.json();
import requests
res = requests.post(
"https://use.api.co.id/courier/v1/orders/{id}/cancel",
headers={"x-api-co-id": "YOUR_API_KEY"},
)
data = res.json()
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?