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.
In: header
Path Parameters
The rule type.
"rules" | "target-rules" | "buy-rules"Query Parameters
The promotion type to retrieve rules for.
"standard" | "buyget"The application method type to retrieve rules for.
"fixed" | "percentage"The application method target type to retrieve rules for.
"items" | "shipping_methods" | "order"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-attribute-options/rules"{
"attributes": [
{
"id": "customer_group",
"value": "customer.groups.id",
"label": "Customer Group",
"operators": [
{
"id": "in",
"value": "in",
"label": "In"
}
]
}
]
}{
"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 Rules of a Promotion
Retrieve a list of rules in a promotion. The type of rules retrieved depend on the value of the `rule_type` path parameter: - If `rule_type` is `rules`, the promotion's rules are retrivied. - If `rule_type` is `target-rules`, the target rules of the promotion's application method are retrieved. - If `rule_type` is `buy-rules`, the buy rules of the promotion's application method are retrieved.
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.