Member creation

Use the CreateMember endpoint to create a new loyalty member. The required properties will depend on your configuration in Vista Loyalty.

Copy
Copied
{
  "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"
}
NOTE

Some properties have been omitted from the code snippet above for brevity.

Email availability

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.

Copy
Copied
{
  "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.

Copy
Copied
{
  "isAvailable": true
}

Credentials

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.

IMPORTANT

When choosing a password, the configured member password rules must be followed.

Club membership

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.

Copy
Copied
{
  "clubs": [
    {
      "id": 0,
      "name": {
        "text": "string",
        "translations": [
          {
            "languageTag": "string",
            "text": "string"
          }
        ]
      }
    }
  ]
}
NOTE

Some properties have been omitted from the code snippet above for brevity.

Terms and conditions

Use the acceptedTermsAndConditions request property to indicate whether the patron has accepted the terms and conditions when signing up.

Authentication type

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.