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
email String $EMAIL false

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}
      ]
    }
  }
}