xclade
Admin APIPromotions

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.

GET
/admin/promotions/rule-attribute-options/{rule_type}
AuthorizationBearer <token>

In: header

Path Parameters

rule_type*string

The rule type.

Value in"rules" | "target-rules" | "buy-rules"

Query Parameters

promotion_type?string

The promotion type to retrieve rules for.

Value in"standard" | "buyget"
application_method_type?string

The application method type to retrieve rules for.

Value in"fixed" | "percentage"
application_method_target_type?string

The application method target type to retrieve rules for.

Value in"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"
}