Calculate
Production
Production
POST
https://api.b2b.retter.io/5p1hp1d2t/CALL/Promotion/calculate/{PROJECT_ID}
Promotion
Last modified:2024-11-26 14:32:38
The data structure for customers using both loyalty and promotions should be formatted as follows:
{
// Object arrays (like subOrders, items, condiments, etc.) should be single-level.
"subOrders": [
{
"subOrderId": "1",
"id": "33047",
"price": 108,
// Extra product attributes should be sent directly in the subOrder, without adding another level, such as "attributes".
"brand": "Ulker",
"name": "Ulker Napoliten Milk Chocolate",
"categories": [
"snacks",
"chocolate"
]
},
{
"subOrderId": "2",
"id": "43047",
"price": 110,
// Extra attributes can be sent directly within the subOrder like this.
"brand": "Starbucks",
"name": "Starbucks Cafe Latte",
"categories": [
"drinks",
"coffee"
]
}
],
"condiments": [
{
"subOrderId": "2",
"id": "10002",
"name": "Caramel",
"price": 12,
"type": "condiment"
}
]
}
Request
Path Params
PROJECT_ID
string
required
Header Params
x-api-key
string
optional
Example:
{{PROMOTION_END_USER_API_KEY}}
Body Params application/json
Request samples
Responses
Modified at 2024-11-26 14:32:38