002-CreateMemberProfile
Function
Create Member Profile
Endpoint
- /v1/loyalty/profile/register
HTTP Method
- POST
Request Headers
- Authorization: Bearer {token}
- X-App-Key: {appKey}
Request Payload
{
"ssoId": "ssoId",
"emailId": "emailId@example.com.cn",
"mobileNo": "88888888",
"countryCode": "852",
"title": "Dr",
"campaignCode": "",
"nickname": "",
"monthOfBirth": "01",
"yearOfBirth": "2001",
"dayOfBirth": "08",
"referralCode": "",
"languagePreference": "zh_HK",
"activityInterest": [
{
"interestCode": "SPE"
}
],
"eNewIndicator": true,
"firstname": "",
"lastname": "",
"chineseName": "測試",
"residentialArea": "",
"province": "",
"district": "",
"openIdUUID": ""
}
Request Parameters
| Field | Required | Type | Remark | Sample |
|---|---|---|---|---|
| ssoId | Yes | string | Unique identifier associated with the user data stored in SSO | |
| emailId | Yes | string | Email id entered by the user | |
| mobileNo | Yes | string | Mobile No. without country code entered by the user | 88888888 |
| countryCode | Yes | string | country code | 852 |
| title | No | string | Dr/Miss/Mr/Mrs/Ms | |
| campaignCode | No | string | ||
| nickname | No | string | Nick Name of the user | |
| monthOfBirth | No | string | ||
| yearOfBirth | No | string | ||
| referralCode | No | string | ||
| languagePreference | No | string | User’s preferred language, Values: en/tc/sc | |
| activityInterest | No | json array | User’s choice of activities for promos and event notifications | [{"interestCode": "SPE"}] |
| eNewIndicator | No | Boolean | ||
| firstname | No | string | ||
| lastname | No | string | ||
| dayOfBirth | No | string | ||
| chineseName | No | string | ||
| residentialArea | No | string | Country or Region | |
| province | No | string | For Non-Hong Kong member | |
| district | No | string | For Hong Kong member only | |
| openIdUUID | No | string | iAM Smart OpenId |
Response Payload
{
"status": 1,
"errorCode": 0,
"message": "success",
"memberId": "xxx"
}
Response HTTP Code
Error Codes
| Status Code | Status Description |
|---|---|
| 1 | Internal Error |
| 3 | Missing Parameter |
| 4 | Invalid Input: [field name] |
| 4110 | Member Already Exists |