Results
List of operations for the resource
Name | URL | Description |
Single responses (v2) |
| An operation that returns results in a valid JSON-schema. |
Endpoint | A new version of the Raw results (JSON) operation, which returns results in a valid JSON-schema. We recommend using this operation instead of the old version - additionally, information is returned about how many records match the request. | |
| The operation returns meta information about the collected survey results in JSON format. The response format is described below. | |
/results/{surveyId}/fill/{fillId}/attachment/{questionId} | The operation returns the added file in an attachment-type question from the completion. |
Single responses (v2)
URL
(GET) https://app.customerhero.com/api/v2/results/single-sheets/:id_surveyOptional parameters (GET) (exceptionally GET in this operation)
Name | Description |
| Completion ID used during completion. You cannot pass this parameter if |
| Respondent's token used to complete the survey. You cannot pass this parameter if |
| External respondent tracking parameter assigned by the client's system. |
| The oldest possible survey completion date. When using this parameter, only those completions that took place after the passed date will be returned. The date must be passed in |
| The latest possible survey completion date. When using this parameter, only those completions that took place before the passed date will be returned. The date must be passed in |
| Parameter determining whether unfinished (partial) completions will also be included. |
| Parameter determining whether the results will appear in order from newest to oldest, or vice versa. By default, the parameter takes the value |
| Parameter determining which page will be displayed. |
| Parameter determining how many records will be displayed in one response. The maximum parameter value is 200. The default value is 10. |
| internal (system) question name |
Example response
{
"data": {
"sheets": [
{
"meta": {
"id": 89595094,
"surveyId": 347232,
"startDate": "2021-05-26 11:01:01",
"endDate": "2021-05-26 11:07:14",
"lastRespondentInteractionDate": "2023-07-03 11:28:03",
"email": "j.kowalski@webankieta.pl",
"respondentId": 7548,
"token": "84CFd0",
"finished": true,
"externalKey": "",
"ip": "213.222.209.195",
"referer": "https://www.webankieta.pl/ankieta/token/id/424938/demo-single-sheets.html"
"personalDataChecked": true,
"labels": [
{
"id": 1,
"name": "Zawód",
"value": "Programista"
},
{
"id": 2,
"name": "Wykształcenie",
"value": "Wyższe"
}
],
"tags": [
{
"id": 11452,
"sentiment": "positive",
"weight": 1
},
{
"id": 11454,
"sentiment": "none",
"weight": null
}
]
},
"time": {
"real": "00:06:13",
"total": "00:06:13",
"pages": [
{
"id": 1539098,
"time": 373
}
]
},
"questions": [
{
"id": 5255742,
"content": "Single choice",
"internalName": "",
"answer": {
"id": 1,
"content": "a",
"additional": "custom answer"
}
},
{
"id": 5255744,
"content": "Multiple choice",
"internalName": "",
"answers": [
{
"id": 1,
"content": "a",
"additional": "custom answer"
},
{
"id": 2,
"content": "b",
"additional": null
},
{
"id": 3,
"content": "c",
"additional": null
}
]
},
{
"id": 5255746,
"content": "Open-ended",
"internalName": "",
"answers": [
{
"value": "open-ended 1"
},
{
"value": "open-ended 2"
}
]
},
{
"id": 5255748,
"content": "NPS",
"internalName": "",
"answer": {
"id": 7,
"content": "6",
"additional": "Justification"
}
},
{
"id": 5255750,
"content": "Rating/Rating matrix",
"internalName": "",
"answers": [
{
"id": 1,
"rating": 2,
"content": "a",
"additional": "Justification",
"reason": null
},
{
"id": 2,
"rating": 3,
"content": "b",
"additional": null,
"reason": null
},
{
"id": 3,
"rating": 4,
"content": "c",
"additional": null,
"reason": null
}
]
},
{
"id": 5255752,
"content": "Matrix single choice",
"internalName": "",
"answers": [
{
"id": 1,
"content": "row 1",
"column": {
"id": 1,
"content": "column 1"
},
"additional": "w1",
"reason": "w1k1"
},
{
"id": 2,
"content": "row 2",
"column": {
"id": 2,
"content": "column 2"
},
"additional": null,
"reason": null
},
{
"id": 3,
"content": "row 3",
"column": {
"id": 3,
"content": "column 3"
},
"additional": null,
"reason": null
}
]
},
{
"id": 5255754,
"content": "Matrix multiple choice",
"internalName": "",
"answers": [
{
"id": 1,
"content": "w1",
"columns": [
{
"column": "1",
"content": "k1"
},
{
"column": "2",
"content": "k2"
}
],
"additional": "r1 justification"
},
{
"id": 2,
"content": "w2",
"columns": [
{
"column": "2",
"content": "k2"
}
],
"additional": "r2 justification"
},
{
"id": 3,
"content": "w3",
"columns": [
{
"column": "3",
"content": "k3"
}
],
"additional": null
}
]
},
{
"id": 5255758,
"content": "Matrix open-ended",
"internalName": "",
"answers": [
{
"id": 1,
"content": "w1",
"columns": [
{
"column": "1",
"content": "k1",
"answer": "w1k2"
},
{
"column": "2",
"content": "k2",
"answer": "w1k1"
}
]
},
{
"id": 2,
"content": "w2",
"columns": [
{
"column": "1",
"content": "k1",
"answer": "w2k1"
},
{
"column": "2",
"content": "k2",
"answer": "w2k2"
}
]
}
]
},
{
"id": 5255760,
"content": "Slider",
"internalName": "",
"type": "slider",
"answers": [
{
"id": 21,
"leftPositionContent": "text on the left",
"rightPositionContent": "text on the right",
"rowId": 1
},
{
"id": 4,
"leftPositionContent": "text on the left 2",
"rightPositionContent": "text on the right 2",
"rowId": 2
},
{
"id": 18,
"leftPositionContent": "text on the left 3",
"rightPositionContent": "text on the right 3",
"rowId": 3
}
]
},
{
"id": 5255762,
"content": "Form",
"internalName": "",
"answers": [
{
"id": "1",
"content": "answer 1",
"value": "odp1"
},
{
"id": "2",
"content": "answer 2",
"value": "odp2"
}
]
},
{
"questionId": 5255764,
"content": "Drop-down list",
"internalName": "",
"answer": {
"id": 2,
"content": "b"
}
},
{
"id": 5255766,
"content": "drag and drop",
"internalName": "",
"answers": [
{
"id": 1,
"content": "a",
"group": 1,
"groupContent": "vowels"
},
{
"id": 2,
"content": "b",
"group": 2,
"groupContent": "consonants"
},
{
"id": 3,
"content": "c",
"group": 2,
"groupContent": "consonants"
},
{
"id": 4,
"content": "d",
"group": 2,
"groupContent": "consonants"
},
{
"id": 5,
"content": "f",
"group": 2,
"groupContent": "consonants"
}
]
},
{
"id": 5255768,
"content": "Ranking",
"internalName": "",
"answers": [
{
"id": 1,
"content": "radishes",
"value": 3
},
{
"id": 2,
"content": "strawberries",
"value": 2
},
{
"id": 3,
"content": "bananas",
"value": 1
}
]
},
{
"questionId": 5255770,
"internalName": "",
"answers": [
{
"id": 1,
"content": "a",
"value": 33
},
{
"id": 2,
"content": "b",
"value": 33
},
{
"id": 3,
"content": "c",
"value": 34
}
]
},
{
"id": 5255772,
"content": "Attachment",
"internalName": "",
"answer": "816_przenoszenie.pdf"
},
{
"id": 5255774,
"content": "Number",
"internalName": "",
"answer": "165"
},
{
"id": 5255776,
"content": "Email",
"internalName": "",
"answer": "j.kowalski@webankieta.pl"
},
{
"id": 5255778,
"content": "Date",
"internalName": "",
"answer": "2021-05-21 00:00:00"
}
]
}
}Returned errors
400 Bad request– Invalid date format.401 Unauthorized– If the user references a foreign resource.404 Not Found– If a survey with the given:id_surveyis not found.406 Not Acceptable– If the:id_surveyparameter is not passed.409 Conflict– The:id_responseand:tokenparameters were passed at the same time.
Single responses (v3)
Note!:
The method in version v3 allows fetching data with information about how many records are present after calling this request - thanks to this, you can easily manage the pagination of responses.
URL
(GET) https://app.customerhero.com/api/v3/results/single-sheets/:id_surveyOptional parameters (GET) (exceptionally GET in this operation)
Name | Description | |
| Completion ID used during completion. You cannot pass this parameter if | |
| Respondent's token used to complete the survey. You cannot pass this parameter if | |
| External respondent tracking parameter assigned by the client's system. | |
| The oldest possible survey completion date. When using this parameter, only those completions that took place after the passed date will be returned. The date must be passed in | |
| The latest possible survey completion date. When using this parameter, only those completions that took place before the passed date will be returned. The date must be passed in | |
| Parameter determining whether unfinished (partial) completions will also be included. | |
| Parameter determining whether the results will appear in order from newest to oldest, or vice versa. By default, the parameter takes the value | |
| Parameter determining which page will be displayed. | |
| Parameter determining how many records will be displayed in one response. The maximum parameter value is 200. The default value is 10. | |
| internal (system) question name |
Example response
{
"data": {
"sheets": [
{
"meta": {
"id": 89595094,
"surveyId": 347232,
"startDate": "2021-05-26 11:01:01",
"endDate": "2021-05-26 11:07:14",
"lastRespondentInteractionDate": "2023-07-03 11:28:03",
"email": "j.kowalski@webankieta.pl",
"respondentId": 7548,
"token": "84CFd0",
"finished": true,
"externalKey": "",
"ip": "213.222.209.195",
"referer": "https://www.webankieta.pl/ankieta/token/id/424938/demo-single-sheets.html"
"personalDataChecked": true,
"labels": [
{
"id": 1,
"name": "Zawód",
"value": "Programista"
},
{
"id": 2,
"name": "Wykształcenie",
"value": "Wyższe"
}
],
"tags": [
{
"id": 11452,
"sentiment": "positive",
"weight": 1
},
{
"id": 11454,
"sentiment": "none",
"weight": null
}
]
},
"time": {
"real": "00:06:13",
"total": "00:06:13",
"pages": [
{
"id": 1539098,
"time": 373
}
]
},
"questions": [
{
"id": 5255742,
"content": "Single choice",
"internalName": "",
"answer": {
"id": 1,
"content": "a",
"additional": "custom answer"
}
},
{
"id": 5255744,
"content": "Multiple choice",
"internalName": "",
"answers": [
{
"id": 1,
"content": "a",
"additional": "custom answer"
},
{
"id": 2,
"content": "b",
"additional": null
},
{
"id": 3,
"content": "c",
"additional": null
}
]
},
{
"id": 5255746,
"content": "Open-ended",
"internalName": "",
"answers": [
{
"value": "open-ended 1"
},
{
"value": "open-ended 2"
}
]
},
{
"id": 5255748,
"content": "NPS",
"internalName": "",
"answer": {
"id": 7,
"content": "6",
"additional": "Justification"
}
},
{
"id": 5255750,
"content": "Rating/Rating matrix",
"internalName": "",
"answers": [
{
"id": 1,
"rating": 2,
"content": "a",
"additional": "Justification",
"reason": null
},
{
"id": 2,
"rating": 3,
"content": "b",
"additional": null,
"reason": null
},
{
"id": 3,
"rating": 4,
"content": "c",
"additional": null,
"reason": null
}
]
},
{
"id": 5255752,
"content": "Matrix single choice",
"internalName": "",
"answers": [
{
"id": 1,
"content": "row 1",
"column": {
"id": 1,
"content": "column 1"
},
"additional": "w1",
"reason": "w1k1"
},
{
"id": 2,
"content": "row 2",
"column": {
"id": 2,
"content": "column 2"
},
"additional": null,
"reason": null
},
{
"id": 3,
"content": "row 3",
"column": {
"id": 3,
"content": "column 3"
},
"additional": null,
"reason": null
}
]
},
{
"id": 5255754,
"content": "Matrix multiple choice",
"internalName": "",
"answers": [
{
"id": 1,
"content": "w1",
"columns": [
{
"column": "1",
"content": "k1"
},
{
"column": "2",
"content": "k2"
}
],
"additional": "r1 justification"
},
{
"id": 2,
"content": "w2",
"columns": [
{
"column": "2",
"content": "k2"
}
],
"additional": "r2 justification"
},
{
"id": 3,
"content": "w3",
"columns": [
{
"column": "3",
"content": "k3"
}
],
"additional": null
}
]
},
{
"id": 5255758,
"content": "Matrix open-ended",
"internalName": "",
"answers": [
{
"id": 1,
"content": "w1",
"columns": [
{
"column": "1",
"content": "k1",
"answer": "w1k2"
},
{
"column": "2",
"content": "k2",
"answer": "w1k1"
}
]
},
{
"id": 2,
"content": "w2",
"columns": [
{
"column": "1",
"content": "k1",
"answer": "w2k1"
},
{
"column": "2",
"content": "k2",
"answer": "w2k2"
}
]
}
]
},
{
"id": 5255760,
"content": "Slider",
"internalName": "",
"type": "slider",
"answers": [
{
"id": 21,
"leftPositionContent": "text on the left",
"rightPositionContent": "text on the right",
"rowId": 1
},
{
"id": 4,
"leftPositionContent": "text on the left 2",
"rightPositionContent": "text on the right 2",
"rowId": 2
},
{
"id": 18,
"leftPositionContent": "text on the left 3",
"rightPositionContent": "text on the right 3",
"rowId": 3
}
]
},
{
"id": 5255762,
"content": "Form",
"internalName": "",
"answers": [
{
"id": "1",
"content": "answer 1",
"value": "odp1"
},
{
"id": "2",
"content": "answer 2",
"value": "odp2"
}
]
},
{
"questionId": 5255764,
"content": "Drop-down list",
"internalName": "",
"answer": {
"id": 2,
"content": "b"
}
},
{
"id": 5255766,
"content": "drag and drop",
"internalName": "",
"answers": [
{
"id": 1,
"content": "a",
"group": 1,
"groupContent": "vowels"
},
{
"id": 2,
"content": "b",
"group": 2,
"groupContent": "consonants"
},
{
"id": 3,
"content": "c",
"group": 2,
"groupContent": "consonants"
},
{
"id": 4,
"content": "d",
"group": 2,
"groupContent": "consonants"
},
{
"id": 5,
"content": "f",
"group": 2,
"groupContent": "consonants"
}
]
},
{
"id": 5255768,
"content": "Ranking",
"internalName": "",
"answers": [
{
"id": 1,
"content": "radishes",
"value": 3
},
{
"id": 2,
"content": "strawberries",
"value": 2
},
{
"id": 3,
"content": "bananas",
"value": 1
}
]
},
{
"questionId": 5255770,
"internalName": "",
"answers": [
{
"id": 1,
"content": "a",
"value": 33
},
{
"id": 2,
"content": "b",
"value": 33
},
{
"id": 3,
"content": "c",
"value": 34
}
]
},
{
"id": 5255772,
"content": "Attachment",
"internalName": "",
"answer": "816_przenoszenie.pdf"
},
{
"id": 5255774,
"content": "Number",
"internalName": "",
"answer": "165"
},
{
"id": 5255776,
"content": "Email",
"internalName": "",
"answer": "j.kowalski@webankieta.pl"
},
{
"id": 5255778,
"content": "Date",
"internalName": "",
"answer": "2021-05-21 00:00:00"
}
]
}
],
"totalCount":1
}
}Returned errors
400 Bad request– Invalid date format.401 Unauthorized– If the user references a foreign resource.404 Not Found– If a survey with the given:id_surveyis not found.406 Not Acceptable– If the:id_surveyparameter is not passed.409 Conflict– The:id_responseand:tokenparameters were passed at the same time.
Metadata about collected results (JSON)
URL
(GET) https://app.customerhero.com/api/v2/results/meta/:id_surveyOptional parameters (POST)
Name | Description |
| Completion ID used during completion. You cannot pass this parameter if |
| Respondent's token used to complete the survey. You cannot pass this parameter if |
| External respondent tracking parameter assigned by the client's system. |
| The oldest possible survey completion date. When using this parameter, only those completions that took place after the passed date will be returned. The date must be passed in |
| The latest possible survey completion date. When using this parameter, only those completions that took place before the passed date will be returned. The date must be passed in |
| Parameter determining whether unfinished (partial) completions will also be included. |
Example response
[
{
"meta": {
"id": 123456,
"ip": "127.0.0.1",
"referer": "http:\/\/facebook.com",
"date_start": "2014-02-01 12:00:00",
"date_response": "2014-02-02 12:00:00",
"finished": "1",
"external_key": "mailing",
"token": "12fh47",
"e-mail": "jan@kowalski.pl",
"label1": "Jan",
"label2": "Kowalski",
//....
"label10": "Mr."
},
"time": {
"real": "9:05",
"total": "10:10"
}
},{
//next record
}
]Returned errors
400 Bad request– Invalid date format.401 Unauthorized– If the user references a foreign resource.404 Not Found– If a survey with the given:id_surveyis not found.406 Not Acceptable– If the:id_surveyparameter is not passed.409 Conflict– The:id_responseand:tokenparameters were passed at the same time.
Attachments
URL
(GET) https://app.customerhero.com/api/v2/results/{surveyId}/fill/{fillId}/attachment/{questionId}Optional parameters (POST)
Name | Description |
| Survey ID |
| Completion ID |
| Attachment-type question ID |
Returned errors:
401 Unauthorized– If the user references a foreign resource.