Skip to main content
PATCH
Update a purchase order (PATCH alias)

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Path Parameters

id
integer
required

ID of the purchase order to update

Body

application/json
order_date
string<date>
required

Date when the purchase order was created (YYYY-MM-DD)

Example:

"2024-01-15"

supplier_id
integer
required

ID of the supplier

Example:

123

items
object[]
required

Array of line items for the purchase order

Minimum array length: 1
warehouse_id
integer | null

ID of the warehouse

Example:

1

location_id
integer | null

ID of the location

Example:

1

order_status
default:active

Milestone status (token or numeric id). Also accepts 30 (production_active) and 88 (delivered) by id. Writes a milestone row and updates the PO header.

draft (101) and cancelled (100) are order states, not timeline milestones. They do not count as incoming stock and the purchase order cannot take a new receipt while in either state. Creating a purchase order with order_status: draft saves it as a draft from the start, so its lines never post incoming. Moving it to an open milestone later posts incoming at that point.

Available options:
active,
production_started,
production_completed,
in_transit,
completed,
draft,
cancelled,
deleted
Example:

"active"

order_numbers
string[] | null

Array of purchase order numbers used to identify the purchase order across various systems

Maximum string length: 255
Example:
invoice_date
string<date> | null

Date when the purchase order was invoiced (YYYY-MM-DD)

Example:

"2024-01-16"

incoterm
string | null

Incoterm (delivery term) for the purchase order, given as a logistic code configured for the account (e.g. exw, fob, ddp). Matching is case-insensitive — both the lower-case code (exw) and its upper-case label (EXW) are accepted. Returned on the purchase order resource as incoterm. If omitted, the account default is applied.

Example:

"exw"

payment_terms
string | null

Payment terms for the purchase order. Must exactly match one of the payment terms configured for the account (Manage > Suppliers); matching is case-sensitive (Net 30 passes where net 30 fails). Returned on the purchase order resource as payment_terms. If omitted, the account default is applied.

Example:

"Net 30"

currency_code
string | null

The purchase order's supplier currency: a three-letter code, in any case, listed by GET /currency/available. null puts the purchase order in base currency. Sending your base currency code explicitly also puts it in base currency, but stores the code (rate 1) so responses return it instead of null. On create, omitting it applies the supplier's default currency (base currency when the supplier has none). On update, omit to leave the currency and rate unchanged. Costs and totals stay in base currency.

Changing the currency restates presentment_unit_price at the new rate on every line the request does not price (unit_price and costs do not change). Responds 422 on currency_code when the code is unknown or no rate exists on or before order_date (send exchange_rate to supply one).

Required string length: 3
Example:

"EUR"

exchange_rate
number | null

Base-currency units per 1 unit of currency_code. Requires currency_code. If omitted, the rate on or before order_date is used. While the currency stays the same on update, the stored rate is kept and a different value here is ignored.

Required range: 1e-8 <= x <= 9999999999
Example:

1.085

total_shipping_cost
number<float> | null
default:0

Total shipping cost

Required range: x >= 0
Example:

50

total_tax
number<float> | null
default:0

Total tax amount

Required range: x >= 0
Example:

80

volume_target_cbm
number<float> | null

Target container volume in cubic metres (the container-fill gauge's denominator). When set, the purchase-order response reports volume_remaining_cbm and volume_fill_percent against it.

Required range: x >= 0
Example:

67

public_note
string | null

Public notes visible to suppliers

Example:

"Please ship via express delivery"

private_note
string | null

Internal private notes

Example:

"Rush order - expedite processing"

requested_ship_date
string<date> | null

Requested shipping date (YYYY-MM-DD)

Example:

"2024-01-20"

arrival_due_date
string<date> | null

Expected arrival date (YYYY-MM-DD)

Example:

"2024-01-25"

shipment_type
enum<string> | null

Freight mode used by the Transit Time Matrix. Matching is case-insensitive — sea and SEA are stored as Sea — but any other value returns 422. On update, omit to keep the stored value or send null to clear it.

When a request sends shipment_type or override_transit_days and the PO has a warehouse, the Original ETA (original_arrival_due_date) and current ETA (arrival_due_date) are filled from the transit matrix if empty. Arrival dates sent in the same request are always kept as sent.

When the PO has no requested_ship_date, the count starts from today, unless the account's transit_eta_requires_ship_date setting is on (off by default). Then both dates stay empty until the PO has a requested ship date, and a PUT /purchase-orders/{id} that sends requested_ship_date to a PO that already has a freight mode or override fills them while they are empty, even without shipment_type or override_transit_days in the request. Transfer POs are not affected.

Available options:
Air,
Sea,
Road,
Rail,
Express,
null
Example:

"Sea"

original_arrival_due_date
string<date> | null

Frozen Original ETA (YYYY-MM-DD) — the arrival date as first planned, kept separate from the current arrival_due_date. On update, omit to keep the stored value or send null to clear it.

Example:

"2024-01-25"

override_transit_days
integer | null

Manual override of the transit-matrix calendar days used to derive the arrival date. 0 is allowed. On update, omit to keep the stored value or send null to clear it.

Required range: 0 <= x <= 3650
Example:

35

ship_to
object | null

Shipping address information

payments
object[] | null

Array of payments for this purchase order. If provided, replaces all existing payments. Totals are automatically recalculated after payments are updated.

custom_fields
object | null

Custom field values for the purchase order

Example:
tags
string[] | null

Tags to associate with the purchase order

Maximum string length: 255
Example:

Response

Purchase order updated successfully

data
object