feat: add missing BOM endpoints (flat, cost, CSV export/import, ODS merge) #6

Open
opened 2026-02-16 15:55:01 +00:00 by forbes · 0 comments
Owner

Summary

The server provides 12 BOM endpoints but the client only implements 7. The missing ones provide important procurement and manufacturing views.

Missing Methods

Server Endpoint Proposed Method
GET /api/items/{pn}/bom/flat get_bom_flat(part_number) -- leaf parts with rolled-up quantities
GET /api/items/{pn}/bom/cost get_bom_cost(part_number) -- assembly cost roll-up
GET /api/items/{pn}/bom/export.csv export_bom_csv(part_number)
POST /api/items/{pn}/bom/import import_bom_csv(part_number, csv_bytes)
POST /api/items/{pn}/bom/merge merge_bom_ods(part_number, ods_bytes) -- ODS merge with conflict resolution

Context

  • Flat BOM walks the full assembly tree and returns consolidated leaf parts only, with quantities multiplied through nesting levels. Used for procurement.
  • BOM Cost extends flat BOM by multiplying each leaf's total_quantity by its standard_cost. Used for assembly costing.
  • Both endpoints detect BOM cycles and return HTTP 409.
  • BOM merge (ODS) supports conflict resolution and is used by silo-calc.

References

  • SPECIFICATION.md Section 8.4 (Flat BOM and Assembly Costing)
  • BOM_MERGE.md (ODS merge specification)
## Summary The server provides 12 BOM endpoints but the client only implements 7. The missing ones provide important procurement and manufacturing views. ## Missing Methods | Server Endpoint | Proposed Method | |---|---| | `GET /api/items/{pn}/bom/flat` | `get_bom_flat(part_number)` -- leaf parts with rolled-up quantities | | `GET /api/items/{pn}/bom/cost` | `get_bom_cost(part_number)` -- assembly cost roll-up | | `GET /api/items/{pn}/bom/export.csv` | `export_bom_csv(part_number)` | | `POST /api/items/{pn}/bom/import` | `import_bom_csv(part_number, csv_bytes)` | | `POST /api/items/{pn}/bom/merge` | `merge_bom_ods(part_number, ods_bytes)` -- ODS merge with conflict resolution | ## Context - **Flat BOM** walks the full assembly tree and returns consolidated leaf parts only, with quantities multiplied through nesting levels. Used for procurement. - **BOM Cost** extends flat BOM by multiplying each leaf's `total_quantity` by its `standard_cost`. Used for assembly costing. - Both endpoints detect BOM cycles and return HTTP 409. - **BOM merge** (ODS) supports conflict resolution and is used by silo-calc. ## References - SPECIFICATION.md Section 8.4 (Flat BOM and Assembly Costing) - BOM_MERGE.md (ODS merge specification)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo-client#6