Перейти к основному содержанию
Войти
Apus Platform
Содержание документации
purchasing

Purchasing

Procure-to-pay: requisitions, RFQs, purchase orders, goods receipts and supplier invoices. Orders you place with suppliers and the receiving status against them. Drive procurement from an external system, or read receiving and matching status for AP automation.

GET/v1/purchasing/purchase-ordersScope: purchasing:read

List purchase orders

Returns a cursor-paginated list of purchase orders. Use updated_since for incremental sync.

Query parameters
statusoptionalstringFilter by status: draft | sent | received | closed.
supplier_idoptionalstringFilter by supplier (partner id).
limitoptionalintegerPage size, 1–200 (default 50).
cursoroptionalstringPagination cursor from a previous response.
updated_sinceoptionalstringRFC 3339 timestamp; return orders changed after it.
Request
curl "https://api.apusplatform.com/v1/purchasing/purchase-orders" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "po_3310",
      "number": "PO-2026-3310",
      "supplier_id": "prt_501",
      "status": "sent",
      "expected_at": "2026-07-28",
      "total": {
        "amount": 92000000,
        "currency": "VND"
      },
      "updated_at": "2026-07-18T09:12:04Z"
    }
  ],
  "has_more": true,
  "next_cursor": "crsr_po44"
}
POST/v1/purchasing/purchase-ordersScope: purchasing:write

Create a purchase order

Creates a purchase order for a supplier. lines must not be empty.

Body
supplier_idrequiredstringPartner id of the supplier.
linesrequiredarray[{ sku, quantity, unit_price }].
expected_atoptionalstringExpected delivery date (RFC 3339).
Request
curl -X POST "https://api.apusplatform.com/v1/purchasing/purchase-orders" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "supplier_id": "prt_501",
    "lines": [
      {
        "sku": "STEEL-COIL-2MM",
        "quantity": 40,
        "unit_price": {
          "amount": 2300000,
          "currency": "VND"
        }
      }
    ],
    "expected_at": "2026-07-28"
  }'
Response
{
  "id": "po_3311",
  "number": "PO-2026-3311",
  "status": "sent",
  "created_at": "2026-07-20T02:10:00Z"
}
GET/v1/purchasing/purchase-orders/{id}Scope: purchasing:read

Retrieve a purchase order

Returns a single purchase order by its id, including its lines.

Path parameters
idrequiredstringPurchase order id.
Request
curl "https://api.apusplatform.com/v1/purchasing/purchase-orders/po_3310" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "id": "po_3310",
  "number": "PO-2026-3310",
  "supplier_id": "prt_501",
  "status": "sent",
  "expected_at": "2026-07-28",
  "lines": [
    {
      "sku": "STEEL-COIL-2MM",
      "quantity": 40,
      "unit_price": {
        "amount": 2300000,
        "currency": "VND"
      }
    }
  ],
  "total": {
    "amount": 92000000,
    "currency": "VND"
  },
  "updated_at": "2026-07-18T09:12:04Z"
}
PATCH/v1/purchasing/purchase-orders/{id}Scope: purchasing:write

Update a purchase order

Updates mutable fields of a draft or sent purchase order. Only supplied fields change.

Path parameters
idrequiredstringPurchase order id.
Body
expected_atoptionalstringExpected delivery date (RFC 3339).
linesoptionalarrayReplace the order lines: [{ sku, quantity, unit_price }].
statusoptionalstringAdvance the status, e.g. draft → sent.
Request
curl -X PATCH "https://api.apusplatform.com/v1/purchasing/purchase-orders/po_3311" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "expected_at": "2026-07-30"
  }'
Response
{
  "id": "po_3311",
  "number": "PO-2026-3311",
  "status": "sent",
  "updated_at": "2026-07-20T02:12:00Z"
}
POST/v1/purchasing/purchase-orders/{id}/cancelScope: purchasing:write

Cancel a purchase order

Cancels a purchase order. Only orders with no goods received can be cancelled.

Path parameters
idrequiredstringPurchase order id.
Body
reasonoptionalstringOptional cancellation reason (stored on the audit trail).
Request
curl -X POST "https://api.apusplatform.com/v1/purchasing/purchase-orders/po_3311/cancel" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Supplier out of stock."
  }'
Response
{
  "id": "po_3311",
  "status": "cancelled",
  "cancelled_at": "2026-07-20T02:30:00Z"
}
POST/v1/purchasing/purchase-orders/{id}/receiptsScope: purchasing:write

Receive goods

Records a goods receipt against a purchase order. Increases inventory in real time.

Path parameters
idrequiredstringPurchase order id.
Body
warehouse_idrequiredstringReceiving warehouse.
linesrequiredarray[{ sku, quantity_received }].
Request
curl -X POST "https://api.apusplatform.com/v1/purchasing/purchase-orders/rcpt_88a1/receipts" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "warehouse_id": "wh_north",
    "lines": [
      {
        "sku": "STEEL-COIL-2MM",
        "quantity_received": 40
      }
    ]
  }'
Response
{
  "id": "rcpt_88a1",
  "purchase_order_id": "po_3311",
  "status": "received",
  "received_at": "2026-07-20T03:00:00Z"
}
GET/v1/purchasing/goods-receiptsScope: purchasing:read

List goods receipts

Returns goods receipts, filterable by purchase order or warehouse.

Query parameters
purchase_order_idoptionalstringFilter by source purchase order.
warehouse_idoptionalstringFilter by receiving warehouse.
Request
curl "https://api.apusplatform.com/v1/purchasing/goods-receipts" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "rcpt_88a1",
      "purchase_order_id": "po_3311",
      "warehouse_id": "wh_north",
      "status": "received",
      "received_at": "2026-07-20T03:00:00Z"
    }
  ]
}
GET/v1/purchasing/purchase-requisitionsScope: purchasing:read

List purchase requisitions

Returns internal purchase requisitions awaiting sourcing or approval.

Query parameters
statusoptionalstringFilter by status: pending | approved | rejected | ordered.
Request
curl "https://api.apusplatform.com/v1/purchasing/purchase-requisitions" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "req_7011",
      "number": "PR-2026-7011",
      "department": "maintenance",
      "status": "pending",
      "created_at": "2026-07-19T06:40:00Z"
    }
  ]
}
POST/v1/purchasing/purchase-requisitionsScope: purchasing:write

Create a purchase requisition

Raises an internal purchase requisition. lines must not be empty.

Body
departmentrequiredstringRequesting department code.
linesrequiredarray[{ sku, quantity }].
needed_byoptionalstringDate the goods are needed (RFC 3339).
Request
curl -X POST "https://api.apusplatform.com/v1/purchasing/purchase-requisitions" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "department": "maintenance",
    "lines": [
      {
        "sku": "BEARING-6204",
        "quantity": 12
      }
    ],
    "needed_by": "2026-08-05"
  }'
Response
{
  "id": "req_7012",
  "number": "PR-2026-7012",
  "status": "pending",
  "created_at": "2026-07-20T02:15:00Z"
}
POST/v1/purchasing/purchase-requisitions/{id}/approvalsScope: purchasing:write

Approve a requisition

Records an approval decision (approve or reject) on a purchase requisition.

Path parameters
idrequiredstringPurchase requisition id.
Body
decisionrequiredstringapprove | reject.
commentoptionalstringOptional reviewer note.
Request
curl -X POST "https://api.apusplatform.com/v1/purchasing/purchase-requisitions/req_7012/approvals" \
  -H "Authorization: Bearer $APUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "approve",
    "comment": "Within budget."
  }'
Response
{
  "id": "req_7012",
  "status": "approved",
  "approved_at": "2026-07-20T02:50:00Z"
}
GET/v1/purchasing/rfqsScope: purchasing:read

List requests for quotation

Returns requests for quotation sent to suppliers, filterable by status.

Query parameters
statusoptionalstringFilter by status: open | quoted | awarded | closed.
Request
curl "https://api.apusplatform.com/v1/purchasing/rfqs" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "rfq_402",
      "number": "RFQ-2026-402",
      "status": "open",
      "supplier_ids": [
        "prt_501",
        "prt_530"
      ],
      "due_at": "2026-07-25T00:00:00Z"
    }
  ]
}
GET/v1/purchasing/supplier-invoicesScope: purchasing:read

List supplier invoices

Returns supplier (AP) invoices, filterable by supplier and status. Use for three-way matching.

Query parameters
supplier_idoptionalstringFilter by supplier (partner id).
statusoptionalstringFilter by status: draft | matched | approved | paid.
Request
curl "https://api.apusplatform.com/v1/purchasing/supplier-invoices" \
  -H "Authorization: Bearer $APUS_TOKEN"
Response
{
  "data": [
    {
      "id": "sinv_9120",
      "number": "SINV-2026-9120",
      "supplier_id": "prt_501",
      "purchase_order_id": "po_3310",
      "status": "matched",
      "total": {
        "amount": 92000000,
        "currency": "VND"
      },
      "due_at": "2026-08-17"
    }
  ]
}

Готовы к интеграции?

Создайте API-клиент в Консоли аккаунта, чтобы получить учётные данные, или обсудите ваш сценарий с инженером по интеграции.

noindex