JSON API
...
Examples
Batch Updates
Customer Groups
2min
If you support various customer groups for your e-commerce website and want to maintain different prices for them, you can do it using the "groups" attribute. Following is an example where group prices are added for “grp_1” and “grp_2”. To understand how to use them at Storefront API, please refer:: https://docs.klevu.com/apis/smart-search-examples#GI08Z
- It may consist of alphanumeric characters (letters and numbers) and underscores (_).
- Consecutive underscores (__) are not allowed.
- The group name must not be solely composed of underscores (_).
here are examples group names can be Sales_Team, Marketing123, customer_group
Example:
[
{
"id": "1",
"type": "KLEVU_PRODUCT",
"attributes": {
"name": { "default": "Product 1" }
}
"groups": {
"grp_1": {
"attributes": {
"price": {
"GBP": {
"salePrice": 10.0,
"defaultPrice": 11.0
}
}
}
},
"grp_2": {
"attributes": {
"price": {
"GBP": {
"salePrice": 20.0,
"defaultPrice": 21.0
}
}
}
}
}
}
]
Updated 15 Jul 2024



Did this page help you?