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 limit and offset parameters. If you specify, limit add a limit value. The response will contain the number of items you specify in the limit GET parameter. limit is an integer value. This is another way to reduce the response time because less data will be returned. |
| offset | 0 | offset points the first row that should be returned, e.g. limit=10, offset=10 will return 10 items starting from index 10 (indexes 10 out 20) |
| 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"
}
]