Libraries

Sample One libraries

1. Standard questions

To build the question library used by Ipsos surveys, you can use two separate methods to retrieve the list of questions available for a locale and the list of answers associated with each of the questions.

πŸ“˜

GET /supplier/v1/locales/{locale}/questions

The method will return all standard questions (metadata and translations) for each Ipsos screener with priority (showing for example the minimum profiling is marked as critical). It will allow suppliers to dynamically profile users on their side and only send targeted traffic to Ipsos.

Caching: 24 hours

Return example for "questions" method for en-us:

[
  {
    "type": "Multiple Punch",
    "translation": "Which, if any, of these drinks have you consumed in the past four weeks?",
    "id": 13699,
    "name": "ALC10",
    "text": "Which, if any, of these drinks have you consumed in the past four weeks?"
  },
  {
    "type": "Text",
    "translation": "What is your date of birth?",
    "id": 12201,
    "name": "Year",
    "text": "What is your date of birth?"
  },
  {
    "type": "Single Punch",
    "translation": "What is the highest degree or level of school you have completed?",
    "id": 12202,
    "name": "USEDU3",
    "text": "What is the highest degree or level of school you have completed?"
  },
  {
    "type": "Single Punch",
    "translation": "What is your gender?",
    "id": 12203,
    "name": "RESP_GENDER",
    "text": "What is your gender?"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 13608,
    "name": "HCAL_AGGLO_CODE_TYPE_US",
    "text": "HCAL_AGGLO_CODE_TYPE_US"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 13607,
    "name": "HCAL_AGGLO_CODE_US",
    "text": "HCAL_AGGLO_CODE_US"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 13609,
    "name": "HCAL_MktSize_US",
    "text": "HCAL_MktSize_US"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 13604,
    "name": "HCAL_REGION1_Label_abbreviation_US",
    "text": "HCAL_REGION1_US"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 13606,
    "name": "HCAL_Region2_US",
    "text": "HCAL_Region2_US"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 13605,
    "name": "HCAL_Region3_US",
    "text": "HCAL_Region3_US"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 12507,
    "name": "HCAL_STDMKTSIZE_US",
    "text": "HCAL_STDMKTSIZE_US"
  },
  {
    "type": "Single Punch",
    "translation": "Where do you live?",
    "id": 12503,
    "name": "HCAL_STDREGION_US",
    "text": "HCAL_STDREGION_US"
  },
  {
    "type": "Single Punch",
    "translation": "Are you of Hispanic, Latino or Spanish origin?",
    "id": 12499,
    "name": "USRETH3",
    "text": "Are you of Hispanic, Latino or Spanish origin?"
  },
  {
    "type": "Single Punch",
    "translation": "How many people are living or staying at your current address?",
    "id": 12496,
    "name": "HHCMP10",
    "text": "How many people are living or staying at your current address?"
  },
  {
    "type": "Single Punch",
    "translation": "Please indicate your annual household income before taxes.",
    "id": 12809,
    "name": "USHHI3",
    "text": "Please indicate your annual household income before taxes."
  },
  {
    "type": "Single Punch",
    "translation": "What is your current employment status?",
    "id": 12920,
    "name": "EMP01",
    "text": "What is your current employment status?"
  },
  {
    "type": "Single Punch",
    "translation": "How much of your household's grocery shopping do you, yourself, do?",
    "id": 12494,
    "name": "PGS01",
    "text": "How much of your household's grocery shopping do you, yourself, do?"
  },
  {
    "type": "Single Punch",
    "translation": "What is your marital status?",
    "id": 12806,
    "name": "USMAR2",
    "text": "What is your marital status?"
  },
  {
    "type": "Multiple Punch",
    "translation": "Do you have any of the following pets in your household?",
    "id": 13682,
    "name": "PETOWN1",
    "text": "Do you have any of the following pets in your household?"
  },
  {
    "type": "Multiple Punch",
    "translation": "What is your race?",
    "id": 12500,
    "name": "USRACE4",
    "text": "What is your race?"
  },
  {
    "type": "Regional",
    "translation": "Where do you live?",
    "id": 12205,
    "name": "HADD_ZipCode_US",
    "text": "Please insert your zipcode:"
  },
  {
    "type": "Single Punch",
    "translation": "What is your date of birth?",
    "id": 12596,
    "name": "Resp_age",
    "text": "Respondent's Age"
  },
  {
    "type": "Range",
    "translation": "",
    "id": -1,
    "name": "agerange",
    "text": ""
  }
]

πŸ“˜

GET /supplier/v1/locales/{locale}/questions/{questionId}/answers

Returns the list of answers for a specified question in the library.

Caching: 24 hours

Run example for "answers" method, for questionId=12503, locale=en-us

[
  {
    "type": "singlePunch",
    "translation": "New England",
    "isExclusive": false,
    "id": 92700,
    "name": "New England",
    "text": "New England"
  },
  {
    "type": "singlePunch",
    "translation": "Middle Atlantic",
    "isExclusive": false,
    "id": 92701,
    "name": "Middle Atlantic",
    "text": "Middle Atlantic"
  },
  {
    "type": "singlePunch",
    "translation": "East North Central",
    "isExclusive": false,
    "id": 92702,
    "name": "East North Central",
    "text": "East North Central"
  },
  {
    "type": "singlePunch",
    "translation": "West North Central",
    "isExclusive": false,
    "id": 92703,
    "name": "West North Central",
    "text": "West North Central"
  },
  {
    "type": "singlePunch",
    "translation": "South Atlantic",
    "isExclusive": false,
    "id": 92704,
    "name": "South Atlantic",
    "text": "South Atlantic"
  },
  {
    "type": "singlePunch",
    "translation": "East South Central",
    "isExclusive": false,
    "id": 92705,
    "name": "East South Central",
    "text": "East South Central"
  },
  {
    "type": "singlePunch",
    "translation": "West South Central",
    "isExclusive": false,
    "id": 92706,
    "name": "West South Central",
    "text": "West South Central"
  },
  {
    "type": "singlePunch",
    "translation": "Mountain",
    "isExclusive": false,
    "id": 92707,
    "name": "Mountain",
    "text": "Mountain"
  },
  {
    "type": "singlePunch",
    "translation": "Pacific",
    "isExclusive": false,
    "id": 92708,
    "name": "Pacific",
    "text": "Pacific"
  },
  {
    "type": "singlePunch",
    "translation": "NULL VALUE",
    "isExclusive": false,
    "id": 92699,
    "name": "NULL VALUE",
    "text": "NULL VALUE"
  }
]

2. Countries available in Sample One

πŸ“˜

GET /supplier/v1/countries

Returns a list of available countries in Sample One.

[
  {
    "id": 3,
    "code": "AF",
    "name": "Afghanistan",
    "regionName": "Other"
  },
  {
    "id": 6,
    "code": "AL",
    "name": "Albania",
    "regionName": "Other"
  },
  {
    "id": 59,
    "code": "DZ",
    "name": "Algeria",
    "regionName": "Other"
  },
  {
    "id": 12,
    "code": "AS",
    "name": "American Samoa",
    "regionName": "Other"
  },
  {
    "id": 1,
    "code": "AD",
    "name": "Andorra",
    "regionName": "Other"
  },
  {
    "id": 9,
    "code": "AO",
    "name": "Angola",
    "regionName": "Other"
  },
  {
    "id": 5,
    "code": "AI",
    "name": "Anguilla",
    "regionName": "Other"
  },
  {
    "id": 10,
    "code": "AQ",
    "name": "Antarctica",
    "regionName": "Other"
  }
]

3. Locales (culture-info) available in Sample One

πŸ“˜

GET /supplier/v1/locales

Returns a list of available locales in Sample One.

[
  {
    "countryId": 236,
    "id": 83,
    "name": "Afrikaans - South Africa",
    "nameTranslation": "",
    "locale": "af-za",
    "shortLocale": "af",
    "countryDefault": false,
    "countryName": "South Africa",
    "countryCode": "za",
    "regionName": ""
  },
  {
    "countryId": 6,
    "id": 84,
    "name": "Albanian – Albania",
    "nameTranslation": "",
    "locale": "sq-al",
    "shortLocale": "sq",
    "countryDefault": false,
    "countryName": "Albania",
    "countryCode": "al",
    "regionName": ""
  },
  {
    "countryId": 59,
    "id": 85,
    "name": "Arabic – Algeria",
    "nameTranslation": "",
    "locale": "ar-dz",
    "shortLocale": "ar",
    "countryDefault": false,
    "countryName": "Algeria",
    "countryCode": "dz",
    "regionName": ""
  },
  {
    "countryId": 23,
    "id": 86,
    "name": "Arabic – Bahrain",
    "nameTranslation": "",
    "locale": "ar-bh",
    "shortLocale": "ar",
    "countryDefault": false,
    "countryName": "Bahrain",
    "countryCode": "bh",
    "regionName": ""
  }
]

πŸ“˜

Survey statuses

Returns a list of all survey statuses.

[
  {
    "id": 5,
    "statusName": "Canceled"
  },
  {
    "id": 4,
    "statusName": "Complete"
  },
  {
    "id": 3,
    "statusName": "Live"
  },
  {
    "id": 6,
    "statusName": "live for testing"
  },
  {
    "id": 1,
    "statusName": "Pending"
  },
  {
    "id": 2,
    "statusName": "Pending(do not use)"
  }
]