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
}
}Manage the target rules of a promotion to create, update, or delete them.
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
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The promotion's ID.
The promotion's type.
standard, buyget The promotion's application method type.
fixed, percentage The promotion's application method target type.
items, shipping_methods, order The target rules to create, update, or delete.
The target rules to create.
Show child attributes
The operator used to check whether the buy rule applies on a cart. For example, eq means that the cart's value for the specified attribute must match the specified value.
gte, lte, gt, lt, eq, ne, in The attribute to compare against when checking whether a promotion can be applied on a cart.
"items.product.id"
The attribute's value.
"prod_123"
The rule's description.
The target rules to update.
Show child attributes
The buy rule's ID.
The attribute's value.
"prod_123"
The operator used to check whether the buy rule applies on a cart. For example, eq means that the cart's value for the specified attribute must match the specified value.
gte, lte, gt, lt, eq, ne, in The buy rule's description.
The attribute to compare against when checking whether a promotion can be applied on a cart.
"items.product.id"
The target rules to delete.
A target rule's ID.
OK
The result of the batch operations.
The created target rules.
Show child attributes
The promotion rule's ID.
The promotion rule's description.
The promotion rule's attribute.
"customer_group_id"
The rule's operator.
gt, lt, eq, ne, in, lte, gte The updated target rules.
Show child attributes
The promotion rule's ID.
The promotion rule's description.
The promotion rule's attribute.
"customer_group_id"
The rule's operator.
gt, lt, eq, ne, in, lte, gte The details of the deleted target rules.