Manage the Buy Rules of a Promotion
POST
/admin/promotions/{id}/buy-rules/batch
Promotions
buyget
promotion to create, update, or delete them.Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/admin/promotions//buy-rules/batch' \
--header 'Content-Type: application/json' \
--data-raw '{
"create": [
{
"description": "string",
"attribute": "items.product.id",
"operator": "gte",
"values": "prod_123"
}
],
"update": [
{
"id": "string",
"description": "string",
"attribute": "items.product.id",
"operator": "gte",
"values": "prod_123"
}
],
"delete": [
"string"
]
}'
Response Response Example
200 - Example 1
{
"created": [
{
"id": "string",
"description": "string",
"attribute": "customer_group_id",
"operator": "gt",
"values": [
"cusgroup_123"
]
}
],
"updated": [
{
"id": "string",
"description": "string",
"attribute": "customer_group_id",
"operator": "gt",
"values": [
"cusgroup_123"
]
}
],
"deleted": {
"object": "promotion-rule",
"deleted": true,
"ids": [
"string"
]
}
}
Request
Path Params
id
stringÂ
required
Query Params
fields
stringÂ
fields
+
it will be added to the default fields, using -
will remove it from the default fields. without prefix it will replace the entire default fields.Body Params application/json
Responses
Modified at 2025-06-17 04:10:32