Skip to content
StraventaDocs

Create draft purchase order

Creates a new purchase order in `draft` state. Requires `pos.inventory.purchase_orders.write`.

POST
/api/pos/v1/purchase-orders

Creates a new purchase order in draft state. Requires pos.inventory.purchase_orders.write.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/pos/v1/purchase-orders" \  -H "Content-Type: application/json" \  -d '{    "supplier_id": "018f4d9f-7b8a-7c2d-9a2d-1f8b92f6dc01",    "lines": [      {        "variant_id": "018f4d9f-7b8a-7c2d-9a2d-1f8b92f6d301",        "quantity": 10,        "unit_cost_cents": 12000      }    ]  }'
{
  "id": "018f4d9f-7b8a-7c2d-9a2d-1f8b92f6dd01",
  "status": "draft"
}
Empty
Empty
Empty

Was this page helpful?