StockroomAPIOpen the app
Reference

Kits

A kit is a variant the store sells as one item, with its own stock number, whose parts Stockroom knows - a wheel and tire set, say. Kits only take effect when the store turns on Kit orders: split into parts in Stockroom (Settings > Automation). From then on each order's kit line becomes its parts for purchasing, and the parts on hand come out of stock when the order is placed. Stockroom never writes the kit's own stock.

A kit has 1 to 50 parts, each in whole units from 1 to 999, and each part appears once. A kit can't be a part of another kit, and neither a kit nor a part can be a Shopify bundle (Shopify already splits a bundle's order line). An inactive kit is kept but not split.

Kit property rules add a part to any kit order line that carries a given line item property, such as a lug nut finish chosen at checkout.

Kits are part of a paid Stockroom plan, separate from the API itself: a store without them gets 402 feature_not_enabled on every route here. PUT /v2/kits loads up to 500 kits per request, by SKU or Shopify id.

#

List kits

GETapi.stockroom.app/v2/kits
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
skustringquery
The kit's own SKU, exact.
part_skustringquery
Kits that use the part with this SKU, exact.
statusstringquery
Comma-separated. An unknown status is 400 invalid_filter.
Responses
200
A page of kits, oldest update first.
a page of Kit in data, with next_cursor and has_more
Request
curl "https://api.stockroom.app/v2/kits" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": [
    {
      "id": 1,
      "status": "active",
      "kit": {
        "variant_id": 40011223344,
        "inventory_item_id": 44811223344,
        "product_id": 7011223344,
        "sku": "MUG-BLU",
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "deleted": true
      },
      "parts": [
        {
          "variant_id": 40011223344,
          "inventory_item_id": 44811223344,
          "product_id": 7011223344,
          "sku": "MUG-BLU",
          "product_title": "Stoneware mug",
          "variant_title": "Blue",
          "deleted": true,
          "unit_cost": "12.50",
          "quantity": 24
        }
      ],
      "cost": null,
      "cost_currency": null,
      "cost_complete": false,
      "created_at": "2026-09-01T10:00:00Z",
      "updated_at": "2026-09-11T08:12:44Z"
    }
  ],
  "next_cursor": "eyJpZCI6MTA0Mn0",
  "has_more": true
}
#

Create a kit

POSTapi.stockroom.app/v2/kits

One kit and its parts. Name the kit and each part by variant_id or inventory_item_id (Shopify ids) or by sku. A variant that is already a kit is refused with 422 kit_refused; to create or replace in one call, use PUT /v2/kits. A reference that matches nothing, or a SKU that two variants share, is 422 unknown_variant with the field in details. Any other rule the kit breaks (more than 50 parts, a quantity outside 1-999, a kit inside a kit, a Shopify bundle) is 422 kit_refused with a message that says which.

BodyJSON
kitKitRefrequired
One of variant_id, inventory_item_id or sku, tried in that order. A SKU matches regardless of case and must name exactly one variant.
partsarray of KitPartInputrequired
The kit's whole part list. Each part appears once.
statusstring
On create, defaults to active.
activeinactive
Responses
201
The new kit.
Kit in data
Request
curl -X POST "https://api.stockroom.app/v2/kits" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kit": {
    "sku": "WHL-1001-TIR-2002"
  },
  "parts": [
    {
      "sku": "WHL-1001",
      "quantity": 4
    },
    {
      "sku": "TIR-2002",
      "quantity": 4
    }
  ]
}'
Body
{
  "kit": {
    "sku": "WHL-1001-TIR-2002"
  },
  "parts": [
    {
      "sku": "WHL-1001",
      "quantity": 4
    },
    {
      "sku": "TIR-2002",
      "quantity": 4
    }
  ]
}
Response 201
{
  "data": {
    "id": 1,
    "status": "active",
    "kit": {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_id": 7011223344,
      "sku": "MUG-BLU",
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "deleted": true
    },
    "parts": [
      {
        "variant_id": 40011223344,
        "inventory_item_id": 44811223344,
        "product_id": 7011223344,
        "sku": "MUG-BLU",
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "deleted": true,
        "unit_cost": "12.50",
        "quantity": 24
      }
    ],
    "cost": null,
    "cost_currency": null,
    "cost_complete": false,
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Create or replace kits in bulk

PUTapi.stockroom.app/v2/kits

Up to 500 kits per request, each matched by its kit variant: a variant that is already a kit has its parts replaced, and any other becomes a new kit. parts is always the kit's whole part list. status is optional; left out, an existing kit keeps its status and a new one is active.

Each kit is checked and written on its own, so one bad kit does not stop the rest. The response has one result per kit, in request order, with its index: created, updated or refused. A refused kit carries an error - unknown_variant for a reference that matches nothing or several variants, invalid for a kit that is not shaped like one, and kit_refused for a kit that breaks a rule, with the rule in reason and a sentence in message. Only a request without a kits list, or with more than 500, is refused whole.

Sending the same kits again leaves them as they are (an unchanged kit is reported as updated and is not rewritten), so a failed request is safe to retry as it is and a nightly re-sync of a whole catalog is cheap. To load a large catalog, send it in batches of 500; the write limit of 60 per minute per store applies to each batch as one request.

BodyJSON
kitsarray of KitInputrequired
Responses
200
One result per kit.
a page of KitUpsertResult in data, with next_cursor and has_more
Request
curl -X PUT "https://api.stockroom.app/v2/kits" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kits": [
    {
      "kit": {
        "sku": "WHL-1001-TIR-2002"
      },
      "parts": [
        {
          "sku": "WHL-1001",
          "quantity": 4
        },
        {
          "sku": "TIR-2002",
          "quantity": 4
        }
      ]
    },
    {
      "kit": {
        "sku": "WHL-1001-TIR-2003"
      },
      "parts": [
        {
          "sku": "WHL-1001",
          "quantity": 4
        },
        {
          "sku": "TIR-2003",
          "quantity": 4
        }
      ]
    },
    {
      "kit": {
        "sku": "WHL-1004-TIR-2002"
      },
      "parts": [
        {
          "sku": "WHL-1004",
          "quantity": 4
        },
        {
          "sku": "TIR-2002",
          "quantity": 4
        }
      ],
      "status": "inactive"
    }
  ]
}'
Body
{
  "kits": [
    {
      "kit": {
        "sku": "WHL-1001-TIR-2002"
      },
      "parts": [
        {
          "sku": "WHL-1001",
          "quantity": 4
        },
        {
          "sku": "TIR-2002",
          "quantity": 4
        }
      ]
    },
    {
      "kit": {
        "sku": "WHL-1001-TIR-2003"
      },
      "parts": [
        {
          "sku": "WHL-1001",
          "quantity": 4
        },
        {
          "sku": "TIR-2003",
          "quantity": 4
        }
      ]
    },
    {
      "kit": {
        "sku": "WHL-1004-TIR-2002"
      },
      "parts": [
        {
          "sku": "WHL-1004",
          "quantity": 4
        },
        {
          "sku": "TIR-2002",
          "quantity": 4
        }
      ],
      "status": "inactive"
    }
  ]
}
Response 200
{
  "data": [
    {
      "index": 0,
      "kit_id": 812,
      "result": "created",
      "error": null
    },
    {
      "index": 1,
      "kit_id": 640,
      "result": "updated",
      "error": null
    },
    {
      "index": 2,
      "kit_id": null,
      "result": "refused",
      "error": {
        "code": "unknown_variant",
        "message": "No variant in this store has the SKU WHL-1004.",
        "field": "kits.2.parts.0.sku",
        "reason": null
      }
    }
  ],
  "summary": {
    "created": 1,
    "updated": 1,
    "refused": 1
  }
}
#

Get a kit

GETapi.stockroom.app/v2/kits/{id}
Path
idintegerpathrequired
Responses
200
The kit.
Kit in data
Request
curl "https://api.stockroom.app/v2/kits/1" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": {
    "id": 812,
    "status": "active",
    "kit": {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_id": 7011223344,
      "sku": "WHL-1001-TIR-2002",
      "product_title": "Trail wheel and tire set",
      "variant_title": "14 inch",
      "deleted": false
    },
    "parts": [
      {
        "variant_id": 40011223345,
        "inventory_item_id": 44811223345,
        "product_id": 7011223345,
        "sku": "WHL-1001",
        "product_title": "Trail wheel",
        "variant_title": "14 inch",
        "deleted": false,
        "unit_cost": "62.00",
        "quantity": 4
      },
      {
        "variant_id": 40011223346,
        "inventory_item_id": 44811223346,
        "product_id": 7011223346,
        "sku": "TIR-2002",
        "product_title": "All-terrain tire",
        "variant_title": "26x9-14",
        "deleted": false,
        "unit_cost": "48.50",
        "quantity": 4
      }
    ],
    "cost": "442.00",
    "cost_currency": "USD",
    "cost_complete": true,
    "created_at": "2026-11-05T15:02:11Z",
    "updated_at": "2026-11-05T15:02:11Z"
  }
}
#

Update a kit

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

Change status, replace parts, or both. parts is the whole new list. The kit's own variant cannot change; delete the kit and create another instead.

Path
idintegerpathrequired
BodyJSON
statusstring
activeinactive
partsarray of KitPartInput
Replaces the whole part list.
Responses
200
The updated kit.
Kit in data
Request
curl -X PATCH "https://api.stockroom.app/v2/kits/1" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "active",
  "parts": [
    {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "sku": "MUG-BLU",
      "quantity": 24
    }
  ]
}'
Body
{
  "status": "active",
  "parts": [
    {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "sku": "MUG-BLU",
      "quantity": 24
    }
  ]
}
Response 200
{
  "data": {
    "id": 1,
    "status": "active",
    "kit": {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_id": 7011223344,
      "sku": "MUG-BLU",
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "deleted": true
    },
    "parts": [
      {
        "variant_id": 40011223344,
        "inventory_item_id": 44811223344,
        "product_id": 7011223344,
        "sku": "MUG-BLU",
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "deleted": true,
        "unit_cost": "12.50",
        "quantity": 24
      }
    ],
    "cost": null,
    "cost_currency": null,
    "cost_complete": false,
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Delete a kit

DELETEapi.stockroom.app/v2/kits/{id}

Removes the kit and its parts. Orders already split and purchase order lines that named the kit keep their history. The variant itself is untouched in Shopify.

Path
idintegerpathrequired
Responses
200
Deleted.
200 answer, in data
idintegerrequired
deletedbooleanrequired
Request
curl -X DELETE "https://api.stockroom.app/v2/kits/1" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": {
    "id": 1,
    "deleted": true
  }
}
#

List kit property rules

GETapi.stockroom.app/v2/kit_property_rules
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
Responses
200
A page of rules, oldest update first.
a page of KitPropertyRule in data, with next_cursor and has_more
Request
curl "https://api.stockroom.app/v2/kit_property_rules" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": [
    {
      "id": 1,
      "property_name": "string",
      "property_value": "string",
      "part": {
        "variant_id": 40011223344,
        "inventory_item_id": 44811223344,
        "product_id": 7011223344,
        "sku": "MUG-BLU",
        "product_title": "Stoneware mug",
        "variant_title": "Blue",
        "deleted": true,
        "unit_cost": "12.50",
        "quantity": 24
      },
      "created_at": "2026-09-01T10:00:00Z",
      "updated_at": "2026-09-11T08:12:44Z"
    }
  ],
  "next_cursor": "eyJpZCI6MTA0Mn0",
  "has_more": true
}
#

Create a kit property rule

POSTapi.stockroom.app/v2/kit_property_rules

Adds part to every kit order line that carries this line item property. The name and value match regardless of case, and the quantity is per kit.

BodyJSON
property_namestring
The line item property's name, e.g. Lug nut finish.
property_valuestring
partobject
The part to add: variant_id, inventory_item_id or sku, and quantity per kit.
variant_idinteger or null
inventory_item_idinteger or null
skustring or null
quantityinteger
Responses
201
The new rule.
Request
curl -X POST "https://api.stockroom.app/v2/kit_property_rules" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "property_name": "Lug nut finish",
  "property_value": "Chrome",
  "part": {
    "sku": "LUG-CHR-16",
    "quantity": 1
  }
}'
Body
{
  "property_name": "Lug nut finish",
  "property_value": "Chrome",
  "part": {
    "sku": "LUG-CHR-16",
    "quantity": 1
  }
}
Response 201
{
  "data": {
    "id": 1,
    "property_name": "string",
    "property_value": "string",
    "part": {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_id": 7011223344,
      "sku": "MUG-BLU",
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "deleted": true,
      "unit_cost": "12.50",
      "quantity": 24
    },
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Update a kit property rule

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

Partial - only the fields sent change. part can carry just a new quantity.

Path
idintegerpathrequired
BodyJSON
property_namestring
The line item property's name, e.g. Lug nut finish.
property_valuestring
partobject
The part to add: variant_id, inventory_item_id or sku, and quantity per kit.
variant_idinteger or null
inventory_item_idinteger or null
skustring or null
quantityinteger
Responses
200
The updated rule.
Request
curl -X PATCH "https://api.stockroom.app/v2/kit_property_rules/1" \
  -H "Authorization: Bearer $STOCKROOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "property_name": "string",
  "property_value": "string",
  "part": {
    "variant_id": 40011223344,
    "inventory_item_id": 44811223344,
    "sku": "MUG-BLU",
    "quantity": 24
  }
}'
Body
{
  "property_name": "string",
  "property_value": "string",
  "part": {
    "variant_id": 40011223344,
    "inventory_item_id": 44811223344,
    "sku": "MUG-BLU",
    "quantity": 24
  }
}
Response 200
{
  "data": {
    "id": 1,
    "property_name": "string",
    "property_value": "string",
    "part": {
      "variant_id": 40011223344,
      "inventory_item_id": 44811223344,
      "product_id": 7011223344,
      "sku": "MUG-BLU",
      "product_title": "Stoneware mug",
      "variant_title": "Blue",
      "deleted": true,
      "unit_cost": "12.50",
      "quantity": 24
    },
    "created_at": "2026-09-01T10:00:00Z",
    "updated_at": "2026-09-11T08:12:44Z"
  }
}
#

Delete a kit property rule

DELETEapi.stockroom.app/v2/kit_property_rules/{id}
Path
idintegerpathrequired
Responses
200
Deleted.
200 answer, in data
idintegerrequired
deletedbooleanrequired
Request
curl -X DELETE "https://api.stockroom.app/v2/kit_property_rules/1" \
  -H "Authorization: Bearer $STOCKROOM_KEY"
Response 200
{
  "data": {
    "id": 1,
    "deleted": true
  }
}