Mục lục tài liệu
Sales & CRM · orders
The sell side, end to end — sales orders and their fulfilment plus the CRM pipeline that feeds them: leads, opportunities and quotations. A confirmed order reserves stock and hands off to distribution and finance; a converted quotation or lead flows straight into an order. Sync a CRM, an e-commerce front end or an order-management system against these endpoints.
/v1/orders/sales-ordersScope: orders:readList sales orders
Returns a cursor-paginated list of sales orders. Filter by status or customer.
| limitoptional | integerPage size, 1–200 (default 50). |
| cursoroptional | stringPagination cursor from a previous response. |
| statusoptional | stringFilter by status: draft, confirmed, fulfilled or cancelled. |
| customer_idoptional | stringFilter by customer (partner id). |
curl "https://api.apusplatform.com/v1/orders/sales-orders" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "so_1a2b",
"number": "SO-2026-000142",
"customer_id": "prt_1a2b",
"status": "confirmed",
"warehouse_id": "wh_hn1",
"total": {
"amount": 1250000,
"currency": "VND"
},
"created_at": "2026-07-18T03:14:00Z"
}
],
"has_more": true,
"next_cursor": "crsr_5f6g"
}/v1/orders/sales-ordersScope: orders:writeCreate a sales order
Creates a sales order in draft status. Prices default from the customer's price list when unit_price is omitted.
| customer_idrequired | stringCustomer (partner id). |
| linesrequired | arrayOrder lines: array of { sku, quantity, unit_price? }. |
| warehouse_idoptional | stringWarehouse fulfilling the order. |
curl -X POST "https://api.apusplatform.com/v1/orders/sales-orders" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "prt_1a2b",
"warehouse_id": "wh_hn1",
"lines": [
{
"sku": "STEEL-BRKT-08",
"quantity": 100,
"unit_price": {
"amount": 12500,
"currency": "VND"
}
}
]
}'{
"id": "so_1a2b",
"number": "SO-2026-000142",
"status": "draft",
"created_at": "2026-07-20T02:10:00Z"
}/v1/orders/sales-orders/{id}Scope: orders:readRetrieve a sales order
Returns a single sales order with its lines and totals.
| idrequired | stringSales order id. |
curl "https://api.apusplatform.com/v1/orders/sales-orders/so_1a2b" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "so_1a2b",
"number": "SO-2026-000142",
"customer_id": "prt_1a2b",
"status": "confirmed",
"warehouse_id": "wh_hn1",
"currency": "VND",
"lines": [
{
"sku": "STEEL-BRKT-08",
"quantity": 100,
"unit_price": {
"amount": 12500,
"currency": "VND"
},
"line_total": {
"amount": 1250000,
"currency": "VND"
}
}
],
"total": {
"amount": 1250000,
"currency": "VND"
},
"created_at": "2026-07-18T03:14:00Z",
"updated_at": "2026-07-18T06:20:00Z"
}/v1/orders/sales-orders/{id}/confirmScope: orders:writeConfirm a sales order
Confirms a draft order. Reserves stock and makes the order visible to distribution and finance.
| idrequired | stringSales order id. |
curl -X POST "https://api.apusplatform.com/v1/orders/sales-orders/so_1a2b/confirm" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "so_1a2b",
"number": "SO-2026-000142",
"status": "confirmed",
"confirmed_at": "2026-07-20T02:12:00Z"
}/v1/orders/sales-orders/{id}/cancelScope: orders:writeCancel a sales order
Cancels an order and releases any reserved stock. A cancelled order cannot be confirmed again.
| idrequired | stringSales order id. |
| reasonoptional | stringFree-text cancellation reason (stored on the order). |
curl -X POST "https://api.apusplatform.com/v1/orders/sales-orders/so_1a2b/cancel" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reason": "Customer withdrew the purchase order."
}'{
"id": "so_1a2b",
"status": "cancelled",
"cancel_reason": "Customer withdrew the purchase order.",
"cancelled_at": "2026-07-20T02:15:00Z"
}/v1/orders/shipmentsScope: orders:readList shipments
Returns a cursor-paginated list of shipments. Filter by order or delivery status.
| limitoptional | integerPage size, 1–200 (default 50). |
| cursoroptional | stringPagination cursor from a previous response. |
| order_idoptional | stringFilter by sales order id. |
| statusoptional | stringFilter by status: pending, packed, in_transit, delivered or returned. |
curl "https://api.apusplatform.com/v1/orders/shipments" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "shp_1x2y",
"order_id": "so_1a2b",
"status": "in_transit",
"carrier": "GHN",
"tracking_number": "GHN-4457821",
"shipped_at": "2026-07-19T01:00:00Z"
}
],
"has_more": false,
"next_cursor": null
}/v1/orders/returnsScope: orders:writeCreate a return
Opens a return (RMA) against a fulfilled order. Approving it restocks the items and credits the customer.
| order_idrequired | stringSales order the return is raised against. |
| linesrequired | arrayReturned lines: array of { sku, quantity }. |
| reasonoptional | stringReturn reason, e.g. damaged, wrong-item, surplus. |
curl -X POST "https://api.apusplatform.com/v1/orders/returns" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"order_id": "so_1a2b",
"reason": "damaged",
"lines": [
{
"sku": "STEEL-BRKT-08",
"quantity": 5
}
]
}'{
"id": "rtn_8k9l",
"order_id": "so_1a2b",
"status": "requested",
"created_at": "2026-07-20T02:35:00Z"
}Sẵn sàng tích hợp?
Tạo API client trong Account Console để lấy thông tin xác thực, hoặc trao đổi với kỹ sư tích hợp về bài toán của bạn.