본문으로 건너뛰기
로그인
Apus Platform
문서 목차
orders

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.

GET/v1/orders/sales-ordersScope: orders:read

List sales orders

Returns a cursor-paginated list of sales orders. Filter by status or customer.

Query parameters
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
statusoptionalstringFilter by status: draft, confirmed, fulfilled or cancelled.
customer_idoptionalstringFilter by customer (partner id).
Request
curl "https://api.apusplatform.com/v1/orders/sales-orders" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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"
}
POST/v1/orders/sales-ordersScope: orders:write

Create a sales order

Creates a sales order in draft status. Prices default from the customer's price list when unit_price is omitted.

Body
customer_idrequiredstringCustomer (partner id).
linesrequiredarrayOrder lines: array of { sku, quantity, unit_price? }.
warehouse_idoptionalstringWarehouse fulfilling the order.
Request
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"
        }
      }
    ]
  }'
Response
{
  "id": "so_1a2b",
  "number": "SO-2026-000142",
  "status": "draft",
  "created_at": "2026-07-20T02:10:00Z"
}
GET/v1/orders/sales-orders/{id}Scope: orders:read

Retrieve a sales order

Returns a single sales order with its lines and totals.

Path parameters
idrequiredstringSales order id.
Request
curl "https://api.apusplatform.com/v1/orders/sales-orders/so_1a2b" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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"
}
POST/v1/orders/sales-orders/{id}/confirmScope: orders:write

Confirm a sales order

Confirms a draft order. Reserves stock and makes the order visible to distribution and finance.

Path parameters
idrequiredstringSales order id.
Request
curl -X POST "https://api.apusplatform.com/v1/orders/sales-orders/so_1a2b/confirm" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "id": "so_1a2b",
  "number": "SO-2026-000142",
  "status": "confirmed",
  "confirmed_at": "2026-07-20T02:12:00Z"
}
POST/v1/orders/sales-orders/{id}/cancelScope: orders:write

Cancel a sales order

Cancels an order and releases any reserved stock. A cancelled order cannot be confirmed again.

Path parameters
idrequiredstringSales order id.
Body
reasonoptionalstringFree-text cancellation reason (stored on the order).
Request
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."
  }'
Response
{
  "id": "so_1a2b",
  "status": "cancelled",
  "cancel_reason": "Customer withdrew the purchase order.",
  "cancelled_at": "2026-07-20T02:15:00Z"
}
GET/v1/orders/shipmentsScope: orders:read

List shipments

Returns a cursor-paginated list of shipments. Filter by order or delivery status.

Query parameters
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
order_idoptionalstringFilter by sales order id.
statusoptionalstringFilter by status: pending, packed, in_transit, delivered or returned.
Request
curl "https://api.apusplatform.com/v1/orders/shipments" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "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
}
POST/v1/orders/returnsScope: orders:write

Create a return

Opens a return (RMA) against a fulfilled order. Approving it restocks the items and credits the customer.

Body
order_idrequiredstringSales order the return is raised against.
linesrequiredarrayReturned lines: array of { sku, quantity }.
reasonoptionalstringReturn reason, e.g. damaged, wrong-item, surplus.
Request
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
      }
    ]
  }'
Response
{
  "id": "rtn_8k9l",
  "order_id": "so_1a2b",
  "status": "requested",
  "created_at": "2026-07-20T02:35:00Z"
}

연동을 시작할 준비가 되셨나요?

Account Console에서 API 클라이언트를 만들어 인증 정보를 발급받거나, 통합 엔지니어와 사용 사례를 상담하세요.

noindex