Use the CreateMember endpoint to create a new loyalty member. The required properties will depend on your configuration in Vista Loyalty.
{
"credentials": {
"username": "string",
"password": "string",
"pin": "string",
"email": "string"
},
"clubMembership": {
"clubId": 0,
"clubLevelId": 0
},
"personalDetails": {
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string"
},
"birthDate": "2019-08-24T14:15:22Z",
"gender": "NotSpecified"
},
"acceptedTermsAndConditions": true,
"authenticationType": "None"
}Some properties have been omitted from the code snippet above for brevity.
A member cannot be created with the same email as an existing member. To check if an email has already been registered, use the ValidateEmailAvailability endpoint.
{
"email": "string"
}This endpoint will return a response with an isAvailable property, indicating whether the provided email can be used to create a new member.
If the email is unavailable (i.e., already registered to an existing member), suggest that the patron authenticate their existing member, or reset their password.
{
"isAvailable": true
}Depending on configuration, a combination of username/email and password/pin must be specified as the credentials that the member will use for member authentication.
When choosing a password, the configured member password rules must be followed.
The clubId represents the unique identifier of a club in Vista Loyalty and must be specified when creating a new member.
Use the GetMasterData endpoint to get the list of available loyalty clubs.
{
"clubs": [
{
"id": 0,
"name": {
"text": "string",
"translations": [
{
"languageTag": "string",
"text": "string"
}
]
}
}
]
}Some properties have been omitted from the code snippet above for brevity.
Use the acceptedTermsAndConditions request property to indicate whether the patron has accepted the terms and conditions when signing up.
Setting the authenticationType to Cookie or Token will automatically authenticate the new member and return a cookie-based or token-based loyalty session upon member creation.