Description
Creates a new prospect for a brand.
Only configured optional fields will be accepted.
This feature can only be activated and configured by a SimpleLoyalty admin. Contact us here to enable it.
Parameters
| Parameter | Type | Value | Required |
| operation_name | String | resendSmsPromotionCode | true |
| variables | JSON | $JSON_OBJECT | true |
$JSON_OBJECT Structure
| Key | Type | Value | Required |
| brandId | String | $SHARED_BRAND_ID | true |
| phoneNumber | String | $PHONE_NUMBER | false |
| extension | String | $EXTENSION | false |
| source | String | $SOURCE | false |
| name | String | $NAME | false |
| String | false | ||
| birthdate | String | $BIRTHDATE | false |
| shippingCountry | String | $SHIPPING_COUNTY | false |
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": "addProspect",
"variables": {
"brandId": $SHARED_BRAND_ID,
"phoneNumber": "60123456789",
"extension": "MY",
"source": "newsletter",
"name": "yourName",
"email": "youremail@email.com",
"shippingCountry": "MY"
}
}' \
https://simpleloyalty.com/third_party
Response
{
"data": {
"thirdPartyAddProspect": {
"result": $SUCCESS_MESSAGE,
"errors": [
{message: $ERROR_MESSAGE}
]
}
},
"errors": []
}