Skip to main content

Member Enrollment/Profile Update

POST 

/client/users

Request

This request is used to enroll a customer into the loyalty program.

Note: If the phone number is part of the lock configuration, when a phone number is associated with an account, a lock is placed on the phone number to prevent use for another account. If an account with a new phone number is added, then the number is locked on that account. If a new account is added with an existing phone number associated with an account, then the new account will get the phone number and the lock, and the old account will lose both (it will have no phone number). If a phone number is deleted on an account, then the lock and the phone number are removed.

Body

AttributeDefinitionFormatNotes
externalIdentifierPrimary identifier of the account holder in the client systemStringOptional, but can be configured to be a required field.
dateOfBirthCustomer date of birthStringOptional. "YYYY-MM-DD"
genderCustomer Personal InformationEnum: "M", "F", "Other", "PreferNotToSay"Optional. M = 'MALE', F = 'FEMALE', Other = 'Other', PreferNotToSay = 'PreferNotToSay'.
firstNameCustomer Personal InformationStringOptional. Will not be included in call if empty.
lastNameCustomer Personal InformationStringOptional. Will not be included in call if empty.
emailCustomer emailStringRequired attribute
businessNameCustomer business nameStringOptional. Can be used in Business-to-Business loyalty programs
postalZipCodeCustomer's Postal Code(Canada) or Zip Code (United States)StringRequired attribute: Example (Postal Code): "H0H 0H0"
Example (Zip Code): "00000"
postalCodeCustomer address informationStringThis attribute is deprecated.
physicalCardLoyalty card numberStringOptional. If digital card creation is disabled, this is a required field.
streetCustomer address informationStringOptional
street2Customer address informationStringOptional
provinceStateCustomer's province or stateEnum

Canada provinces: "NL", "PE", "NS", "NB", "QC", "ON", "MB", "SK", "AB", "BC", "YT", "NT", or "NU"

American states: "AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"

American military states: "AE", "AP", "AA"
Optional. Provinces and territories in Canada or states and military states on United States
provinceCustomer address informationThis attribute is deprecated.
phoneNumberCustomer personal informationStringOptional. Example: "(999) 999-9999"
phoneNumberSourceSource through which the phone number was provided.StringOptional Applicable only to new registrants.
languagePreferenceCustomer language preferenceString including language code and country code; for example: "en-CA", "fr-CA", or just language code, for instance: "FR" or "EN"Optional. Value can be language code (ISO 639) and country code (ISO 3166) joined by hyphen (in accordance with BCP 47) or ISO 639 two-letter language code only. If languagePreference is not provided or the value is not valid, the default value is "en-CA".
cityCustomer address informationStringOptional
channelIndicator for request sourceEnum, commonly-used values: "STORE", "POS", "WEBSITE", "APP", "PARTNER"Optional. Depending on client implementation, the default is "APP" or "STORE". Note that the client may supply their own custom value, but it cannot be null or blank.
cardLabelAllows a unique name to identify the member's cardStringOptional. The card label should be 1-100 characters. Possible characters: a-z, A-Z, 0-9, space, underscore, hyphen, single quote.
extendedDataSourceUsed with multi-source EMD to identify the source of the EMD provided.StringOptional, used only with multi-source EMD. For example: "MARKETING", "PARTNERSHIP", "PPN", "SALESFORCE", or "BANKING_INFO"
extendedDataContains custom attributes for an accountObjectOptional. Can be used for offer targeting and for reporting/analytics purposes. Attributes included must be declared in the ESI system; talk to your TSA for more information. For instance, to provide banking information, the attributes could be: "bankName", "institutionNumber", accountNumber", "transitNumber", and "accountHolderType".
accountAssociationsContains different AccountAssociationsArray of AccountAssociations:
"accountAssociations":[{
associationType:"type",
associationValue]:"value"}]
Optional attribute. Creates associations under AssociationTypes configured in the system.
referralCodeCode provided as reference to referrer (not provided if not referred)StringOptional. Provision of code related to potential rewards for referee and possibly referrer if this member carried out specified action or spend
loyaltyIdUnique loyalty program identifier for the account.StringRequired only if physicalCard is not an attribute that is included in the request and if digitalCard is disabled in the configuration

Response

AttributeDescriptionFormatNote
accountIDGUID identifying the accountString
loyaltyCardLoyalty Card Number registered to the accountString
cardStatusStatus of the loyalty cardStringAlways "ACTIVE"
cardTypeIndicator for the type of card the associated to the accountEnum: "DIGITAL" or "PHYSICAL"If data is in the process of being migrated into ES Loyalty and certain configuration settings are set, then the card can be saved as "DIGITAL" or "PHYSICAL".

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestSorry, that email address is already in useEMAIL_ALREADY_EXISTSEmail address is already registered in the system
400 Bad RequestMissing Required FieldsMISSING_REQUIRED_FIELDS_ERRORA mandatory field is not in the request body. See ConfigType = 'REGISTRATION', attribute 'mandatoryFields'
400 Bad RequestLoyaltyID {loyalty_id} is not allocated and therefore cannot be claimedINVALID_REQUESTLoyaltyID value is not in the list of allocated values
400 Bad RequestProvided business name is not validINVALID_REQUESTbusinessName has more than 100 characters
400 Bad RequestThat account cannot be registeredINVALID_REQUESTCard number submitted for physicalCard is invalid
400 Bad RequestCard has already been claimed by another account!INVALID_REQUESTCard number belongs to a different account
400 Bad RequestLoyaltyId is required for this operationINVALID_REQUESTWhen physicalCard is not in the request body and digital card configuration is disabled. See ConfigType = 'REGISTRATION', attribute 'mandatoryFields' in configuration file.
400 Bad RequestExternalIdentifier length is greater than 100 charactersINVALID_LOYALTY_IDWhen externalIdentifier has more than 100 characters
400 Bad RequestInvalid Extended data: Exceeded data size limit for extended data: {dataSize} BytesINVALID_REQUESTWhen extendedData size exceeds the size limit. See the limit on ConfigType='EXTENDED_DATA', attribute Platform.DataSizeLimitInKb in configuration file.
400 Bad RequestInvalid Extended data: Exceeded root level key limit for extended data {numberOfKeys} keysINVALID_REQUESTWhen extendedData exceeds number of attributes/keys limit. See the limit on ConfigType='EXTENDED_DATA', attribute Platform.TopLevelKeysLimit in configuration file.
400 Bad RequestAttribute(s) {att1}, {att-x} are already used in another source.INVALID_REQUESTAttributes must be unique to this EMD source.
400 Bad RequestINTERNAL cannot be used as extended data source.INVALID_REQUESTINTERNAL is not a valid EMD data source value.
400 Bad Request{value} is not valid extended data source.INVALID_REQUESTData source name provided is not valid.
400 Bad RequestProvided association type: is not allowed.INVALID_REQUESTAssociation Type should be one of the configured types in system.
400 Bad RequestAssociationValue should be 3-128 characters. Possible characters: a-z, A-Z, 0-9, space, underscore, hyphen.INVALID_REQUESTAssociation Value allows 3-128 characters which can have spaces,underscores and hyphens.
400 Bad RequestAssociation Type is mandatory and required to be non-emptyMISSING_REQUIRED_FIELDS_ERRORAssociation Type is mandatory.
400 Bad RequestAssociation Value is mandatory and required to be non-emptyMISSING_REQUIRED_FIELDS_ERRORAssociation Value is mandatory.
400 Bad RequestAccount association feature is not supported.INVALID_REQUESTACCOUNT_ASSOCIATION feature needs to be enabled to add Associations
400 Bad RequestMultiple associations with an Association Type are not allowed.INVALID_REQUESTUser cannot have multiple associations with a single associationType
400 Bad Requestemail is mandatory and required to be non-emptyINVALID_REQUESTA valid email address must be provided.
400 Bad RequestInvalid PostalZipCode: {postalZipCode}INVALID_REQUESTInvalid Postal Code or Zip Code
400 Bad RequestNo active referral program found.ACTIVE_REFERRAL_PROGRAM_NOT_FOUNDThere is no active referral program related to the referral code provided.
400 Bad RequestInvalid referral code generated.INVALID_REFERRAL_CODEThe referral code provided is not a valid code.
400 Bad RequestReferrer's account status is not eligible: {status} to participate in the Referral Program.INVALID_ACCOUNT_STATUSAccount status does not allow referral; for example, CLOSED or DECEASED.
400 Bad RequestReferral Quota ReachedREFERRAL_QUOTA_REACHEDThe configured limit on the number of referalls allowed for the referrer has been reached.

Request

Responses

200 - User Enrolled with Digital Card