List rules
Sorted by name. Archived rules appear only with status=archived. A read-only key sees only the rules used by its program.
Query Parameters
- Type: "active" or "archived"enumstatus
Responses
- application/json
- application/json
Request Example for get/api/v1/rewards/rules
curl 'https://rewards-api.bettermoney.com/api/v1/rewards/rules?status=active' \
--header 'x-api-key: YOUR_SECRET_TOKEN'
{
"rules": [
{
"id": "string",
"name": "string",
"description": null,
"version": -9007199254740991,
"status": "active",
"isDefault": true,
"definition": {
"measure": {
"type": "daily_balance",
"metricKey": "string"
},
"condition": {
"type": "always"
},
"payout": {
"type": "fixed",
"amount": "string"
},
"limits": [
{
"type": "cap_per_period",
"amount": "string"
}
]
},
"summary": null,
"usedBy": [
{
"programId": "string",
"programName": "string",
"ruleKey": "string",
"ruleVersion": -9007199254740991,
"effectivePeriodId": "string"
}
],
"createdAt": "string",
"updatedAt": "string"
}
]
}