This entity stores the validation rules used to limit your promo campaigns.
You can configure Validation Rule to include your own custom error messages which are going to be returned from API upon validation / redemption failure. You can read more here.
Attribute | Description | Example |
---|---|---|
id |
| |
object | Type of the object represented by JSON. Value is | |
name | A name of validation rules |
|
created_at |
| |
updated_at |
| |
rules | A set of rules and logic applied between them |
|
error | Error message that should be returned from API. You can read more here |
|
{
"id": "val_BHMuN4ZGUsjF",
"created_at": "2016-09-05",
"voucher_code": "8ZY60Wtw",
"id": "val_s3C0nDru7e",
"name": "Redeemable Once for new Customers",
"rules": {
"1": {
"name": "customer.segment",
"conditions": {
"$is": ["seg_n3vVcU5t0m3rs4rEPr3C1oU5"]
}
},
"2": {
"name": "redemption.count.per_customer",
"conditions": {
"$less_than_or_equal": [1]
}
},
"logic": "1 and 2"
},
"object": "validation_rules"
}