Add income quotas to the survey created in example Survey with Age, Income, Gender Qualifications and Quotas. Note that in the income quotas, the ranges do not overlap. The second income quota starts at 70,001.
Request
...
PUT $apihost/$basepath/5000/
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
some code { "survey_title": "Sample Survey for Age Income Gender", "survey_category_code": 112, "survey_localization": "en_US", "completes_required": 1000, "ps_incidence": 0.6, "length_of_interview": 60, "live_url": "http://www.mybuyer.com/surveys_134", "test_url": "http://www.mybuyer.com/surveys_134t", "field_time": 10, "qualifications": [ { "qualification_code": 211, "conditions": [ "111", "112" ] }, { "qualification_code": 212, "range_sets": [ { "from": 21, "from_units": 111, "to": 29, "to_units": 111 }, { "from": 40, "from_units": 111,//111 is years, 112 is months "to": 59, "to_units": 111 } ] }, { "qualification_code": 213, "range_sets": [ { "from": 50000, "from_units": 113,// 113 is USD "to": 100000, "to_units": 113 } ] } ], "quotas": [ { "buyer_quota_id": "qb12", "required_count": 400, "criteria": [{"qualification_code": 211,"conditions": ["111"]}] }, { "buyer_quota_id": "qb13", "required_count": 600, "criteria": [{"qualification_code": 211,"conditions": ["112"]}] }, { "buyer_quota_id": "qb14", "required_count": 200, "criteria": [{"qualification_code": 212,"range_sets": [{"from": 21,"from_units": 111,"to": 25,"to_units": 111}]}] }, { "buyer_quota_id": "qb15", "required_count": 300, "criteria": [{"qualification_code": 212,"range_sets": [{"from": 26,"from_units": 111,"to": 29,"to_units": 111}]}] }, { "buyer_quota_id": "qb16", "required_count": 500, "criteria": [{"qualification_code": 212,"range_sets": [{"from": 40,"from_units": 111,"to": 59,"to_units": 111}]}] }, { "buyer_quota_id": "qb17", "required_count": 600, "criteria": [{"qualification_code": 213,"range_sets": [{"from": 50000,"from_units": 113,"to": 70000,"to_units": 113}]}] }, { "buyer_quota_id": "qb18", "required_count": 400, "criteria": [{"qualification_code": 213,"range_sets": [{"from": 70001,"from_units": 113,"to": 100000,"to_units": 113}]}] } ] } |
Response
...
Response Code
201200
Response Body
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
some code { "ps_api_response_code": 1000, "ps_api_response_message": "Purespectrum Custom API Response Message" } |