Skip to main content
POST
Create a purchase order

Authorizations

X-API-KEY
string
header
required
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 (verified against the shared purchase-order constructor). supplierCompanyId and supplierFacilityId are always overwritten from the API key's contact; caller values for them are ignored. dueDate is NOT consumed by this endpoint. Unknown fields are ignored.

status
string
required

REQUIRED. Status name, e.g. new / ordered / received / cancelled / closed / partially_received

partEquipmentVendorId
integer
required

REQUIRED. Vendor the order is placed with

currencyId
string
required

REQUIRED

createdByEmail
string
required

REQUIRED

totalCost
number

Required unless the supplier company's inventory settings mark PO cost as not mandatory (isPoCostMandatory=false)

id
integer<int64>

Existing purchase order id (update semantics); must exist when given

name
string
description
string
paymentTerms
string
shippingTerms
string
stockLocationId
integer<int64>
locationId
integer<int64>
brandId
integer
freightTotalBeforeTax
number
miscTotalBeforeTax
number
totalBeforeTax
number
tax
number
internalNotes
string
incomingLineItems
object[]

Response

Successful response

type
string
required

Entity type label, e.g. "SupplierPurchaseOrder". Endpoints that derive it via Scala reflection (most generic list/get endpoints) may return the fully qualified server class name instead (e.g. "models.workorder.WorkOrder"); treat this field as informational.

data
object
required

Supplier purchase order (hydrated location/brand/currency and deleted-line-item fields omitted).

status
enum<string>
required

"ok" on success

Available options:
ok