Overview /
Customers & loyalty /
Change loyalty rules
Change loyalty rules
patch
https://api.flactrum.com/v1/loyalty
| Required scope | loyalty.write |
| Success status | 200 |
Request body
| Field | Type | Description |
|---|---|---|
| enabled | boolean | — |
| earn_mode | string | Brand-wide default. A product can override it with its own loyalty_mode. |
| earn_value | number | — |
| point_value | number | What one point is worth in currency when spent. |
| min_spend_points | integer | Fewest points that may be spent at once. |
| max_spend_percent | number | Largest share of an order that points may cover. 100 means all of it. |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X PATCH 'https://api.flactrum.com/v1/loyalty' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"enabled": true,
"earn_mode": "percent",
"earn_value": 5,
"point_value": 0.5,
"min_spend_points": 200,
"max_spend_percent": 50
}'
HTTP 200 · application/json
{
"data": {
"enabled": true,
"earn_mode": "percent",
"earn_value": 5,
"point_value": 0.5,
"min_spend_points": 200,
"max_spend_percent": 50
},
"meta": {
"active": true
}
}