List Rule Values Given a Rule Attribute
Retrieve all potential values for promotion rules and target and buy rules based on the specified rule attribute and type. For example, if you provide the ID of the `currency_code` rule attribute, and set `rule_type` to `rules`, a list of currencies are retrieved in label-value pairs.
In: header
Path Parameters
The rule type.
"rules" | "target-rules" | "buy-rules"The rule attribute's ID.
Query Parameters
The number of items to skip when retrieving a list.
Limit the number of items returned in the list.
The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with -.
The promotion type to retrieve rules for.
"standard" | "buyget"The application method type to retrieve rules for.
"fixed" | "percentage"Whether to include deleted records in the result.
The application method target type to retrieve rules for.
Response Body
application/json
application/json
text/plain
application/json
application/json
application/json
application/json
curl -X GET "https://{tenant}.api.myxclade.com/admin/promotions/rule-value-options/rules/string"{
"limit": 0,
"offset": 0,
"count": 0,
"values": [
{
"value": "reg_123",
"label": "Europe Region"
}
]
}{
"message": "Discount must be set to dynamic",
"type": "not_allowed"
}"Unauthorized"{
"message": "Entity with id 1 was not found",
"type": "not_found"
}{
"code": "unknown_error",
"message": "The request conflicted with another request. You may retry the request with the provided Idempotency-Key.",
"type": "QueryRunnerAlreadyReleasedError"
}{
"code": "invalid_request_error",
"message": "Discount with code TEST already exists.",
"type": "duplicate_error"
}{
"code": "api_error",
"message": "An error occured while hashing password",
"type": "database_error"
}List Rule Attribute Options of a Rule Type
Retrieve a list of potential rule attributes for the promotion and application method types specified in the query parameters. Only the attributes of the rule type specified in the path parameter are retrieved: - If `rule_type` is `rules`, the attributes of the promotion's type are retrieved. - If `rule_type` is `target-rules`, the target rules' attributes of the application method's type are retrieved. - If `rule_type` is `buy-rules`, the buy rules' attributes of the application method's type are retrieved.
Create Promotion
Create a promotion.