Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Getting the category list
Method Objective
The method allows getting information for all active NPS categories.
Request
Endpoint | Request Type |
---|---|
https://api.personaclick.com/nps/categories | GET |
Parameters
Any of the parameters below can be used to obtain profile properties:
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
403 Forbidden | Failed authorization. |
404 Not Found | Shop Not Found. |
API Response
The API returns an array of category objects. Below are the properties of a single object.
Name | Type | Description |
---|---|---|
id | number | NPS Category ID. |
code | string | The unique code of the NPS category. |
name | string | The name of the NPS category. |
promoter_question | string | The question is for the "Promoter" user type. |
promoter_success | string | Thanks-message for the "Promoter" user type. |
passive_question | string | The question is for the "Passive" user type. |
passive_success | string | Thanks-message for the "Passive" user type. |
detractor_question | string | The question is for the "Detractor" user type. |
detractor_success | string | Thanks-message for the "Detractor" user type. |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/nps/categories?shop_id=0d42fd8b713d0752776ca589cc0056' |
Getting the channel list
Method Objective
The method allows getting information for all active NPS channels.
Request
Endpoint | Request Type |
---|---|
https://api.personaclick.com/nps/channels | GET |
Parameters
Any of the parameters below can be used to obtain profile properties:
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
403 Forbidden | Failed authorization. |
404 Not Found | Shop Not Found. |
API Response
The API returns an array of channel objects. Below are the properties of a single object.
Name | Type | Description |
---|---|---|
id | number | NPS Channel ID. |
code | string | The unique code of the NPS channel. |
name | string | The name of the NPS channel. |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/nps/channels?shop_id=0d42fd8b713d0752776ca589cc0056' |
Saving the NPS review
Method Objective
The method allows saving the results of the NPS survey.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/nps/create | POST | application/ |
json |
Parameters
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings | ||
shop_secret | string | required if "did" property doesn't use | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings | ||
did | string | required if "shop_secret" property doesn't use | Unique Device ID. See "Initialization (REST API)" for information about getting and using Device ID. | ||
seance | string | required | Unique ID of the current user session. See "Initialization (REST API)" for information about getting and using User Session ID. | ||
string | required if "did" property doesn't use | User's email | |||
phone | string | required if "did" property doesn't use | User's phone | ||
loyalty_id | string | optionally | User's Loyalty ID | ||
order_id | string | optionally | Order ID, related to the current survey | ||
channel | string | required | The NPS channel code. | ||
category | string | required | The NPS category code. | ||
rate | number | required | The rating got from the user.
| ||
comment | string | optionally | User comment. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | See the "message" property of the API response for details. |
403 Forbidden | See the "message" property of the API response for details. |
404 Not Found | Required query parameters are missed or undefined. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
Examples of use
By using shop secret and user's email.
Code Block | ||||
---|---|---|---|---|
| ||||
# by using shop secret and user's email curl 'https://api.personaclick.com/nps/create' \ -X 'POST' \ -H 'content-type: application/x-www-form-urlencodedjson' \ -d '{"shop_id=0d42fd8b713d0752776ca589cc0056&":"0d42fd8b713d0752776ca589cc0056","shop_secret=0123456789abcdef0123456789abcdef&category=":"0123456789abcdef0123456789abcdef","category":"category_id&channel=","channel":"channel_id&rate=8&comment=ok%20thanks&email=john.doe%40examplemail.com' # by using DID ","rate":8,"comment":"ok thanks","email":"john.doe@examplemail.com"}' |
By using DID.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/nps/create' \ -X 'POST' \ -H 'content-type: application/x-www-form-urlencodedjson' \ -d '{"shop_id=0d42fd8b713d0752776ca589cc0056&did=7rjVGhMykT&category=category_id&channel=channel_id&rate=8&comment=ok%20thanks' |
Reading the NPS review
":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","category":"category_id","channel":"channel_id","rate":8,"comment":"ok thanks"}' |
Reading the NPS review
Method Objective
The method allows getting information for all active NPS categories.
Request
Endpoint | Request Type | Limit |
---|---|---|
https://api.personaclick.com/nps/reviews | GET | 1000 reviews per request |
Parameters
Any of the parameters below can be used to obtain profile properties:
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
shop_secret | string | required | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings |
date_from | string | optionally | Filter by date: start date. |
date_to | string | optionally | Filter by date: end date. |
channel | string | optionally | Channel code. |
category | string | optionally | Category code. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
403 Forbidden | Failed authorization. |
404 Not Found | Shop Not Found. |
API Response
The API returns an array of review objects. Below are the properties of a single object.
Name | Type | Description |
---|---|---|
id | number | Review ID. |
client | number | The internal ID of the PersonaClick user. |
rate | number | The rating got from the user. |
channel | string | The NPS channel code. |
category | string | The NPS category code. |
comment | string | User comment. |
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/nps/reviews?shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef' |
Column | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page Navigation
Related Pages
|