Skip to main content
POST
/
admin
/
promotions
/
{id}
/
target-rules
/
batch
cURL
curl -X POST '{backend_url}/admin/promotions/{id}/target-rules/batch' \
-H 'Authorization: Bearer {jwt_token}'
{
  "created": [
    {
      "id": "<string>",
      "values": [
        "cusgroup_123"
      ],
      "description": "<string>",
      "attribute": "customer_group_id",
      "operator": "gt"
    }
  ],
  "updated": [
    {
      "id": "<string>",
      "values": [
        "cusgroup_123"
      ],
      "description": "<string>",
      "attribute": "customer_group_id",
      "operator": "gt"
    }
  ],
  "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

promotion_type
enum<string>

The promotion's type.

Available options:
standard,
buyget
application_method_type
enum<string>

The promotion's application method type.

Available options:
fixed,
percentage
application_method_target_type
enum<string>

The promotion's application method target type.

Available options:
items,
shipping_methods,
order

Body

application/json

The target rules to create, update, or delete.

create
object[]

The target rules to create.

update
object[]

The target rules to update.

delete
string[]

The target rules to delete.

A target rule's ID.

Response

OK

The result of the batch operations.

created
object[]
required

The created target rules.

updated
object[]
required

The updated target rules.

deleted
object
required

The details of the deleted target rules.