Description

Retrieves customer info using otp code sent via sms.

Documents two endpoints that must be called in succession in order to get final desired result.

operation requestCustomerAuth will send to target customer an otp sms with their authorization code

this operation will require you to have existing balance in your sms credit for the otp to be sent out properly

operation verifyCustomerAuth will need to be called next with the sent otp in order to retrieve desired response

requestCustomerAuth

Parameters

Parameter Type Value Required
operation_name String requestCustomerAuth 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

Example

Request

curl \
-X POST \
-H "Content-Type: application/json" \
-H "Token: $TOKEN" \
-d '{
        "operation_name": "requestCustomerAuth",
        "variables": {
            "phoneNumbers": "60123123123",
            "extension": "MY",
            "brandId": $SHARED_BRAND_ID
        }
    }' \
https://mulahpoints.com/third_party

Response

{
  "data": {
    "thirdPartyRequestCustomerAuth": {
      "result": $RESULT,
      "errors": [
          {message: $ERROR_MESSAGE}
      ]

    }
  },
  "errors": []
}

verifyCustomerAuth

Parameters

Parameter Type Value Required
operation_name String verifyCustomerAuth 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
code String $CODE true

Example

Request

curl \
-X POST \
-H "Content-Type: application/json" \
-H "Token: $TOKEN" \
-d '{
        "operation_name": "verifyCustomerAuth",
        "variables": {
            "phoneNumbers": "60123123123",
            "extension": "MY",
            "brandId": $SHARED_BRAND_ID,
            "code": $CODE
        }
    }' \
https://mulahpoints.com/third_party

Response

{
  "data": {
    "thirdPartyVerifyCustomerAuth": {
      "result": $RESULT,
      "customer": {
          "phoneNumber": "0123123123",
          "name": "customerName",
          "birthdate": "YYYY-MM-DD",
          "email": "example@email.com",
          "registered": true,
          "totalVisits": $TEST_TOTAL_VISIT,
          "totalPointRedemptions": $TEST_TOTAL_POINT_REDEMPTIONS,
          "totalSmsRedemptions": $TEST_TOTAL_SMS_REDEMPTIONS,
          "collectedPoints": $TEST_COLLECTED_POINTS,
          "availablePoints": $TEST_AVAILABLE_POINTS,
          "totalSpending": $TEST_TOTAL_SPENDING,
      },
      "errors": [
          {message: $ERROR_MESSAGE}
      ]

    }
  },
  "errors": []
}