StockroomAPIOpen the app
Reference

Stock adjustments

A signed delta per line, drafted and then applied. Applying moves stock and requires an Idempotency-Key. Stockroom adjusts by a delta and never sets an absolute level.

#

List stock adjustments

GETapi.stockroom.app/v2/stock_adjustments
Query
limitintegerquery
cursorstringquery
next_cursor from the previous page. A cursor that cannot be read is 400 invalid_cursor.
updated_at_minstring (date-time)query
updated_at_maxstring (date-time)query
created_at_minstring (date-time)query
created_at_maxstring (date-time)query
statusstringquery
Comma-separated.
location_idintegerquery
Responses
200
A page of adjustments, oldest update first.
a page of StockAdjustment in data, with next_cursor and has_more
Request
curl "https://api.stockroom.app/v2/stock_adjustments" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": [
    {
      "id": 1,
      "number": "PO-1042",
      "sequential_id": 1042,
      "status": "draft",
      "source": "api",
      "reason": "correction",
      "reason_label": "Correction",
      "note": "Two cartons short; supplier notified.",
      "location": {
        "id": 61234567890,
        "name": "Main warehouse"
      },
      "stocktake_id": null,
      "reversal_of_id": null,
      "lines": [
        {
          "id": 5001,
          "position": 1,
          "product_title": "Stoneware mug",
          "variant_title": "Blue",
          "sku": "MUG-BLU",
          "barcode": "0123456789012",
          "inventory_item_id": 44811223344,
          "variant_id": 40011223344,
          "delta": -3,
          "quantity_before": 42,
          "quantity_after": 39,
          "unit_cost": "12.50",
          "lot_id": null,
          "lot_units": null
        }
      ],
      "shopify_sync": {
        "state": "synced",
        "attempted_at": "2026-09-11T08:12:46Z",
        "error": null
      },
      "applied_at": "2026-09-11T08:12:44Z",
      "cancelled_at": null,
      "created_at": "2026-09-01T10:00:00Z",
      "updated_at": "2026-09-11T08:12:44Z"
    }
  ],
  "next_cursor": "eyJpZCI6MTA0Mn0",
  "has_more": true
}
#

Create a draft adjustment

POSTapi.stockroom.app/v2/stock_adjustments

A draft with signed delta lines at one location. Nothing moves until apply.

BodyJSON
location_idinteger
Shopify location id.
reasonstring or null
correctioncycle_count_availablereceivedrestockdamagedshrinkagepromotionother
notestring or null
linesarray of object
variant_idinteger or null
inventory_item_idinteger or null
product_titlestring or null
variant_titlestring or null
skustring or null
barcodestring or null
deltaintegerrequired
lot_idinteger or null
lot_numberstring or null
lot_unitsinteger or null
Responses
201
The draft.
Request
curl -X POST "https://api.stockroom.app/v2/stock_adjustments" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "location_id": 61234567890,
  "reason": "correction",
  "note": "Two cartons short; supplier notified.",
  "lines": [
    {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "sku": "MUG-BLU",
      "barcode": "0123456789012",
      "delta": -3,
      "lot_id": null,
      "lot_number": null,
      "lot_units": null
    }
  ]
}'
Body
{
  "location_id": 61234567890,
  "reason": "correction",
  "note": "Two cartons short; supplier notified.",
  "lines": [
    {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "sku": "MUG-BLU",
      "barcode": "0123456789012",
      "delta": -3,
      "lot_id": null,
      "lot_number": null,
      "lot_units": null
    }
  ]
}
Response 201
{
  "data": {
    "id": 1,
    "number": "PO-1042",
    "sequential_id": 1042,
    "status": "draft",
    "source": "api",
    "reason": "correction",
    "reason_label": "Correction",
    "note": "Two cartons short; supplier notified.",
    "location": {
      "id": 61234567890,
      "name": "Main warehouse"
    },
    "stocktake_id": null,
    "reversal_of_id": null,
    "lines": [
      {
        "id": 5001,
        "position": 1,
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "sku": "MUG-BLU",
        "barcode": "0123456789012",
        "inventory_item_id": 44811223344,
        "variant_id": 40011223344,
        "delta": -3,
        "quantity_before": 42,
        "quantity_after": 39,
        "unit_cost": "12.50",
        "lot_id": null,
        "lot_units": null
      }
    ],
    "shopify_sync": {
      "state": "synced",
      "attempted_at": "2026-09-11T08:12:46Z",
      "error": null
    },
    "applied_at": "2026-09-11T08:12:44Z",
    "cancelled_at": null,
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Get a stock adjustment

GETapi.stockroom.app/v2/stock_adjustments/{id}
Path
idintegerpathrequired
Responses
200
The adjustment.
Request
curl "https://api.stockroom.app/v2/stock_adjustments/88" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": {
    "id": 1,
    "number": "PO-1042",
    "sequential_id": 1042,
    "status": "draft",
    "source": "api",
    "reason": "correction",
    "reason_label": "Correction",
    "note": "Two cartons short; supplier notified.",
    "location": {
      "id": 61234567890,
      "name": "Main warehouse"
    },
    "stocktake_id": null,
    "reversal_of_id": null,
    "lines": [
      {
        "id": 5001,
        "position": 1,
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "sku": "MUG-BLU",
        "barcode": "0123456789012",
        "inventory_item_id": 44811223344,
        "variant_id": 40011223344,
        "delta": -3,
        "quantity_before": 42,
        "quantity_after": 39,
        "unit_cost": "12.50",
        "lot_id": null,
        "lot_units": null
      }
    ],
    "shopify_sync": {
      "state": "synced",
      "attempted_at": "2026-09-11T08:12:46Z",
      "error": null
    },
    "applied_at": "2026-09-11T08:12:44Z",
    "cancelled_at": null,
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Update a draft adjustment

PATCHapi.stockroom.app/v2/stock_adjustments/{id}

Drafts only. Sending lines replaces the line set.

Path
idintegerpathrequired
BodyJSON
location_idinteger
Shopify location id.
reasonstring or null
correctioncycle_count_availablereceivedrestockdamagedshrinkagepromotionother
notestring or null
linesarray of object
variant_idinteger or null
inventory_item_idinteger or null
product_titlestring or null
variant_titlestring or null
skustring or null
barcodestring or null
deltaintegerrequired
lot_idinteger or null
lot_numberstring or null
lot_unitsinteger or null
Responses
200
The draft.
Request
curl -X PATCH "https://api.stockroom.app/v2/stock_adjustments/88" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "location_id": 61234567890,
  "reason": "correction",
  "note": "Two cartons short; supplier notified.",
  "lines": [
    {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "sku": "MUG-BLU",
      "barcode": "0123456789012",
      "delta": -3,
      "lot_id": null,
      "lot_number": null,
      "lot_units": null
    }
  ]
}'
Body
{
  "location_id": 61234567890,
  "reason": "correction",
  "note": "Two cartons short; supplier notified.",
  "lines": [
    {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "sku": "MUG-BLU",
      "barcode": "0123456789012",
      "delta": -3,
      "lot_id": null,
      "lot_number": null,
      "lot_units": null
    }
  ]
}
Response 200
{
  "data": {
    "id": 1,
    "number": "PO-1042",
    "sequential_id": 1042,
    "status": "draft",
    "source": "api",
    "reason": "correction",
    "reason_label": "Correction",
    "note": "Two cartons short; supplier notified.",
    "location": {
      "id": 61234567890,
      "name": "Main warehouse"
    },
    "stocktake_id": null,
    "reversal_of_id": null,
    "lines": [
      {
        "id": 5001,
        "position": 1,
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "sku": "MUG-BLU",
        "barcode": "0123456789012",
        "inventory_item_id": 44811223344,
        "variant_id": 40011223344,
        "delta": -3,
        "quantity_before": 42,
        "quantity_after": 39,
        "unit_cost": "12.50",
        "lot_id": null,
        "lot_units": null
      }
    ],
    "shopify_sync": {
      "state": "synced",
      "attempted_at": "2026-09-11T08:12:46Z",
      "error": null
    },
    "applied_at": "2026-09-11T08:12:44Z",
    "cancelled_at": null,
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Apply a draft

POSTapi.stockroom.app/v2/stock_adjustments/{id}/apply

Applies the deltas and writes them to Shopify from a queue (shopify_sync). Applied is permanent - counter-adjust to undo. Requires an Idempotency-Key header.

Path
idintegerpathrequired
Headers
Idempotency-Keystringheaderrequired
Unique per request, up to 255 characters. The same key with the same body replays the stored response; with a different body it is 409 idempotency_key_reused.
Responses
200
The applied adjustment.
409
idempotency_key_reused.
Request
curl -X POST "https://api.stockroom.app/v2/stock_adjustments/88/apply" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "data": {
    "id": 1,
    "number": "PO-1042",
    "sequential_id": 1042,
    "status": "draft",
    "source": "api",
    "reason": "correction",
    "reason_label": "Correction",
    "note": "Two cartons short; supplier notified.",
    "location": {
      "id": 61234567890,
      "name": "Main warehouse"
    },
    "stocktake_id": null,
    "reversal_of_id": null,
    "lines": [
      {
        "id": 5001,
        "position": 1,
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "sku": "MUG-BLU",
        "barcode": "0123456789012",
        "inventory_item_id": 44811223344,
        "variant_id": 40011223344,
        "delta": -3,
        "quantity_before": 42,
        "quantity_after": 39,
        "unit_cost": "12.50",
        "lot_id": null,
        "lot_units": null
      }
    ],
    "shopify_sync": {
      "state": "synced",
      "attempted_at": "2026-09-11T08:12:46Z",
      "error": null
    },
    "applied_at": "2026-09-11T08:12:44Z",
    "cancelled_at": null,
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Cancel a draft

POSTapi.stockroom.app/v2/stock_adjustments/{id}/cancel
Path
idintegerpathrequired
Responses
200
The cancelled adjustment.
Request
curl -X POST "https://api.stockroom.app/v2/stock_adjustments/88/cancel" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": {
    "id": 1,
    "number": "PO-1042",
    "sequential_id": 1042,
    "status": "draft",
    "source": "api",
    "reason": "correction",
    "reason_label": "Correction",
    "note": "Two cartons short; supplier notified.",
    "location": {
      "id": 61234567890,
      "name": "Main warehouse"
    },
    "stocktake_id": null,
    "reversal_of_id": null,
    "lines": [
      {
        "id": 5001,
        "position": 1,
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "sku": "MUG-BLU",
        "barcode": "0123456789012",
        "inventory_item_id": 44811223344,
        "variant_id": 40011223344,
        "delta": -3,
        "quantity_before": 42,
        "quantity_after": 39,
        "unit_cost": "12.50",
        "lot_id": null,
        "lot_units": null
      }
    ],
    "shopify_sync": {
      "state": "synced",
      "attempted_at": "2026-09-11T08:12:46Z",
      "error": null
    },
    "applied_at": "2026-09-11T08:12:44Z",
    "cancelled_at": null,
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}