BigblueDevelopers

Create bundle

Group existing products into a bundle.

POST/bigblue.storeapi.v1.PublicAPI/CreateBundle

Creates a bundle. Each component must be an existing product.

Request body

bundleBundlerequired

The bundle to create.

The id must include BU after the tenant code, for example BGBLBU-KITSTA-2024. components needs 1 to 20 items, each with a quantity greater than 0.

Responses

200The bundle was created.
bundleBundle
The new bundle.
400The ID, a component or the number of components is invalid.
{
  "code": "invalid_argument",
  "msg": "bundle.components value must contain no more than 20 item(s)",
  "meta": { "argument": "bundle.components" }
}
404A component product doesn't exist.
{ "code": "not_found", "msg": "product BGBL-MUGCLA-WHIT not found" }
409A bundle with this ID already exists.
{ "code": "already_exists", "msg": "bundle BGBLBU-KITSTA-2024 already exists" }
POST/bigblue.storeapi.v1.PublicAPI/CreateBundle
Request
{
  "bundle": {
    "id": "BGBLBU-KITSTA-2024",
    "display_name": "Starter kit: 2 mugs and 1 shirt",
    "components": [
      { "product": "BGBL-MUGCLA-WHIT", "quantity": 2 },
      { "product": "BGBL-ESPSRT-SMAL", "quantity": 1 }
    ],
    "options": [{ "name": "Edition", "value": "2024" }]
  }
}
200
{
  "bundle": {
    "id": "BGBLBU-KITSTA-2024",
    "display_name": "Starter kit: 2 mugs and 1 shirt",
    "components": [
      { "product": "BGBL-MUGCLA-WHIT", "quantity": 2 },
      { "product": "BGBL-ESPSRT-SMAL", "quantity": 1 }
    ],
    "options": [{ "name": "Edition", "value": "2024" }]
  }
}