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.  You should deactivate any existing quotas you no longer wish to use.

bapit-15

Request

...

PUT $apihost/$basepath/surveys/5000/

...

Code Block
languagejs
linenumberstrue
collapsetrue


{
  "survey_title": "Sample Survey for Age Income Gender bapit-2",
  "survey_category_code": 231,
  "survey_localization": "en_US",
  "completes_required": 1000,
  "psexpected_incidenceir": 60,
  "lengthexpected_of_interviewloi": 60,
  "live_url": "httphttps://wwwmy.mybuyersurvey.com/surveys_134?survey_id=1234",
  "test_url": "httphttps://wwwmy.mybuyersurvey.com/surveys_134t?survey_id=1234&test=1",
  "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": 321113,// 321
is USD           "to": 100000,
          "to_units": 321113
        }
      ]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "qb12",
      "required_count": 400500,
      "criteria": [{"qualification_code": 211,"conditions": ["111"]}]
    },
    {
      "buyer_quota_id": "qb13",
      "required_count": 600500,
      "criteria": [{"qualification_code": 211,"conditions": ["112"]}]
    },
    {
      "buyer_quota_id": "qb14",
      "required_count": 200325,
      "criteria": [{"qualification_code": 212,"range_sets": [{"from": 21,"from_units": 111,"to": 25,"to_units": 111}]}]
    },
    {
      "buyer_quota_id": "qb15",
      "required_count": 300325,
      "criteria": [{"qualification_code": 212,"range_sets": [{"from": 26,"from_units": 111,"to": 29,"to_units": 111}]}]
    },
    {
      "buyer_quota_id": "qb16",
      "required_count": 500350,
      "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

200

...

Code Block
collapse
languagejs
linenumberstruetrue


{
  "ps_api_response_code": 1000,
  "ps_api_response_message": "Purespectrum Custom API Response Message"
}

...