Set Purchase Order Lines

Replaces the full set of lines on the purchase order. Allowed while the PO is draft (update-purchase-orders permission) or approved (update-purchase-orders plus approve-purchase-orders permissions). Tax entries reference company tax ids; an entry with disabled: true is ignored.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

Purchase order id.

Body Params
lines
array of objects
required

Each line: variant_id (integer, required), unit (string, required — one of the variant's units, e.g. pcs), unit_quantity (number > 0, required), unit_cost (number >= 0, required — cost per unit), taxes (array, optional — {id} per tax, {id, disabled: true} to exclude one).

lines*
Headers
string
required

The merchant install this request acts on (install.store_id from the app.installed webhook).

Response

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json