Stores whose stock a 3PL runs
When a 3PL or warehouse system already writes every stock change into Shopify, Stockroom can cost the stock without touching it. Your integration sends each movement once, and Stockroom records it for costing.
What changes on the store
We switch a store to costing-only mode when the merchant asks (in Stockroom, Settings > API > Stock quantities > Request a change). From then on Stockroom never changes a Shopify quantity on that store - not on hand, not available, not incoming - whether the change comes from the app, from POS or from this API. Your system stays the only thing writing stock.
Purchase orders, receipts, stock adjustments and supplier returns all still work, and are costed exactly as on any other store: FIFO or weighted average, landed charges, exchange rates. A receipt or applied adjustment settles with shopify_sync.state = external instead ofsynced (see Stock changes and sync state).
Stocktakes, transfers, builds and kit splitting are refused with 422 stock_managed_externally, because each one would move stock your system owns. Sales are costed when an order is fulfilled, which is when Shopify's on hand drops.
What to send, and what not to
| Your event | Send it as |
|---|---|
| Goods receipt against a purchase order | POST /v2/purchase_orders/{id}/receipts with received_at, the quantity and unit_cost per line, and exchange_rate if the order is in another currency. Freight and duties go on the order as charges. |
| Stock correction, damage, write-off | A stock adjustment: POST /v2/stock_adjustments, thenPOST /v2/stock_adjustments/{id}/apply with occurred_at. |
| Stocktake difference | A stock adjustment with reason = cycle_count_available, applied the same way. |
| Return to supplier | Recorded in Stockroom as a supplier return, so its value comes out at the right cost. |
| Dispatch of a Shopify order | Don't send it. Sales are costed from the Shopify order when it is fulfilled. Sending it too would cost the sale twice. |
| Transfer between your locations | Don't send it. Costing is store-wide, so a move between locations changes no value. |
| Customer return refunded in Shopify with restock | Don't send it. The refund already put the units back and reversed the cost. |
Send each movement once, through one route. If your system sends a delivery here, the merchant's team should not also receive it in the Stockroom app.
Dates and your own ids
Every movement carries the day it happened: received_at on a receipt, andoccurred_at on an adjustment's apply. occurred_at takes a date (booked at noon that day, store time) or a date-time, never a future one. It is only accepted in costing-only mode - on a store Stockroom writes, an adjustment happens when it is applied, and the field is422 occurred_at_not_allowed.
Put your own number for the movement in external_id when you create the receipt or the adjustment. A second record with the same external_id is refused with409 duplicate_external_id, which names the record that already has it. That holds however long after the first one, unlike Idempotency-Key, which is kept for 24 hours - so a replay of last week's events is safe.
POST /v2/stock_adjustments
{
"location_id": 655441491,
"reason": "damaged",
"external_id": "EVX-CORR-20931",
"lines": [{ "sku": "SB-RUN-42-BLK", "delta": -2 }]
}
POST /v2/stock_adjustments/8812/apply
Idempotency-Key: EVX-CORR-20931
{ "occurred_at": "2026-11-12" }Checking the result
GET /v2/costing/reconciliation compares, per item, Stockroom's on hand by its costing records with Shopify's on hand. When your integration has sent every movement, each difference is zero.
{
"as_of": "2026-11-13T09:00:00Z",
"stock_managed_externally": true,
"basis": "fulfillment",
"totals": { "stockroom_on_hand": 4812, "shopify_on_hand": 4815, "difference": 3, "items_differing": 1 },
"data": [
{ "inventory_item_id": 4433, "sku": "SB-RUN-42-BLK", "stockroom_on_hand": 37,
"shopify_on_hand": 40, "difference": 3, "costed": true }
],
"next_cursor": null,
"has_more": false
}difference is Shopify minus Stockroom. Positive means Shopify holds units no movement brought in; negative means Stockroom recorded units Shopify never got. Sales reach Stockroom overnight, so an order shipped today can show here until tomorrow. Only differing items are listed unless you passinclude_matched=true, and the check is cached for five minutes.