Samples
The SmartSurvey Webhook API supports both JSON and XML formats. We have listed two basic examples for you to see.
JSON Example POST
[
{
"id": 123456789,
"survey_id": 12345,
"tracking_link_id": 123,
"translation_id": 321,
"date_started": "2016-06-13T15:29:59Z",
"date_ended": "2016-06-13T15:35:31Z",
"date_modified": "2016-06-13T15:35:31Z",
"status": "completed",
"contact_name": "",
"contact_email": "",
"contact_invitation_id": 0,
"ip_address": "1.1.1.1",
"user_agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36",
"country": "0",
"entry_url": "",
"referer_url": "",
"edit_url": "http://www.smartsurvey.co.uk/s/123ABCDE/?uid=123456789&edit=EB0LDa6HJIoVwUR3kkNmtaje1OuZUz1bGjV8SscYicOuz",
"saved": false,
"saved_name": "",
"saved_email": "",
"saved_continue_url": "",
"current_page_id": 10001,
"page_path": null,
"manual_entry": false,
"href": "https://api.smartsurvey.io/v0.1/surveys/223720/responses/123456789",
"pages": [
{
"id": 1001,
"title": "Daily Question",
"position": 1,
"questions": [
{
"id": 10001,
"title": "What day of the week is it?",
"type": "single_choice",
"sub_type": "radio",
"position": 1,
"answers": [
{
"id": 100000001,
"type": "radio",
"choice_title": "Wednesday",
"choice_id": 100001
},
{
"id": 100000002,
"type": "comment",
"choice_title": "Comments:",
"choice_id": 100002,
"value": "What a lovely day."
}
]
}
]
}
]
}
]
XML Example POST
<responses>
<response>
<id>123456789</id>
<survey_id>12345</survey_id>
<tracking_link_id>123</tracking_link_id>
<translation_id>321</translation_id>
<date_started>2016-06-13T15:29:59Z</date_started>
<date_ended>2016-06-13T15:35:31Z</date_ended>
<date_modified>2016-06-13T15:35:31Z</date_modified>
<status>completed</status>
<contact_name />
<contact_email />
<contact_invitation_id>0</contact_invitation_id>
<ip_address>1.1.1.1</ip_address>
<user_agent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36</user_agent>
<country>0</country>
<entry_url />
<referer_url />
<edit_url>http://www.smartsurvey.co.uk/s/123ABCDE/?uid=123456789&edit=EB0LDa6HJIoVwUR3kkNmtaje1OuZUz1bGjV8SscYicOuz</edit_url>
<saved>false</saved>
<saved_name />
<saved_email />
<saved_continue_url />
<current_page_id>10001</current_page_id>
<manual_entry>false</manual_entry>
<href>https://api.smartsurvey.io/v0.1/surveys/223720/responses/123456789</href>
<pages>
<page>
<id>1001</id>
<title>Daily Questio</title>
<position>1</position>
<questions>
<question>
<id>10001</id>
<title>What day of the week is it?</title>
<type>single_choice</type>
<sub_type>radio</sub_type>
<position>1</position>
<answers>
<answer>
<id>100000001</id>
<type>radio</type>
<choice_title>Wednesday</choice_title>
<choice_id>100001</choice_id>
</answer>
<answer>
<id>100000002</id>
<type>comment</type>
<choice_title>Comments:</choice_title>
<choice_id>100002</choice_id>
<value>What a lovely day.</value>
</answer>
</answers>
</question>
</questions>
</page>
</pages>
</response>
</responses>
Updated over 5 years ago