PUT /{product_key}/bom
Update Bom
PUT
/product/{product_key_or_code}/bom
Replace the Bill of Materials for a product.
Performs a full replace: the existing BoM is deleted and new_bom is
inserted atomically within a single transaction. Pass by_code=true to
resolve product_key_or_code as a product code rather than an ArangoDB key.
- Lines without an explicit
phase_keyare assigned to the product's last
phase. - After insert, a loop-detection query runs; if circular dependencies are
found the transaction is aborted and HTTP 403 is returned with the loop data.
Emits: (direct transaction — no event class)
Required scope: product:bom:update
Authorizations
OAuth2PasswordBearer
password Flow
Token URL
"/api/auth"Scopes:
"admin"User can access and edit users and system settings"library"User can access and edit products"production"User can access and edit production plans"operator"User can access the operator panel and make production declarations
Parameters
Path Parameters
product_key_or_code*
Type
Requiredstring
Query Parameters
by_code
Type
boolean
Default
falseRequest Body
application/json
JSON { "bom_line_key": "bom-line-001", "component_key": "prod-002", "component_code": "PROD-B-001", "qt": 2, "phase_key": "phase-001", "type": "BomLine", "traceability_level": "form_only", "consumption_options": { "consumption_position_key": "pos-002", "consumption_position_mandatory": false, "minimum_quantity_if_negative": false, "minimum_quantity": 1 }, "extra": "string" }
[
]
Responses
Successful Response
application/json
JSON "status": 200, "message": "string", "detail": "string"
{
}