Create Loyalty Level
API operation: Open the endpoint in Scalar
Use POST /loyalty_levels to create a loyalty level. The operation documented here is LoyaltyLevel.register.
The documented schema requires administrator authentication and currently requires name, minimum_points, and accumulation_rate. Benefits, maximum accumulation settings, expiration, description, and image are operation-specific; confirm which optional settings your project supports.
See Loyalty levels model for the resource concepts.
OpenAPI reference
Operation: POST /loyalty_levels
Request body fields
| Name | Type | Required |
|---|---|---|
accumulation_rate | number | Yes |
benefits | array<any> | No |
description | any | No |
expire_after_minutes | integer | null | No |
images | any | No |
maximum_accumulation_fixed | integer | null | No |
maximum_accumulation_percentage | integer | null | No |
minimum_points | integer | Yes |
name | any | 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) |