Create Purchase Orders from Low Stocks

Creates draft purchase orders to restock the given stock records (variant-at-location rows, as returned by the stock endpoints). Every stock must be at or below its reorder limit and its product must have a supplier, otherwise the call fails with 400. Stocks are grouped by location and supplier — one draft PO per group — and each line's quantity is reorder_limit - current count in the variant's default unit, costed at the variant's current cost price at the location. Requires the create-purchase-orders permission at each location.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
stocks
array of integers
required

Stock record ids to reorder.

stocks*
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