Skip to main content
PATCH

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

purchaseOrderId
integer
required

ID of the purchase order the line item belongs to

lineItemId
integer
required

ID of the purchase-order line item to edit

Body

application/json

At least one of quantity or unit_price is required.

quantity
number<float>

New ordered quantity in the line's ordered unit of measure. Must be greater than 0 and not less than the quantity already received. Required when unit_price is omitted.

Required range: x > 0
Example:

120

unit_price
number<float>

New unit price in the base currency. Required when quantity is omitted.

Required range: x >= 0
Example:

4.25

Response

Line updated. data is the edited line; purchase_order is the whole purchase order after the edit (same shape as GET /purchase-orders/{id}), so its new totals can be read without a second request.

data
object
purchase_order
object

The updated purchase order, in the same shape as GET /purchase-orders/{id}, with its totals recomputed after the line change.