Composites
Build-your-own products where customers choose from component groups (e.g., custom pizza, salad bar).
GET
/api/v1/catalogue/composites/{id}Get Composite
Returns the composite product with its component groups and available options.
Example Request
curl
curl https://storefront.cimplify.io/api/v1/catalogue/composites/comp_pizza \
-H "X-API-Key: pk_test_your_api_key"Example Response
JSON
{
"success": true,
"data": {
"id": "comp_pizza",
"name": "Build Your Pizza",
"description": "Choose your base, sauce, and toppings",
"default_price": "9.99",
"image_url": "https://cdn.example.com/pizza.jpg",
"product_type": "composite",
"groups": [
{
"id": "grp_base",
"name": "Choose Your Base",
"is_required": true,
"min_selections": 1,
"max_selections": 1,
"options": [
{ "id": "opt_thin", "name": "Thin Crust", "price": "0.00" },
{ "id": "opt_thick", "name": "Thick Crust", "price": "1.00" }
]
},
{
"id": "grp_toppings",
"name": "Toppings",
"is_required": false,
"min_selections": 0,
"max_selections": 5,
"options": [
{ "id": "opt_pepperoni", "name": "Pepperoni", "price": "1.50" },
{ "id": "opt_mushrooms", "name": "Mushrooms", "price": "1.00" },
{ "id": "opt_olives", "name": "Olives", "price": "1.00" }
]
}
]
}
}Adding a Composite to Cart
Pass composite_selections when adding a composite item to the cart or requesting a quote:
JSON
// POST /api/v1/cart/items
{
"item_id": "comp_pizza",
"quantity": 1,
"composite_selections": [
{ "group_id": "grp_base", "option_ids": ["opt_thin"] },
{ "group_id": "grp_toppings", "option_ids": ["opt_pepperoni", "opt_mushrooms"] }
]
}Component Group Object
| Field | Type | Description |
|---|---|---|
id | string | Group identifier |
name | string | Display name |
is_required | boolean | Whether selection is mandatory |
min_selections | integer | Minimum required selections |
max_selections | integer | Maximum allowed selections |
options | array | Available options (id, name, price) |