This endpoint allows you to create Loyalty Program Memberships to onboard users to Loyalty Programs.
If the Account is already a member of the Loyalty Program, the existing membership is returned (and reactivated if it was archived).
/api/loyalty-programs/{loyaltyProgramId}/membershipsThis endpoint allows you to create Loyalty Program Memberships to onboard users to Loyalty Programs.
If the Account is already a member of the Loyalty Program, the existing membership is returned (and reactivated if it was archived).
errorstringBad Request.messageenumBad Requestamount is required. See 400 Malformed Request.statusCodeinteger400.errorstringUnauthorized.messageenumMissing authenticationstatusCodeinteger401.errorstringForbidden.messageenumForbiddenJOIN_CONDITIONS_NOT_METLOYALTY_PROGRAM_ACCOUNT_LIVENESS_MISMATCHLOYALTY_PROGRAM_INACTIVEactive status.statusCodeinteger403.errorstringNot Found.messageenumNot FoundstatusCodeinteger404.errorstringToo Many Requests.messageenumRATE_LIMIT_EXCEEDEDstatusCodeinteger429.errorstringInternal Server Error.messageenumAn internal server error occurredstatusCodeinteger500.curl -X POST https://service.centrapay.com/api/loyalty-programs/WRhAxxWpTKb5U7pXyxQjjY/memberships \-H 'content-type: application/json' \-H 'x-api-key: <TOKEN>' \-d '{ "accountId": "Jaim1Cu1Q55uooxSens6yk"}'{ "accountId": "Jaim1Cu1Q55uooxSens6yk", "createdAt": "2021-08-25T00:02:49.488Z", "createdBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99", "description": "Centrapay Cafe Loyalty: Earn rewards, enjoy perks! Join now!", "id": "L75M3L56N2PtBSt8g7uXLU", "img": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743", "mediaUploadId": "8aoMfscvtuewsuJzmzBzAs", "name": "Centrapay Cafe Loyalty Program", "programId": "WRhAxxWpTKb5U7pXyxQjjY", "status": "active", "test": true}{ "error": "Bad Request", "message": "amount is required", "statusCode": 400}{ "error": "Unauthorized", "message": "Missing authentication", "statusCode": 401}{ "error": "Forbidden", "message": "LOYALTY_PROGRAM_ACCOUNT_LIVENESS_MISMATCH", "statusCode": 403}{ "error": "Not Found", "message": "Not Found", "statusCode": 404}{ "error": "Too Many Requests", "message": "RATE_LIMIT_EXCEEDED", "statusCode": 429}{ "error": "Internal Server Error", "message": "An internal server error occurred", "statusCode": 500}