Skip to navigation

Update Purchase Order

View as Markdown
Replaces a Draft purchase order's fields and line items. Responds 409 when the purchase order is not in Draft.

Authentication

AuthorizationBearer

Authentication using Personal Access Token (PAT) token

OR
AuthorizationBearer
OAuth2 authentication using JWT tokens

Path parameters

idlongRequired
Id of the purchase order

Request

The purchase order’s new state

external_referencestringRequired>=1 character

The merchant’s own reference; must be unique among the merchant’s non-cancelled purchase orders.

line_itemslist of objectsRequired

The complete set of line items; an empty array removes them all.

notesstring or nullOptional

Free-text notes.

supplier_idinteger or nullOptional
Id of one of the merchant's suppliers.

Response

OK
created_atdatetimeOptional

When the purchase order was created (UTC).

external_referencestring or nullOptional

The merchant’s own reference, unique among the merchant’s non-cancelled purchase orders.

line_itemslist of objects or nullOptional
The expected line items.
notesstring or nullOptional

Free-text notes.

purchase_order_idlongOptional
Unique id of the purchase order.
statusobjectOptional
A purchase order status.
supplierobject or nullOptional
The supplier, or null when none is set.
updated_atdatetimeOptional

When the purchase order was last changed (UTC).

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error