Description
Register a customer’s phone number with name, email, and birthdate.
Parameters
| Parameter | Type | Value | Required |
| operation_name | String | registerCustomer | true |
| variables | JSON | $JSON_OBJECT | true |
$JSON_OBJECT Structure
| Key | Type | Value | Required |
| brandId | String | $SHARED_BRAND_ID | true |
| phoneNumber | String | $PHONE_NUMBER | true |
| extension | String | $EXTENSION | true |
| birthdate | String | $BIRTHDATE | true |
| name | String | $NAME | true |
| String | false |
Important: Append country code to phone number string
Important: $BIRTHDATE must be in ‘YYYY-MM-DD’ format
Important: Only MY extension numbers are supported at this current time
Tip: $SHARED_BRAND_ID can be obtained via Accessible Brands
Example
Request
curl \
-X POST \
-H "Content-Type: application/json" \
-H "Token: $TOKEN" \
-d '{
"operation_name": "registerCustomer",
"variables": {
"brandId": $SHARED_BRAND_ID,
"extension": "MY",
"phoneNumber": "60123456789",
"email": "youremail@email.com",
"birthdate": "2020-12-31",
"name": "yourName"
}
}' \
https://simpleloyalty.com/third_party
Response
{
"data": {
"thirdPartyRegisterCustomer": {
"result": $SUCCESS_MESSAGE,
"errors": [
{message: $ERROR_MESSAGE}
]
}
}
}