Customer Profile information
Retrieve Customer Profile information Example
curl -XPOST 'https://me.instaply.com/graphql' \
-H 'Authentication-Token:${PERSONAL_ACCESS_TOKEN}' \
-H 'Content-Type: application/json' -d'
{
"query": "get-customer-profile-query",
"variables": {
"customerId":"135655",
"customerType":"prospect"
}
}
'
Response
{“data”:{“customer”:{“id”:”xxxx”,”type”:”prospect”,”pictureHref”:”https://api.instaply.com/files/xxxxx”,”displayName”:”xxx xxxx”,”emailAddress”:null,”phoneNumber”:”+xxxxxx”,”firstName”:”xxxxx”,”lastName”:”xxxxx”,”editable”:true,”lastSurveys”:{“nps”:null,”preferredChannel”:null}}}}
Set Customer Profile information Example
curl -XPOST 'https://me.instaply.com/graphql' \
-H 'Authentication-Token:${PERSONAL_ACCESS_TOKEN}' \
-H 'Content-Type: application/json' -d'
{
"query": "update-customer-profile-name-mutation",
"variables": {
"customerId":"135655",
"firstName":"first",
"lastName":"last"
}
}
'
Additional fields inside “variables” are allowed but optional:
“company”: Set the company name on the customer profile
curl -XPOST 'https://me.instaply.com/graphql' \
-H 'Authentication-Token:${PERSONAL_ACCESS_TOKEN}' \
-H 'Content-Type: application/json' -d'
{
"query": "update-customer-profile-name-mutation",
"variables": {
"customerId":"135655",
"firstName":"first",
"lastName":"last",
"company":"mycompany"
}
}
'