Children Quota Examples

Deprecated

We have deprecated the legacy version of Child Age and Gender that required sending three separate qualifications in favor of a single qualification model more consistent with industry norms.

Legacy: 218, 220, 230

New: 232 Described Here


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: 

Result 


Response Code

201

Response Body

{
  "ps_survey_id": 7000,
  "test_ps_survey_entry_link": "http://www.spectrumsurveys.com/7000t",
  "ps_survey_status": 11,  "survey_title": "Automobile Preferences",
  "survey_category_code": 231,
  "survey_localization": "en_US",
  "completes_required": 1000,
  "expected_ir": 60,
  "expected_loi": 60,
  "live_url": "http://www.mybuyer.com/surveys_134",
  "test_url": "http://www.mybuyer.com/surveys_134t",
  "field_time": 10,
  "qualifications": [
    {
      "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"]}, //married
		{"qualification_code": 214,"condition_codes": ["111"]}, //white
		{"qualification_code": 211,"condition_codes": ["111"]}  //male
		]
    },
    {
      "buyer_quota_id": "b11112",
      "required_count": 100,
      "criteria": [
		{"qualification_code": 217,"condition_codes": ["114"]}, //married
		{"qualification_code": 214,"condition_codes": ["111"]}, //white
		{"qualification_code": 211,"condition_codes": ["112"]}  //female
		]
    },
    {
      "buyer_quota_id": "b11113",
      "required_count": 250,
      "criteria": [
		{"qualification_code": 217,"condition_codes": ["111", "115"]}, //Single or Divorced
		{"qualification_code": 214,"condition_codes": ["111"]}, //white
		{"qualification_code": 211,"condition_codes": ["111"]}  //male
		]
    },
    {
      "buyer_quota_id": "b11114",
      "required_count": 250,
      "criteria": [
		{"qualification_code": 217,"condition_codes": ["111", "115"]}, //Single or Divorced
		{"qualification_code": 214,"condition_codes": ["111"]}, //white
		{"qualification_code": 211,"condition_codes": ["112"]}  //female
		]
    },
    {
      "buyer_quota_id": "b11115",
      "required_count": 200,
      "criteria": [
		{"qualification_code": 217,"condition_codes": ["114"]}, //Married
		{"qualification_code": 214,"condition_codes": ["112"]}, //Hispanic
		]
    },
    {
      "buyer_quota_id": "b11116",
      "required_count": 100,
      "criteria": [
		{"qualification_code": 214,"condition_codes": ["114"]}, //Asian
		]
    }
  ]
}

Notes


  {
  "qualification_code": 232,
  "condition_codes": [
    "133", // "boy age 1",
    "134", // "girl age 1",
    "135", // "boy age 2",
    "136", // "girl age 2",
    "137", // "boy age 3",
    "138", // "girl age 3",
    "139", // "boy age 4",
    "140", // "girl age 4",
    "141", // "boy age 5",
    "142", // "girl age 5",
    "143", // "boy age 6",
    "144", // "girl age 6",
    "145", // "boy age 7",
    "146", // "girl age 7",
    "147", // "boy age 8",
    "148", // "girl age 8",
    "149", // "boy age 9",
    "150", // "girl age 9",
    "151", // "boy age 10",
    "152", // "girl age 10",
    "153", // "boy age 11",
    "154", // "girl age 11",
    "155", // "boy age 12",
    "156", // "girl age 12",
    "157", // "boy teen 13",
    "158", // "girl teen 13",
    "159", // "boy teen 14",
    "160", // "girl teen 14",
    "161", // "boy teen 15",
    "162", // "girl teen 15",
    "163", // "boy teen 16",
    "164", // "girl teen 16",
    "165", // "boy teen 17",
    "166"  // "girl teen 17"
  ]
}



// This example will itemize multiple scenarios as listed below: 
// 1.  … 400 completes with kids and 600 without kids
// 2.  … 1000 completes with kids
// 3. 1000 with kids age range 4-12
// 4. 1000 completes with kids; Only Boys
// 5. 1000 completes with kids; 400 with boys, 600 with girls
// 6. 1000 completes with kids; 200 boys, age-range 0-3; 300 boys age-range 4-9; 500 girls
// 7. 400 with kids, 600 without kids; of the 400 with kids, 300 boys age 4-6 100 boys age 7-9

// Scenario-1: 400 completes with kids and 600 without kids
{
  "survey_title": "Automobile Preferences",
  "survey_category_code": 231,
  "survey_localization": "en_US",
  "completes_required": 1000,
  "expected_ir": 60,
  "expected_loi": 60,
  "live_url": "http://www.mybuyer.com/surveys_134",
  "test_url": "http://www.mybuyer.com/surveys_134t",
  "field_time": 10,
  "qualifications": [
    {
      "qualification_code": 232,
      "condition_codes": [
        "111", "112", "113", "114", "115", "116", "117", "118", "119", "120",
        "121", "122", "123", "124", "125", "126", "127", "128", "129", "130",
        "131", "132", "133", "134", "135", "136", "137", "138", "139", "140",
        "141", "142", "143", "144", "145", "146", "147", "148", "149", "150",
        "151", "152", "153", "154", "155", "156", "157", "158", "159", "160",
        "161", "162", "163", "164", "165", "166", "167"
      ]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "b11111",
      "required_count": 400,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": [
            "111", "112", "113", "114", "115", "116", "117", "118", "119", "120",
        	"121", "122", "123", "124", "125", "126", "127", "128", "129", "130",
        	"131", "132", "133", "134", "135", "136", "137", "138", "139", "140", 
			"141", "142", "143", "144", "145", "146", "147", "148", "149", "150",
			"151", "152", "153", "154", "155", "156", "157", "158", "159", "160",
			"161", "162", "163", "164", "165", "166"
          ]
        }
      ]
    },
    {
      "buyer_quota_id": "b11112",
      "required_count": 600,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["167"]
        }
      ]
    }
  ]
}

// Scenario-2: 1000 completes with kids
{
  // ...
  "qualifications": [
    {
      "qualification_code": 232,
      "condition_codes": [
        "111", "112", "113", "114", "115", "116", "117", "118", "119", "120",
        "121", "122", "123", "124", "125", "126", "127", "128", "129", "130",
        "131", "132", "133", "134", "135", "136", "137", "138", "139", "140",
        "141", "142", "143", "144", "145", "146", "147", "148", "149", "150",
        "151", "152", "153", "154", "155", "156", "157", "158", "159", "160",
        "161", "162", "163", "164", "165", "166"
      ]
    }
  ]
  // No need to set quotas because all completes will be for respondents with kids
}

// Scenario-3: 1000 with kids age range 4-12
{
  "qualifications": [
    {
      "qualification_code": 232,
      "condition_codes": ["139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156"]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "b11111",
      "required_count": 400,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156"]
        }
      ]
    }
  ]
}

// Scenario-4: 1000 completes with only Boys
{
  "qualifications": [
    {
      "qualification_code": 232,
      "condition_codes": ["133", "135", "137", "139", "141", "143", "145", "147", "149", "151", "153", "155", "157", "159", "161", "163", "165"]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "b11111",
      "required_count": 400,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["133", "135", "137", "139", "141", "143", "145", "147", "149", "151", "153", "155", "157", "159", "161", "163", "165"]
        }
      ]
    }
  ]
}

// Scenario-5: 1000 completes with Kids, 400 boys 600 girls
{
  "qualifications": [
    {
      "qualification_code": 232,
      "condition_codes": ["133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166"]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "b11111",
      "required_count": 400,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["133", "135", "137", "139", "141", "143", "145", "147", "149", "151", "153", "155", "157", "159", "161", "163", "165"] //Boys from 0 to 17
        }
      ]
    },
    {
      "buyer_quota_id": "b11112",
      "required_count": 600,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["134", "136", "138", "140", "142", "144", "146", "148", "150", "152", "154", "156", "158", "160", "162", "164", "166"] //Girl from 0 to 17
        }
      ]
    }
  ]
}

// Scenario-6: 1000 completes with kids; 200 boys, age-range 0-3; 300 boys age-range 4-9; 500 girls
{
  "qualifications": [
    {
      "qualification_code": 232,
      "condition_codes": ["133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166"]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "b11111",
      "required_count": 200,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166"],
        }
      ]
    },
    {
      "buyer_quota_id": "b11112",
      "required_count": 300,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["133", "135", "137"]
        }
      ]
    },
    {
      "buyer_quota_id": "b11113",
      "required_count": 500,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["140", "142", "144", "146", "148", "150"]
        }
      ]
    }
  ]
}

// Scenario-7: 400 with kids, 600 without kids; of the 400 with kids, 300 boys age 4-6 100 boys age 7-9
{
  "qualifications": [
    {
      "qualification_code": 232,
      "condition_codes": ["133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166"]
    }
  ],
  "quotas": [
    {
      "buyer_quota_id": "b11111",
      "required_count": 400,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166"]
        }
      ]
    },
    {
      "buyer_quota_id": "b11112",
      "required_count": 600,
      "criteria": [
        {"qualification_code": 232, "condition_codes": ["167"]} //Don't have children
      ]
    },
    {
      "buyer_quota_id": "b11113",
      "required_count": 300,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["139", "141", "143"] //4 to 6
        }
      ]
    },
    {
      "buyer_quota_id": "b11114",
      "required_count": 100,
      "criteria": [
        {
          "qualification_code": 232,
          "condition_codes": ["145", "147", "149"] //7 to 9
        }
      ]
    }
  ]
}