Skip to main content
POST
Create a purchase order

Authorizations

X-API-KEY
string
header
required

Supplier partner API key. Rate limited to 10 requests per 20-second window.

OW-KEY
string
header
required

OpenWrench shared secret. Required on every request alongside X-API-KEY; issued together with your API key.

Body

application/json

Purchase order create payload (fields consumed by the server, verified from source). supplierCompanyId and supplierFacilityId are always derived from the API key's contact and override any values sent. The purchase order is created together with its line items (incomingLineItems). totalCost is additionally required unless the supplier company's inventory settings mark PO cost as non-mandatory (it is mandatory by default); a missing mandatory totalCost is rejected with 400 "Total cost of PO cannot be empty". Unknown fields are ignored.

status
enum<string>
required

Status of the purchase order, typically "new" on create

Available options:
new,
ordered,
received,
cancelled,
closed,
partially_received
partEquipmentVendorId
integer<int32>
required

Vendor the order is placed with

currencyId
string
required
createdByEmail
string
required

Email recorded as the creator of the purchase order

id
integer<int64> | null

Optional id of an existing purchase order; when supplied, that purchase order is loaded and its writable fields are replaced with this payload instead of creating a new one

name
string | null
description
string | null
paymentTerms
string | null
shippingTerms
string | null
stockLocationId
integer<int64> | null
locationId
integer<int64> | null
brandId
integer<int32> | null
freightTotalBeforeTax
number | null
miscTotalBeforeTax
number | null
totalBeforeTax
number | null
tax
number | null
totalCost
number | null

Total cost of the PO. Required unless the supplier company's inventory settings mark PO cost as non-mandatory

internalNotes
string | null
incomingLineItems
object[]

Line items to create with the purchase order; omitting it creates a PO with no line items

Response

Successful response

Standard single-entity envelope wrapping a SupplierPurchaseOrder.

type
string
required

Entity type name, e.g. "SupplierPurchaseOrder"

data
object
required

A supplier inventory purchase order (PO).

status
enum<string>
required
Available options:
ok