StockroomAPIOpen the app
Reference

Costing

For stores whose stock quantities a 3PL or warehouse system writes into Shopify. Stockroom switches such a store to costing-only mode on request (Settings > API > Stock quantities > Request a change). In that mode Stockroom never changes a Shopify quantity - on hand, available or incoming - from any door. Receipts and adjustments are still recorded and costed exactly as on any store, with shopify_sync.state = external. Stocktakes, transfers, builds and kit splitting are refused with 422 stock_managed_externally, because each one would move stock the other system owns.

Send each movement once: a goods receipt against a purchase order as POST /purchase_orders/{id}/receipts (with received_at, costs, exchange_rate and charges), and a stock correction or stocktake difference as a stock adjustment applied with occurred_at. Put your own id for the movement in external_id - a second record with the same id is refused with 409 duplicate_external_id, however much later it is replayed. Don't send dispatches (sales are costed from Shopify orders when they are fulfilled), transfers between your locations (costing is store-wide), or customer returns that went through a Shopify refund with restock (already counted).

GET /costing/reconciliation checks the result: per item, Stockroom's costing ledger against Shopify's on hand. On a complete integration every difference is zero.

#

Check the costing ledger against Shopify

GETapi.stockroom.app/v2/costing/reconciliation

Per item: Stockroom's on hand by its costing ledger (opening stock + receipts - sales + restocks +/- adjustments - supplier returns, through today) beside Shopify's on hand. difference = Shopify minus Stockroom: positive means Shopify holds units no movement brought in, negative means Stockroom recorded units Shopify never got. On a costing-only store with a complete integration every difference is zero. Sales reach the ledger nightly, so a sale shipped today can show here until tomorrow.

Only items that differ, unless include_matched=true. Ordered by inventory_item_id. The check is computed once and cached for five minutes - as_of says when.

Query
limitintegerquery
cursorstringquery
next_cursor from the previous page. A cursor that cannot be read is 400 invalid_cursor.
include_matchedstringquery
Also list items whose difference is zero.
truefalse
Responses
200
A page of items, with store-wide totals.
200 answer
as_ofTimestamprequired
ISO 8601, UTC.
stock_managed_externallybooleanrequired
The store is in costing-only mode.
cutoverstring (date) or nullrequired
The store's costing start date. Null until opening stock is recorded.
methodstringrequired
fifoweighted_average
basisstringrequired
When a sale is costed: when ordered, or when fulfilled.
orderfulfillment
totalsobjectrequired
stockroom_on_handnumberrequired
shopify_on_handnumberrequired
differencenumberrequired
items_differingintegerrequired
dataarray of objectrequired
inventory_item_idintegerrequired
variant_idinteger or nullrequired
skustring or nullrequired
product_titlestring or nullrequired
variant_titlestring or nullrequired
stockroom_on_handnumberrequired
shopify_on_handnumberrequired
differencenumberrequired
costedbooleanrequired
False when a foreign-currency opening cost keeps the item out of costing; its whole stock shows as a difference.
next_cursorstring or nullrequired
has_morebooleanrequired
Request
curl "https://api.stockroom.app/v2/costing/reconciliation" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "as_of": "2026-09-11T08:12:44Z",
  "stock_managed_externally": false,
  "cutover": "2026-09-11",
  "method": "fifo",
  "basis": "order",
  "totals": {
    "stockroom_on_hand": 1,
    "shopify_on_hand": 1,
    "difference": 1,
    "items_differing": 1
  },
  "data": [
    {
      "inventory_item_id": 44811223344,
      "variant_id": 40011223344,
      "sku": "MUG-BLU",
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "stockroom_on_hand": 1,
      "shopify_on_hand": 1,
      "difference": 1,
      "costed": false
    }
  ],
  "next_cursor": "eyJpZCI6MTA0Mn0",
  "has_more": true
}