Description
Returns a list of customers with information tied to a brand
Note: Customer must have prior collection with brand to appear.
Parameters
Parameter | Type | Value | Required |
operation_name | String | customersInfo | true |
variables | JSON | $JSON_OBJECT | true |
$JSON_OBJECT Structure
Key | Type | Value | Required |
brandId | String | $SHARED_BRAND_ID | true |
phoneNumbers | Array[String] | $PHONE_NUMBERS | true |
extension | String | $EXTENSION | true |
Important: Append country code to phone number string
Important: Only MY extension numbers are supported at this current time
Warning: Do not mix numbers with different extensions in the same request
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": "customersInfo",
"variables": {
"phoneNumbers": ["60123123123"],
"extension": "MY",
"brandId": $SHARED_BRAND_ID
}
}' \
https://mulahpoints.com/third_party
Response
{
"data": {
"thirdParty": {
"customers": [
{
"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": []
}
Note: An empty array is returned if brand has no customers