Replace kit components
Atomically replaces a product's BOM.
Send the complete list that should apply after the call. This is a PUT, not a patch: sending only a new component removes previous ones; sending { "components": [] } removes the whole BOM. Replacement is atomic, so invalid input never leaves a partially updated kit.
The response is the complete BOM after the swap, not paginated. A component Variant that does not exist, or belongs to another Seller or account, returns 404 NOT_FOUND with the message Variant not found., and a missing Product returns 404 NOT_FOUND with the message Product not found., leaving the BOM unchanged.
The API accepts only Variants of the same Seller, rejects repeated components, and prevents direct or indirect cycles. A kit cannot, for example, depend on itself through another kit.
After defining the BOM, set the kit's sellable Variant to inventoryAuthority: "derived". Do not record movements on it: its balance is calculated from component Variants whenever it is queried or published.
Common errors
409 CONFLICTwithdetails.reasonequal tovariant_archivedorproduct_archived: a Variant in the body is archived, or active in an archived product. Replace it with another.
api_keyAuthorizationBearer <token>API key (mk_...)
productId*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidapplication/json- body
The complete BOM that replaces the product components.
components*array<>Complete kit component list; an empty list removes every component.
items <= 100The complete BOM after replacement.
application/json- response
The complete bill of materials of a product.
data*array<>The complete BOM of the product; empty when it is not a kit.
items <= 100curl -X PUT "https://example.com/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/components" \ -H "Content-Type: application/json" \ -d '{ "components": [ { "componentVariantId": "47c9f819-fcf6-4478-b21a-678ecc594a11", "quantity": 2 } ] }'{ "data": [ { "componentVariantId": "47c9f819-fcf6-4478-b21a-678ecc594a11", "quantity": 2 } ]}