Create Loyalty Plan
API operation: Open the endpoint in Scalar
Use POST /loyalty_plans to create a loyalty plan. The operation documented here is LoyaltyPlan.register.
The documented schema requires administrator authentication and currently requires name, type, redemption_rate, accumulation_rate, and businesses.
See Loyalty plan model and Business loyalty plans model.
OpenAPI reference
Operation: POST /loyalty_plans
Request body fields
| Name | Type | Required |
|---|---|---|
accumulation_rate | number | Yes |
businesses | array<any> | Yes |
expire_after_minutes | integer | null | No |
maximum_accumulation | number | null | No |
maximum_redemption_rate | number | No |
maximum_redemption_type | integer | null | No |
name | any | Yes |
redemption_rate | number | Yes |
type | string | Yes |
Responses
| Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request (ErrorResponse) |
| 401 | Unauthorized |
| 404 | Not Found |
| 429 | Too Many Requests (ErrorResponse) |
| 500 | Internal Server Error (ErrorResponse) |
| 503 | Service Unavailable (ErrorResponse) |