Skip to main content
PUT
Update a purchase order receipt

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 receipt update payload (fields consumed by the server, verified from source). Supply id to identify the receipt being updated; when id is present the existing receipt's receivedBy, receivedOnWorkOrderCompletion and createdAt are preserved. NOTE: on this endpoint updatedBy and supplierFacilityId are read from the request body (they are not derived from the API key) and are required. receivedQuantity must be non-zero; a negative value records a return. When any of the receipt-value arrays is sent for a positive quantity, its length must equal receivedQuantity, none may be sent for a return (negative quantity), and serial/asset numbers must not already exist. Unknown fields are ignored.

receiptNumber
string
required
purchaseOrderLineItemId
integer<int64>
required
purchaseOrderId
integer<int64>
required
receivedQuantity
integer<int32>
required

Quantity received; must be non-zero. Negative records a return

updatedBy
string
required

Email recorded as the updater (also used as receivedBy for a new receipt)

supplierFacilityId
integer<int32>
required
id
integer<int64> | null

Id of the receipt to update

partId
integer<int64> | null
equipmentTypeId
integer<int64> | null
equipmentSerialNumbers
string[] | null
assetTypeId
integer<int32> | null
pricePerQuantity
number | null
invoiceNumber
string | null
invoiceCurrency
string | null
invoiceTotal
string | null
exchangeRate
string | null
invoiceTotalPostExchange
string | null
equipmentPerStockLocationReceiptValues
object[] | null

Per-unit serial/asset numbers for received stock equipment; length must equal receivedQuantity

assetReceiptValues
object[] | null

Per-unit serial/asset numbers for received assets; length must equal receivedQuantity

receiptValuesWithoutId
object[] | null

Per-unit serial/asset numbers without an id; length must equal receivedQuantity

Response

Successful response

Standard single-entity envelope wrapping a SupplierPurchaseOrderReceipt.

type
string
required

Entity type name, e.g. "SupplierPurchaseOrderReceipt"

data
object
required

A receipt recorded against a purchase order line item.

status
enum<string>
required
Available options:
ok