Survey with Nested quotas

Create a survey with nested quotas. The survey is looking for 1000 completes, with the following quotas: 

Married White Male: 100

Married White Female: 100

Single or Divorced White Male: 250

Single or Divorced White Female: 250

Married Hispanic: 200

Asian: 100

As listed in Qualifications and condition_codes Codes, Qualification code for Gender, Ethnicity, and Relationship are 211, 214, and 217. Condition codes for male, female is 111, 112; Condition codes for White, Hispanic, and Asian is 111, 112, and 114. Single, Married, and Divorced is 111, 114, and 115

Create Survey




Request



POST $apihost/$basepath/surveys

($apihost is the environment against which you are testing, and $basepath is the base path with the api version. All Buy API calls will require access-token parameter in the header) 

Parameters: 

Body: 

{ "survey_title": "Nested Quota Gender-Race-Eth bapit-3", "survey_category_code": 231, "survey_localization": "en_US", "completes_required": 1000, "expected_ir": 60, "expected_loi": 60, "live_url": "https://my.survey.com?survey_id=1234", "test_url": "https://my.survey.com?survey_id=1234&test=1", "field_time": 10, "qualifications": [ { "qualification_code": 211, "condition_codes": [ "111", "112" ] }, { "qualification_code": 214, "condition_codes": [ "111", "112", "114" ] }, { "qualification_code": 217, "condition_codes": [ "111", "114", "115" ] } ], "quotas": [ { "buyer_quota_id": "b11111", "required_count": 100, "criteria": [ {"qualification_code": 217,"condition_codes": ["114"]}, {"qualification_code": 214,"condition_codes": ["111"]}, {"qualification_code": 211,"condition_codes": ["111"]} ] }, { "buyer_quota_id": "b11112", "required_count": 100, "criteria": [ {"qualification_code": 217,"condition_codes": ["114"]}, {"qualification_code": 214,"condition_codes": ["111"]}, {"qualification_code": 211,"condition_codes": ["112"]} ] }, { "buyer_quota_id": "b11113", "required_count": 250, "criteria": [ {"qualification_code": 217,"condition_codes": ["111"]}, {"qualification_code": 214,"condition_codes": ["111"]}, {"qualification_code": 211,"condition_codes": ["111"]} ] }, { "buyer_quota_id": "b11114", "required_count": 250, "criteria": [ {"qualification_code": 217,"condition_codes": ["111"]}, {"qualification_code": 214,"condition_codes": ["111"]}, {"qualification_code": 211,"condition_codes": ["112"]} ] }, { "buyer_quota_id": "b11115", "required_count": 200, "criteria": [ {"qualification_code": 217,"condition_codes": ["114"]}, {"qualification_code": 214,"condition_codes": ["112"]} ] }, { "buyer_quota_id": "b11116", "required_count": 100, "criteria": [ {"qualification_code": 214,"condition_codes": ["114"]} ] } ] }


Result 



Response Code

201

Response Body

{ "survey_title": "Nested Quota Gender-Race-Eth bapit-3", "survey_category_code": 231, "completes_required": 1000, "live_url": "https://my.survey.com?survey_id=1234", "test_url": "https://my.survey.com?survey_id=1234&test=1", "field_time": 10, "offer_price": null, "ps_survey_status": 11, "expected_loi": 60, "expected_ir": 60, "ps_survey_id": 3430, "mod_on": 1490013053832, "crtd_on": 1490011568138, "test_ps_survey_entry_link": "http://dev.spectrumsurveys.com:3500/startsurvey?survey_id=3430&ps_redirect_test=1&bsec=a70mx8&supplier_id=23", "survey_localization": "en_US", "qualifications": [ { "condition_codes": [ "111", "112" ], "qualification_code": 211 }, { "condition_codes": [ "111", "112", "114" ], "qualification_code": 214 }, { "condition_codes": [ "111", "114", "115" ], "qualification_code": 217 } ], "quotas": [ { "buyer_quota_id": "b11111", "ps_quota_id": "9f02704c-9d44-4f5c-8953-bc4f665a8567", "required_count": 100, "criteria": [ { "qualification_code": 217, "condition_codes": [ "114" ] }, { "qualification_code": 214, "condition_codes": [ "111" ] }, { "qualification_code": 211, "condition_codes": [ "111" ] } ] }, { "buyer_quota_id": "b11112", "ps_quota_id": "6f91a2f3-068c-4591-b659-d812438be3bc", "required_count": 100, "criteria": [ { "qualification_code": 217, "condition_codes": [ "114" ] }, { "qualification_code": 214, "condition_codes": [ "111" ] }, { "qualification_code": 211, "condition_codes": [ "112" ] } ] }, { "buyer_quota_id": "b11113", "ps_quota_id": "d5ab87bf-5160-4082-875c-ddf39bf83625", "required_count": 250, "criteria": [ { "qualification_code": 217, "condition_codes": [ "111" ] }, { "qualification_code": 214, "condition_codes": [ "111" ] }, { "qualification_code": 211, "condition_codes": [ "111" ] } ] }, { "buyer_quota_id": "b11114", "ps_quota_id": "bacec9fd-ae06-4a29-b188-cd2461a66001", "required_count": 250, "criteria": [ { "qualification_code": 217, "condition_codes": [ "111" ] }, { "qualification_code": 214, "condition_codes": [ "111" ] }, { "qualification_code": 211, "condition_codes": [ "112" ] } ] }, { "buyer_quota_id": "b11115", "ps_quota_id": "45425ac2-480d-4a22-ac38-e97d6d213a11", "required_count": 200, "criteria": [ { "qualification_code": 217, "condition_codes": [ "114" ] }, { "qualification_code": 214, "condition_codes": [ "112" ] } ] }, { "buyer_quota_id": "b11116", "ps_quota_id": "01174620-8fa0-4729-9bdb-c17798da3104", "required_count": 100, "criteria": [ { "qualification_code": 214, "condition_codes": [ "114" ] } ] } ] }

Notes