Open Inventory / Docs
EndpointsPurchasingPurchase orders

Create a draft or ordered purchase order

The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.

POST
/purchase-orders

Authorization

bearerAuth
headerAuthorizationBearer <inv_ token>

Header Parameters

Idempotency-Key*string

UUID identifying this atomic operation; reuse it only to retry the exact same request.

Formatuuid
X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Request Body

application/json
  1. body
reference?|
Lengthlength <= 160
contactId?|
Formatuuid
supplier?string
Lengthlength <= 240
status?string
Value in"draft""ordered"
orderedAt?string
Formatdate-time
expectedAt?|
Formatdate-time
note?string
Lengthlength <= 20000
lines*array<|>
Items1 <= items <= 100

Response Body

Replayed the original purchase-order response

Example Request
curl -X POST 'https://inventory.example.com/api/v1/purchase-orders' \  -H 'Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "lines": [    {      "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6"    }  ]}'
Example Response
Empty