RESThook
1. Description of RESThook operation
The RESThook in customerhero.com allows for automatic transmission of survey data after the survey is completed. After each completion, the survey data will be sent in JSON format to the URL address defined by the user.
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": "Profession",
"value": "Programmer"
},
{
"id": 2,
"name": "Education",
"value": "Higher"
}
],
"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",
"answer": {
"id": 1,
"content": "a",
"additional": "custom answer"
}
},
{
"id": 5255744,
"content": "Multiple choice",
"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",
"answers": [
{
"value": "open-ended 1"
},
{
"value": "open-ended 2"
}
]
},
{
"id": 5255748,
"content": "NPS",
"answer": {
"id": 7,
"content": "6",
"additional": "Justification"
}
},
{
"id": 5255750,
"content": "Rating/Rating matrix",
"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",
"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",
"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",
"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",
"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",
"answers": [
{
"id": "1",
"content": "answer 1",
"value": "odp1"
},
{
"id": "2",
"content": "answer 2",
"value": "odp2"
}
]
},
{
"questionId": 5255764,
"content": "Drop-down list",
"answer": {
"id": 2,
"content": "b"
}
},
{
"id": 5255766,
"content": "drag and drop",
"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",
"answers": [
{
"id": 1,
"content": "radishes",
"value": 3
},
{
"id": 2,
"content": "strawberries",
"value": 2
},
{
"id": 3,
"content": "bananas",
"value": 1
}
]
},
{
"questionId": 5255770,
"answers": [
{
"id": 1,
"content": "a",
"value": 33
},
{
"id": 2,
"content": "b",
"value": 33
},
{
"id": 3,
"content": "c",
"value": 34
}
]
},
{
"id": 5255772,
"content": "Attachment",
"answer": "816_przenoszenie.pdf"
},
{
"id": 5255774,
"content": "Number",
"answer": "165"
},
{
"id": 5255776,
"content": "Email",
"answer": "j.kowalski@webankieta.pl"
},
{
"id": 5255778,
"content": "Date",
"answer": "2021-05-21 00:00:00"
}
]
}
}2. Registering a RESThook
To register a RESThook, the user must submit the data required for configuration. The request should be sent to: contact@customerhero.com
The request must include:
The URL address to which the data should be sent. (e.g., https://example.com/hooks/123456/987654321)
The ID number of the survey for which the RESThook is to be defined.