For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bundle Chapters

Administrative endpoints for bundle chapters — the configurable selection slots of a Bundle product (product_type 2). Each chapter groups the attribute-set-driven set of choices a customer picks from when configuring the bundle on the storefront. A chapter belongs to exactly one bundle product and can be pre-populated with a default miscellaneous product (product_type 4). See the Products section for the shared product-type table.

Core Capabilities

1. Chapter Listing & Filtering

  • Retrieve a paginated list of chapters, ordered by their order value unless a different order is requested. order is a single global ordering key, not grouped by bundle product — filter by bundle_product to see one product's chapters in sequence.

  • Filter by the parent bundle product, or by a partial, case-insensitive match on slug.

2. Chapter Lifecycle Management

  • Create a chapter under a bundle product, together with the attribute set and initial attribute values used to render its selection form.

  • Update a chapter's name, slug, position, active state, requirement flags, and default product (see the restrictions below — some fields cannot be changed after creation, and default_product can only be set or replaced, not cleared).

  • Permanently delete a chapter. This is a hard delete — unlike deactivating a product, the chapter record and its miscellaneous-product associations are removed from the database rather than merely deactivated.

Validation Rules

  • bundle_product must reference a product whose product_type is Bundle (2); a reference to a product of a different type (or to a non-existent id) is rejected as an invalid identifier, the same as any other bad foreign key — a standard 400 validation error, not a business-rule error.

  • default_product, when provided, must reference a product whose product_type is Miscellaneous (4), rejected the same way (400) if it isn't. On create, it is automatically added to the chapter's set of selectable miscellaneous products.

  • The combination of bundle_product and slug must be unique — a bundle product cannot have two chapters with the same slug. Violating this is also a standard 400 validation error.

  • bundle_product cannot be changed after creation. It is accepted by the update operations but has no effect — a chapter always keeps the bundle product it was created under, even if a different bundle_product is sent and passes validation.

  • default_product can only be set or replaced, never cleared. Sending null has no effect if a default product is already set — there is no way to remove it through these endpoints once set.

  • The attribute set and the chapter's attribute values can only be set at creation. attribute_set, attributes, and attributes_kwargs are accepted by the update operations but have no effect on the stored chapter — they cannot be changed once the chapter exists. attributes_kwargs has no effect at creation either; it is always derived automatically from attributes.

  • attributes must be included when creating a chapter (send an empty object if there are no values to set). It is not flagged as a required field, but omitting it causes the request to fail with a server error instead of a normal validation response.

Dynamic Settings & Environment Variables

No dynamic settings or environment variables affect these endpoints.

Last updated

Was this helpful?