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

ParameterDefault valueDescription
limit100By 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.
offset0offset 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)
countryFilter answers by country. If no country is specified, all questions will be returned.
translation_countriesTo fetch the translations, the GET parameter translation_countries must be included.
translation_countries is a comma separated list of two letter country codes in uppercase.
When this parameter is included in the profilers endpoint, the profiler object in the response.

If the parameter translation_countries is present in the request, the limit of max 25 is enforced. If no limit is present, the default value of 25 will be assumed. If limit of higher value than 25 is present, limit is set to 25. all parameter is not supported when translation_countries is present.

Note: to fetch the subsequent items, the offset parameter has to be used.

πŸ“˜

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:

http://www.your-surveys.com/?si=XX&offer_id=123456789&ssi=345678&age=40&unique_user_id=abc123&hmac=1162d1a45594bdfae4fdcb60c1959959

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"
    }
]

What’s Next