« Back to Documentation Overviewget_contact_surveys
Section: Contacts
Version: 1.5.0
List survey results filled by contacts.
Questions that do not have predetermined answers (text fields) have response returned as string while questions with predetermined answers (single/multi selects) have array of selected options returned.
Meaning of every QUESTION_ID and OPTION_ID can be found by calling get_survey method with given SURVEY_ID.
Hint: If you want to keep surveys synchronized with external database, then setting survey callback is much more efficient than querying this method periodically.
Parameters
|
---|
string | API_KEY |
object | |
Return Value
|
---|
object | SURVEY_ID | array | QUESTION_ID | | string | created_on | 2012-11-11 12:54:01 |
|
Example Request JSON
[
"API_KEY",
{
"contact": "CONTACT_ID"
}
]
Example Response JSON
{
"SURVEY_ID": {
"QUESTION_ID": [
"OPTION_ID"
],
"created_on": "2012-11-11 12:54:01"
}
}
Example Error Response JSON
{
"code": -1,
"message": "Missing contact"
}
Method-specific Errors
|
---|
Missing contact |
API-wide Errors
|
---|
API key verification failed
| API key verification failed |
API client IP not allowed
| API client IP not allowed |
Invalid params
| Attribute params must be reference to hash |