Skip to main content
POST
/
api
/
loyalty
/
rule_chains
Create Loyalty Rule Chain
curl --request POST \
  --url https://admin.snagsolutions.io/api/loyalty/rule_chains \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "<string>",
  "loyaltyRuleId": "123e4567-e89b-12d3-a456-426614174111",
  "loyaltyConditions": [
    {
      "type": "rule",
      "loyaltyRuleId": "123e4567-e89b-12d3-a456-426614174111"
    }
  ],
  "operatorType": "AND"
}
'
{
  "data": {}
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

organizationId
string<uuid>
required
websiteId
string<uuid>
required

Body

application/json

Body

name
string
required
loyaltyRuleId
string<uuid>
required

Unique identifier for the loyalty rule

Example:

"123e4567-e89b-12d3-a456-426614174111"

loyaltyConditions
Conditions · object[]
required

Array of conditions for the rule chain

Minimum array length: 1
Example:
[
{
"type": "rule",
"loyaltyRuleId": "123e4567-e89b-12d3-a456-426614174111"
}
]
operatorType
enum<string>
default:AND

Type of the condition. AND if all conditions must be met, OR if any condition can be met.

Available options:
AND,
OR
Example:

"AND"

Response

200

data
object
required