Skip to main content
GET
/
v1
/
validation-rules
List Validation Rules
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/validation-rules \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "val_auLlxlfTR9Ps",
      "name": "Customer in Segment",
      "rules": {
        "1": {
          "name": "customer.segment",
          "rules": {},
          "property": null,
          "conditions": {
            "$is": [
              "seg_18tD3HR0h8ymPC07rBMLryk3"
            ]
          }
        },
        "logic": "1"
      },
      "applicable_to": {
        "excluded": [],
        "included": [],
        "included_all": false
      },
      "created_at": "2021-12-10T11:08:16.499Z",
      "updated_at": "2021-12-10T12:01:41.665Z",
      "type": "advanced",
      "context_type": "earning_rule.order.paid",
      "assignments_count": 1,
      "object": "validation_rules"
    },
    {
      "id": "val_AvIe1WWuBXre",
      "name": "Order Volume - Price of Any Item - = 1500 USD",
      "rules": {
        "1": {
          "name": "order.items.price_any",
          "rules": {},
          "property": null,
          "conditions": {
            "$is": [
              150000
            ]
          }
        },
        "logic": "1"
      },
      "applicable_to": {
        "excluded": [],
        "included": [],
        "included_all": false
      },
      "created_at": "2021-12-13T06:54:06.864Z",
      "type": "advanced",
      "context_type": "reward_assignment.pay_with_points",
      "object": "validation_rules"
    },
    {
      "id": "val_aZhPe4tQYMgr",
      "name": "Business Validation Rule - excluded",
      "rules": {
        "logic": ""
      },
      "applicable_to": {
        "excluded": [
          {
            "object": "products_collection",
            "id": "pc_7fVU2RxybhR66YxC7r7BKKRh",
            "source_id": null
          },
          {
            "object": "sku",
            "id": "sku_0bae3b28f610fd0da1",
            "source_id": "first_product_sku_1"
          }
        ],
        "included": [],
        "included_all": true
      },
      "created_at": "2022-09-13T14:38:33.710Z",
      "type": "basic",
      "context_type": "campaign.discount_coupons.discount.apply_to_items_by_quantity",
      "assignments_count": 1,
      "object": "validation_rules"
    },
    {
      "id": "val_bbJCAXAWtYX0",
      "name": "Business Validation Rule - Test - Discount Effect - Amount - Items - each unit of matched product",
      "rules": {
        "logic": ""
      },
      "applicable_to": {
        "excluded": [],
        "included": [
          {
            "object": "products_collection",
            "id": "pc_a11pr0dUc75",
            "source_id": null,
            "effect": "APPLY_TO_EVERY",
            "quantity_limit": 1
          }
        ],
        "included_all": false
      },
      "created_at": "2022-09-02T17:04:23.814Z",
      "type": "basic",
      "context_type": "campaign.discount_coupons.discount.apply_to_items_by_quantity",
      "assignments_count": 1,
      "object": "validation_rules"
    },
    {
      "id": "val_BkV21MUJGaiT",
      "name": "Order Volume -  Total Amount More than 100",
      "rules": {
        "1": {
          "name": "order.amount",
          "rules": {},
          "property": null,
          "conditions": {
            "$more_than": [
              10000
            ]
          }
        },
        "logic": "1"
      },
      "applicable_to": {
        "excluded": [],
        "included": [],
        "included_all": false
      },
      "created_at": "2021-12-10T14:01:10.750Z",
      "type": "advanced",
      "context_type": "reward_assignment.pay_with_points",
      "object": "validation_rules"
    },
    {
      "id": "val_BTQg027UGl0v",
      "name": "Business Validation Rule - Get some $ off",
      "rules": {
        "logic": ""
      },
      "applicable_to": {
        "excluded": [],
        "included": [
          {
            "object": "product",
            "id": "prod_0a41dd45dc85fcab40",
            "source_id": "10474"
          }
        ],
        "included_all": false
      },
      "created_at": "2021-12-07T06:58:23.759Z",
      "updated_at": "2021-12-22T08:11:18.773Z",
      "type": "advanced",
      "context_type": "campaign.discount_coupons.discount.apply_to_items",
      "assignments_count": 1,
      "object": "validation_rules"
    }
  ],
  "total": 6
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required

Query Parameters

limit
integer

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

Required range: 1 <= x <= 100
page
integer

Which page of results to return. The lowest value is 1.

Required range: 1 <= x <= 100
order
enum<string>

This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Available options:
created_at,
-created_at,
updated_at,
-updated_at,
name,
-name
start_date
string<date-time>

Timestamp representing the date and time which results must start on. Represented in ISO 8601 format.

Example:

"2023-12-22T10:13:06.487Z"

end_date
string<date-time>

Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.

Example:

"2023-12-22T10:13:06.487Z"

Response

200 - application/json

Returns a dictionary of validation rules.

Response body schema for GET v1/validation-rules.

object
string
default:list
required

The type of the object represented by JSON. This object stores information about validation rules.

data_ref
string
default:data
required

Identifies the name of the attribute that contains the array of validation rules.

data
Validation Rule · object[]
required

An array of validation rules.

total
integer
required

Total number of validation rules in the project.

Last modified on February 3, 2026