Purchase orders

POs are created from approved requisitions or manually.

The purchase orders model

Properties

  • Name
    id
    Type
    string
    Description

    Purchase order UUID.

  • Name
    status
    Type
    string
    Description

    PO workflow status.

  • Name
    supplierId
    Type
    string
    Description

    Target supplier.


GET/api/purchase-orders

List POs

Paginated PO list.

Query parameters

Query parameters: page, pageSize, status.

Request

GET
/api/purchase-orders
curl -X GET http://localhost:3000/api/purchase-orders \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "poNumber": "PO-2026-0018",
      "status": "APPROVED",
      "supplierId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "totalAmount": 1200
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 1
}

POST/api/purchase-orders

Create PO

Create purchase order.

Request

POST
/api/purchase-orders
curl -X POST http://localhost:3000/api/purchase-orders \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "poNumber": "PO-2026-0019",
  "status": "DRAFT"
}

POST/api/purchase-orders/:id/send

Send to supplier

Mark sent / notify supplier.

Request

POST
/api/purchase-orders/:id/send
curl -X POST http://localhost:3000/api/purchase-orders/:id/send \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "SENT",
  "sentAt": "2026-10-05T06:30:00.000Z"
}

POST/api/purchase-orders/:id/cancel

Cancel

Cancel open PO.

Request

POST
/api/purchase-orders/:id/cancel
curl -X POST http://localhost:3000/api/purchase-orders/:id/cancel \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "CANCELLED"
}

POST/api/purchase-orders/:id/reject

Reject

Reject PO in approval chain.

Request

POST
/api/purchase-orders/:id/reject
curl -X POST http://localhost:3000/api/purchase-orders/:id/reject \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "REJECTED"
}

Was this page helpful?