Description
Credit a brand’s customer with points.
A customer’s spending will be the same as its points if the value is omitted in the request.
Warning: This operation requires outlet access permissions enabled, contact an admin should you require it
Parameters
Parameter | Type | Value | Required |
operation_name | String | collectPoints | 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 |
outletName DEPRECEATED | String | $OUTLET_NAME | false |
outletId | String | $OUTLET_ID | true |
points | Int | $POINTS | true |
spending | Float | $SPENDING | false |
transactionNumber | String | $TRANSACTION_NUMBER | false |
Important: Append country code to phone number string
Important: Only MY extension numbers are supported at this current time
Tip: $SHARED_BRAND_ID and $OULET_ID can be obtained via Accessible Brands
Example
Request
curl \
-X POST \
-H "Content-Type: application/json" \
-H "Token: $TOKEN" \
-d '{
"operation_name": "collectPoints",
"variables": {
"phoneNumber": "60123123123",
"extension": "MY",
"brandId": $SHARED_BRAND_ID,
"outletName": $OUTLET_NAME,
"outletId": $OUTLET_ID,
"points": 100
}
}' \
https://mulahpoints.com/third_party
Response
{
"data": {
"thirdPartyCollectPoints": {
"result": $SUCCESS_MESSAGE,
"collectionId": $COLLECTION_ID,
"phoneNumber": $PHONE_NUMBER,
"collectedPoints": $POINTS,
"spending": $SPENDING,
"balance": $BALANCE,
"errors": [
{message: $ERROR_MESSAGE}
]
}
},
"errors": [
{message: $ERROR_MESSAGE}
]
}