POST
/
admin
/
promotions
/
{id}
/
target-rules
/
batch
curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch' \
-H 'Authorization: Bearer {access_token}'
{
"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": {
"ids": [
"<string>"
],
"object": "promotion-rule",
"deleted": true
}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The promotion's ID.

Query Parameters

fields
string

Comma-separated fields that should be included in the returned data. if a field is prefixed with + 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

application/json

The target rules to create, update, or delete.

Response

200
application/json

OK

The result of the batch operations.