Skip to main content

Apply Opening Stock

POST 

/api/shopify/:integrationInstance/inventory/opening-stock/apply

Queue the apply of a preview: each warehouse's opening (initial) count is created on the inventory start date, or edited in place when one exists, with the previewed quantities and costs. Units already shipped without stock are repaid from the new opening layers. Rows that are unchanged, negative or without a Shopify level are not written, so applying again never doubles stock. Refused while the opening stock is locked (books live), and once a warehouse's stock has moved it needs a user who may override approval policies. Requires the inventory:write scope and the inventory.count permission.

Required scope: integrations:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body: preview_id (required, integer) — the preview to apply; include_missing_cost (optional, boolean, default false) — also load rows with no cost at a unit cost of 0.

Authentication: Requires Bearer token.

Request​

Responses​

OK

Response Headers
    Content-Type