Skip to main content

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

NameTypeRequired
accumulation_ratenumberYes
businessesarray<any>Yes
expire_after_minutesinteger | nullNo
maximum_accumulationnumber | nullNo
maximum_redemption_ratenumberNo
maximum_redemption_typeinteger | nullNo
nameanyYes
redemption_ratenumberYes
typestringYes

Responses

CodeDescription
200OK
400Bad Request (ErrorResponse)
401Unauthorized
404Not Found
429Too Many Requests (ErrorResponse)
500Internal Server Error (ErrorResponse)
503Service Unavailable (ErrorResponse)
Open this operation in the API reference