Skip to main content
PATCH
Update Purchase Order

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Path Parameters

id
string
required

Body

application/json

Schema for updating a purchase order. All fields are optional.

lineItems
PurchaseOrderLineItemCreate · object[] | null

Optional new list of line items (replaces existing)

notes
(PurchaseOrderNoteUpdate · object | PurchaseOrderNoteCreate · object)[] | null

Optional new list of notes (replaces existing)

Schema for updating a purchase order note.

Response

Successful Response

Purchase order response with computed lead time.

supplierId
string
required

ID of the supplier

id
string

Unique identifier for the purchase order

status
enum<string>
default:PENDING

Status of the purchase order

Available options:
PENDING,
PLACED,
COMPLETED,
CANCELLED
issueDate
string<date-time> | null

Date when the purchase order was sent to supplier

completedDate
string<date-time> | null

Date when all shipments are DELIVERED (purchase order completed)

supplier
Supplier · object | null

Optional supplier details

lineItems
PurchaseOrderLineItemWithDetails · object[] | null

Line items with details

notes
PurchaseOrderNote · object[] | null

Notes attached to this purchase order

createdDate
string<date-time> | null

Date and time the purchase order was created

updatedDate
string<date-time> | null

Date and time the purchase order was last updated

isArchived
boolean
default:false

Whether the purchase order is archived

leadTimeDays
integer | null

Maximum lead time in days across all line items (estimated delivery time from order placement)