New Child Age & Gender
Info |
---|
We have recently updated our Child Age & Gender Qualification to a more standard single Qualification design. Qualification ID 232 will be used in place of the previous model combining 218, 220 and 230. |
View file | ||
---|---|---|
|
Sample API Request
Code Block |
---|
GET /suppliers/v2/surveys/:survey_id
Host: api.spectrumsurveys.com
access-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Sample API Response
This is a snippet from there response of GET /suppliers/v2/surveys/:survey_id
Code Block |
---|
Example 1: quota is looking for parents of 1 year old boy.
- {
"quota_id": "39fd202e-717a-4683-b7a7-3b0a225275e4",
"quantities": {
"currently_open": 50,
"remaining": 50,
"achieved": 0
},
"criteria": [{
"qualification_code": 232, //Child Age Gender qualification
"condition_codes": ["133"] //Boy Age 1
}]
}
Example 2: quota is looking for people who are *not* parents
- {
"quota_id": "39fd202e-717a-4683-b7a7-3b0a212124124",
"quantities": {
"currently_open": 50,
"remaining": 50,
"achieved": 0
},
"criteria": [{
"qualification_code": 232, //Child Age Gender qualification
"condition_codes": ["167"] //I have no children living in my household and I am not pregnant/expecting a child within the next 9 months
}]
}
Example 3: quota is looking for people who are parents of boy or girl 3 months - 11 months
- {
"quota_id": "2f87bf95-6bf8-4d14-88ab-38bbb408c872",
"quantities": {
"currently_open": 50,
"remaining": 50,
"achieved": 0
},
"criteria": [{
"qualification_code": 232, //Child Age Gender qualification
"condition_codes": [
"115", //Boy 3 months old"
"116", //Girl 3 months old
"117", //Boy 4 months old
"118", //Girl 4 months old
"119", //Boy 5 months old
"120", //Girl 5 months old
"121", //Boy 6 months old
"122", //Girl 6 months old
"123", //Boy 7 months old
"124", //Girl 7 months old
"125", //Boy 8 months old
"126", //Girl 8 months old
"127", //Boy 9 months old
"128", //Girl 9 months old
"129", //Boy 10 months old
"130", //Girl 10 months old
"131", //Boy 11 months old
"132", //Girl 11 months old
]
}]
}
Example 4: quota is looking for people who are parents of a boy with age between 3 months - 11 months
- {
"quota_id": "2f87bf95-6bf8-4d14-88ab-38bbb408c872",
"quantities": {
"currently_open": 50,
"remaining": 50,
"achieved": 0
},
"criteria": [{
"qualification_code": 232, //Child Age Gender qualification
"condition_codes": [
"115", //Boy 3 months old"
"117", //Boy 4 months old
"119", //Boy 5 months old
"121", //Boy 6 months old
"123", //Boy 7 months old
"125", //Boy 8 months old
"127", //Boy 9 months old
"129", //Boy 10 months old
"131", //Boy 11 months old
]
}]
}
Example 5: quota is looking for people who are parents of a boy with age between 1 year - 17 years
- {
"quota_id": "2f87bf95-6bf8-4d14-88ab-38bbb408c872",
"quantities": {
"currently_open": 50,
"remaining": 50,
"achieved": 0
},
"criteria": [{
"qualification_code": 232, //Child Age Gender qualification
"condition_codes": [
"133", //Boy Age 1
"135", //Boy Age 2
"137", //Boy Age 3
"139", //Boy Age 4
"141", //Boy Age 5
"143", //Boy Age 6
"145", //Boy Age 7
"147", //Boy Age 8
"149", //Boy Age 9
"151", //Boy Age 10
"153", //Boy Age 11
"155", //Boy Age 12
"157", //Boy Teen 13
"159", //Boy Teen 14
"161", //Boy Teen 15
"163", //Boy Teen 16
"165", //Boy Teen 17
]
}]
} |
Legacy Child Age & Gender
Code Block |
---|
Get Surveys - GET /surveys - http://api.spectrumsurveys.com/suppliers/v2/surveys/:survey_id |
...
Call this API to view the quota for the survey. You can check out the Criteria section and look for the qualification and condition codes.
...
Warning |
---|
In case targeting is present on either age of child or gender of child, a nested quota will be present containing age of child, gender of child, and parent qualification codes. (218, 220, 230). |
HEADER Parameters
Parameter | Type | Required | Description |
---|---|---|---|
access-token | string | Yes | Token used to identify the authenticity of the user. |
Response Parameters
Parameter | Type | Description |
---|---|---|
quota_id | integer | Quota ID |
Criteria | Object | Contains Qualification codes and their corresponding condition codes |
qualification_code | integer | 218 - parent/not parent 220 - gender of child 230 - age of child |
condition_codes | array of strings | Contains the applicable answer choices for either 218 (has/doesn't have children) or 220 (gender of the child) |
range_sets | array of objects | Contains range sets for the age of the child, nested within the criteria of a quota. |
crtd_on | UTC Timestamp in milliseconds since Unix Epoch | Timestamp of when this quota id was created (milliseconds since Unix Epoch) |
mod_on | UTC Timestamp in milliseconds since Unix Epoch | Timestamp of when this quota id was last modified. This would only change if the quota is locked/unlocked, or the quantity is changed. If a quota's criteria are modified, this quota is closed and a new one is created. (milliseconds since Unix Epoch) |
Range Sets - Object Parameters
Parameter | Type | Description |
---|---|---|
from | integer | Quota ID |
to | integer | Contains Qualification codes and their corresponding condition codes |
units | integer | 311 - Years 312 - Months |
Sample API Request
Code Block |
---|
GET /suppliers/v2/surveys/:survey_id Host: api.spectrumsurveys.com access-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Sample API Response
This is a snippet from there response of GET /suppliers/v2/surveys/:survey_id
...