List of operations for the resource


Name

URL

Description

Single responses (v2)

/results/single-sheets

An operation that returns results in a valid JSON-schema.

Single responses (v3)

/results/single-sheets


Endpoint https://app.customerhero.com/api/v3

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.

Metadata (JSON)

/results/meta/:id_survey

The operation returns meta information about the collected survey results in JSON format. The response format is described below.

Attachments

/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_survey


Optional parameters (GET) (exceptionally GET in this operation)

Name

Description

responseId

Completion ID used during completion. You cannot pass this parameter if token is passed at the same time.

token

Respondent's token used to complete the survey. You cannot pass this parameter if id_response is passed at the same time.

externalKey

External respondent tracking parameter assigned by the client's system.

lowerResponseDate

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 YYYY-MM-DD format (e.g., 2011-11-20).

upperResponseDate

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 YYYY-MM-DD format (e.g., 2011-11-20).

unfinished

Parameter determining whether unfinished (partial) completions will also be included.

order

Parameter determining whether the results will appear in order from newest to oldest, or vice versa. By default, the parameter takes the value desc and the operation displays results from the newest to the oldest completion.

page

Parameter determining which page will be displayed.

limit

Parameter determining how many records will be displayed in one response. The maximum parameter value is 200. The default value is 10.

internalName

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_survey is not found.

  • 406 Not Acceptable – If the :id_survey parameter is not passed.

  • 409 Conflict – The :id_response and :token parameters 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_survey


Optional parameters (GET) (exceptionally GET in this operation)

Name

Description

responseId

Completion ID used during completion. You cannot pass this parameter if token is passed at the same time.

token

Respondent's token used to complete the survey. You cannot pass this parameter if id_response is passed at the same time.

externalKey

External respondent tracking parameter assigned by the client's system.

lowerResponseDate

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 YYYY-MM-DD format (e.g., 2011-11-20).

upperResponseDate

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 YYYY-MM-DD format (e.g., 2011-11-20).

unfinished

Parameter determining whether unfinished (partial) completions will also be included.

order

Parameter determining whether the results will appear in order from newest to oldest, or vice versa. By default, the parameter takes the value desc and the operation displays results from the newest to the oldest completion.

page

Parameter determining which page will be displayed.

limit

Parameter determining how many records will be displayed in one response. The maximum parameter value is 200. The default value is 10.

internalName

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_survey is not found.

  • 406 Not Acceptable – If the :id_survey parameter is not passed.

  • 409 Conflict – The :id_response and :token parameters were passed at the same time.


Metadata about collected results (JSON)

URL

(GET) https://app.customerhero.com/api/v2/results/meta/:id_survey

Optional parameters (POST)

Name

Description

id_response

Completion ID used during completion. You cannot pass this parameter if token is passed at the same time.

token

Respondent's token used to complete the survey. You cannot pass this parameter if id_response is passed at the same time.

external_key

External respondent tracking parameter assigned by the client's system.

lower_response_date

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 YYYY-MM-DD format (e.g., 2011-11-20).

upper_response_date

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 YYYY-MM-DD format (e.g., 2011-11-20).

unfinished

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_survey is not found.

  • 406 Not Acceptable – If the :id_survey parameter is not passed.

  • 409 Conflict – The :id_response and :token parameters 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

surveyId

Survey ID

fillId

Completion ID

questionId

Attachment-type question ID


Returned errors:

  • 401 Unauthorized – If the user references a foreign resource.