Profilers
You make the call, we give you the list of profilers in our database.
GET https://www.your-surveys.com/suppliers_api/surveys/profilers
The Profilers API has no mandatory request parameters. If no parameters are present, it will assume default values.
Request Parameters
Parameter | Default value | Description |
---|---|---|
limit | 100 | By default, the API returns 100 profilers. To fetch more profilers, increment the values of |
offset | 0 | offset points the first row that should be returned, e.g. |
country | Filter answers by country. If no country is specified, all questions will be returned. | |
translation_countries | To fetch the translations, the GET parameter If the parameter Note: to fetch the subsequent items, the |
Some profilers are global and will always be present.
Please always also pass parental status ("parental_status") if you are looking to pass the age of the children ("children_under_18")
Since age is calculated from date_of_birth, it is not available on the API response, however, it could be passed through URL. For e.g. as in the below entry URL:
Note: We still prefer date_of_birth for better matching
Examples
Request
<?php
$secret = 'yourapisecret';
# Required parameters
$params = array(
'limit'=> 5,
);
$params = http_build_query($params);
$opts = array(
'http'=> array(
'method'=> "GET",
'header'=> "X-YourSurveys-Api-Key: $secret",
'ignore_errors' => true,
)
);
$url = 'https://www.your-surveys.com/suppliers_api/surveys/profilers';
$url = $url . '?' . $params;
$context = stream_context_create($opts);
/* Sends an http request to www.your-surveys.com/supppliers_api/surveys/profilers with additional headers shown above */
$fp = fopen($url, 'r', false, $context);
# Output all data from the response
fpassthru($fp);
fclose($fp);
import requests
import json
url = 'http://www.your-surveys.com/suppliers_api/surveys/profilers'
headers = {
'X-YourSurveys-Api-Key': 'yourapisecret'
}
request_params = {
'limit': 5,
}
response = requests.get(
url,
headers=headers,
params=request_params,
)
Response
[
{
"answers": [
{
"answer": "Yes, US",
"answer_id": 1234
}
],
"name": "age",
"profiler_id": 1234,
"question": "How old are you?",
"type": "single_punch"
}
]
Updated about 2 months ago