Survey with US States quotas

Create a survey with qualifications and quotas by State

bapit-5

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) 


Please see here for state codes mapping: Location codes: US States to codes mapping.

This example uses CA, NY, and NJ. Their codes are 06, 36, and 34 respectively. 

Parameters: 

Body: 

{
  "survey_title": "US States Quotas - bapit-5",
  "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": 225,
      "condition_codes": ["06", "36", "34"]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "qb12",
      "required_count": 400,
      "criteria": [{"qualification_code": 225,"condition_codes": ["06"]}]
    },
    {
      "buyer_quota_id": "qb13",
      "required_count": 400,
      "criteria": [{"qualification_code": 225,"condition_codes": ["36"]}]
    },
    {
      "buyer_quota_id": "qb14",
      "required_count": 200,
      "criteria": [{"qualification_code": 225,"condition_codes": ["34"]}]
    }
  ]
}

Result 


Response Code

201

Response Body

{
  "survey_title": "US States Quotas - bapit-5",
  "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": 3432,
  "mod_on": 1490013355547,
  "crtd_on": 1490011568138,
  "test_ps_survey_entry_link": "http://dev.spectrumsurveys.com:3500/startsurvey?survey_id=3432&ps_redirect_test=1&bsec=a70mx8&supplier_id=23",
  "survey_localization": "en_US",
  "qualifications": [
    {
      "condition_codes": [
        "36",
        "34",
        "6"
      ],
      "qualification_code": 225
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "qb12",
      "ps_quota_id": "77f5d68a-9099-4add-94ae-acf08020b426",
      "required_count": 400,
      "criteria": [
        {
          "qualification_code": 225,
          "condition_codes": [
            "6"
          ]
        }
      ]
    },
    {
      "buyer_quota_id": "qb13",
      "ps_quota_id": "57dcacae-7fd9-42a5-868b-a6b9fa40ce6e",
      "required_count": 400,
      "criteria": [
        {
          "qualification_code": 225,
          "condition_codes": [
            "36"
          ]
        }
      ]
    },
    {
      "buyer_quota_id": "qb14",
      "ps_quota_id": "ed35857b-b40d-4c5e-990b-ff413674c480",
      "required_count": 200,
      "criteria": [
        {
          "qualification_code": 225,
          "condition_codes": [
            "34"
          ]
        }
      ]
    }
  ]
}

Notes



  • Supporting notes