Kit components
Compose a catalogue item from other catalogue items as a kit bill-of-materials, with pool or fixed stock binding.
Overview
Kit components are composition lines on a catalogue item. Each line names another catalogue item, a quantity, a stock binding, and a display order. When a catalogue item owns at least one component, its denormalised is_kit flag is true. Kits are plain Eloquent (not event-sourced): create, update, and delete each go through an action that enforces the depth and cycle guard.
There is no standalone kit-components list page. Operators manage composition over the REST API (and MCP / CLI through the same endpoints). The catalogue item detail Flightcase Config tab reuses the same pool / fixed binding vocabulary when a barcoded item is a flightcase template — that is template configuration, not the kit BOM itself.
Composition rules
| Rule | Effect |
|---|---|
| No self-membership | A catalogue item cannot be a component of itself |
| No cycles | Adding a line that would loop the composition graph is rejected with 422 |
| Nesting depth | The configured maximum nesting depth is enforced before write |
| Unique component | The same component catalogue item cannot appear twice on one kit |
is_kit flag |
Flips true on the first component and is maintained in the same transaction as the line |
Concurrent duplicate inserts lose on the Postgres unique constraint and surface as the same 422 as the pre-insert duplicate check.
Binding
| Binding | Meaning |
|---|---|
pool (default) |
Drawn from general stock per job. Pool lines explode into ordinary rental-item demand and feed kit availability (the MIN-of-components formula) |
fixed |
Permanently assigned to a physical flightcase. Checked through flightcase demand rather than exploded per job |
Fields
| Field | Description |
|---|---|
catalogue_item_id |
The kit (parent catalogue item) |
component_catalogue_item_id |
The catalogue item on this line |
quantity |
Units of the component per kit (defaults to 1) |
binding |
pool or fixed |
sort_order |
Display order among kit lines (defaults to 0) |
API Access
Kit components are a nested resource under catalogue items. List requires the kits:read token ability; create, update, and delete require kits:write.
| Operation | Route |
|---|---|
| List | GET /api/v1/catalogue_items/{catalogue_item}/components |
| Add | POST /api/v1/catalogue_items/{catalogue_item}/components |
| Update | PUT|PATCH /api/v1/catalogue_items/{catalogue_item}/components/{component} |
| Remove | DELETE /api/v1/catalogue_items/{catalogue_item}/components/{component} |
See the API reference for request bodies and response shapes. Outbound webhooks include kit_component.created, kit_component.updated, and kit_component.deleted.