Configure a Shopper Bundle
POSThttps://euwest.api.elasticpath.com/catalog/products/:product_id/configure
Once you have configured your product bundles, you can display them in your storefront in your published catalog. Depending on how you have configured the minimum and maximum values for the product options in your components, you can allow your shoppers to choose which products they want to select. For example, you can enable a shopper to select 1 or more product options from a list of 10, giving your shoppers greater flexibility when selecting products in your store front.
- Products must be in a
live
status. - If you have not specified any minimum or maximum values for the product options in your components, your shoppers can select any combination of product options.
If you have configured minimum and maximum values using Create a Bundle, this becomes part of the bundle_configuration
. You can check how your bundle is configured using Get a product in a catalog release in bundle_configuration
under meta
. The bundle_configuration
forms the body of the request.
The response updates the bundle_configuration
with the product options the shopper selects. The meta
data is updated with the meta
data of the selected product options. In your storefront, you could display this as a summary of the product options a shopper has selected.
Including Resources
Using the include
parameter, you can retrieve top-level resources, such as, files or main image, bundle component products and product attributes, such as SKU or slug.
Parameter | Required | Description |
---|---|---|
component_products | Optional | The component product data and key attribute data, such as SKU or slug, to return for component products in a product bundle. |
main_image | Optional | The main images associated with a product. |
files | Optional | Any files associated with a product. |
See Including Resources.
Request
Path Parameters
The product ID.
Header Parameters
The language and locale your storefront prefers. See Accept-Language.
The list of channels in which this catalog can be displayed. A channel is the shopping experience, such as a mobile app or web storefront. If empty, the catalog rule matches all channels. The channel will eventually be included in the bearer token that is used for authorization, but currently, you must set the EP-Channel
header in your requests.
Product tags are used to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. You can enhance your product list using tags, enabling you to refine your product list and run targeted promotions. Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the EP-Context-Tag
header.
- application/json
Body
required
The bundle configuration.
data objectrequired
Responses
- 200
- default
The configured product of a catalog.
- application/json
- Schema
- Example (from schema)
Schema
data object
links object
{
"data": {
"attributes": {
"published_at": "1970-01-01T00:00:00.000",
"base_product": false,
"base_product_id": "cdf574bc-e36e-48fc-9eac-01c87839b285",
"commodity_type": "physical",
"curated_product": true,
"upc_ean": "0123456",
"manufacturer_part_num": "mfn1",
"tags": [
"tag-a"
],
"price_modifiers": [
"modifier-1"
],
"created_at": "1970-01-01T00:00:00.000",
"description": "This is a product",
"name": "Blue shirt",
"price": {},
"shopper_attributes": {},
"tiers": {},
"components": {},
"custom_inputs": {},
"sku": "blue-shirt",
"slug": "blue-shirt",
"status": "live",
"external_ref": "string",
"updated_at": "1970-01-01T00:00:00.000",
"extensions": {}
},
"id": "8fccaa19-dba9-4621-8d11-31a222a68c7c",
"relationships": {
"parent": {
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
},
"children": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
},
"files": {
"data": [
{
"type": "file",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "1970-01-01T00:00:00.000"
}
]
},
"main_image": {
"data": {
"type": "main_image",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"component_products": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
}
},
"type": "product",
"meta": {
"bread_crumbs": {},
"bread_crumb_nodes": [
"8dbb35b2-ef04-477e-974d-e5f3abe6faae"
],
"catalog_id": "362a16dc-f7c6-4280-83d6-4fcc152af091",
"pricebook_id": "f5466169-0037-460c-b181-b02682b6f4de",
"display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"catalog_source": "pim",
"sale_id": "string",
"sale_expires": "1970-01-01T00:00:00.000",
"original_price": {},
"original_display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"bundle_configuration": {
"selected_options": {}
},
"component_products": {},
"price_modifiers": {},
"tiers": {},
"variation_matrix": {},
"variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"child_option_ids": [
[
"8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"6ddf2a66-d805-449c-a0e1-8e81335e31a6"
]
],
"child_variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"product_types": [
"string"
],
"language": "en-GB"
}
},
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
The unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"detail": "not processable",
"status": "422",
"title": "There was a problem processing your request."
}
]
}
Authorization: Authorization
name: Authorizationtype: httpin: headerscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://euwest.api.elasticpath.com/catalog/products/:product_id/configure' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"selected_options": {}
}
}'