Skip to main content
PATCH
Error

Authorizations

authorization
string
header
required
X-Workspace-ID
string
header
required

Path Parameters

id
integer
required

Body

application/json

Only the given keys change. supplier_id and currency can only change while the PO is a draft; nothing can change once it is closed or cancelled. Picking another company copies its name and refills the contact fields that aren't sent; re-sending the same company changes nothing.

supplier_id
integer

The supplier, a Contacts company of the workspace. Its name is copied into supplier_company_name; contact fields not sent are filled from it (primary person, primary address).

supplier_contact_name
string | null
supplier_contact_email
string | null
supplier_contact_phone
string | null
supplier_address
string | null
currency
string | null
name
string | null
notes
string | null
label
string
payment_term_ids
integer[]

Copy these workspace terms onto the order, in this order ([] = no terms). When neither this nor payment_terms is sent, the supplier company's terms are copied, else the workspace defaults — on create, and when a draft picks another company.

payment_terms
object[]

Replaces the order's payment lines (edited on the order only; terms aren't changed). Draft and open orders; a change to an issued order writes a revision. Issuing, and any change to an open order, is refused when the lines add up to more than the order total.

Maximum array length: 20

Response

OK

id
integer
required
project_ids
integer[]
required

The projects of the order's items, ascending (an order belongs to the workspace and can hold items of several projects); empty while it has no items.

label
string
required

Unique per workspace. Generated from the previous PO's label of the workspace when not given (PO-Alex-01 → PO-Alex-02, default series PO-0001) — one series across all projects.

status
enum<string>
required

draft until issued (an open order can be reverted to it); open once issued (receipts and invoices allowed); closed = no more deliveries (invoices still allowed); cancelled; voided = kept as history but counted nowhere (procured quantity, budget), final.

Available options:
draft,
open,
closed,
cancelled,
voided
revision
integer
required

Number of the latest revision. Revisions are written from issue onwards, one per change.

currency
string | null
required
Example:

"PLN"

supplier_id
integer
required

The supplier, a Contacts company of the workspace (may no longer exist).

supplier_company_name
string
required

The company's name when it was picked; a later rename in Contacts doesn't change it.

items_count
integer
required
total_amount
string
required

Σ item quantity × unit price, 2 decimals.

Example:

"296000.00"

invoiced_amount
string
required

This PO's share of its non-cancelled invoices (an invoice spanning several POs is split in proportion to each PO's items on it; extra charges are spread the same way).

paid_amount
string
required

Σ of the payment allocations to this PO (split when each payment was recorded). Can exceed invoiced_amount when a payment was allocated manually.

outstanding_amount
string
required

invoiced_amount − paid_amount.

name
string | null
notes
string | null
position
integer
supplier_contact_name
string | null
supplier_contact_email
string | null
supplier_contact_phone
string | null
supplier_address
string | null
issued_at
string<date-time> | null

Cleared when the order is reverted to draft.

voided_at
string<date-time> | null
voided_by_id
integer | null
created_by_id
integer | null
created_at
string<date-time>
updated_at
string<date-time>
payment_schedule
object

How the order's payment lines cover its total, derived on read.

payment_terms
object[]

The order's own payment lines in schedule order (position descending).

items
object[]

Only on show and create-from-baseline, ordered by position descending.

attachments
object[]

Only on show and create-from-baseline (with items). Newest first.