E089: Get BOM for a SKU
GET /api/skus/:id/bom
Returns the BOM composition for one output SKU. Triggered from BOM Detail and from any workflow that needs to read the recipe (notably W129, Create work order, which uses it to compute material costs and seed the WO recipe snapshot).
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.
Request
No body. :id is the output SKU id, not the BOM id — this is the canonical lookup the WO-create flow uses.
Response — 200 OK
{
"outputSkuId": "uuid",
"items": [ BomItem ]
}
Each BomItem is { "id", "orgId", "skuId", "materialId", "inputSkuId", "quantity", "createdAt" } (one of materialId / inputSkuId is null).
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | SKU has no BOM defined, or the SKU does not exist. |
Workflow
Calls W089 Get BOM for a SKU.