Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 25 Next »

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.

This is an example of how targeting for parents, or parents of specific age/gender of children will appear.  Any one of the parent's children may qualify the respondent to take this survey.


Targeting for age and gender of child { "qualification_code" : 220 & 230 } will only appear in the criteria for the quota. It will not appear in the qualifications array. This is because that the survey may target for the people who have children as well as for people who don't have children in the same survey.


If a survey is targeting for parents of a specific age and gender of a child , then a qualifications array will always contain qualification_code : 218 and condition_code:112. The Age and gender of the child will appear as a nested quota for qualification_code : 218, 220 and 230.


Please see examples below


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_codesarray of stringsContains the applicable answer choices for either 218 (has/doesn't have children) or 220 (gender of the child)
range_setsarray 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

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

Example 1: quota is looking for parents of 1 year old boy.

"quotas": [
{
          "quota_id": "c0013c3d-42e6-4a5f-9097-96c7eea4f155",
          "quantities":
                 {
                       "currently_open": 100,
                       "remaining": 100,
                       "achieved": 0
                  },
           "criteria": [
                  {
                        "qualification_code": 218,
                        "condition_codes": [
                              "112"
                          ]
                  },
                  {
                        "qualification_code": 220,
                        "condition_codes": [
                              "111"
                         ]
                  },
                  {
                        "qualification_code": 230,
                        "range_sets": [
                                 {
                                       "units": 311,
                                       "to": 1,
                                       "from": 1
                                 }
                         ]
                  }
                 ],
               "crtd_on": 1505724120171,
               "mod_on": 1505724120171
}
]

Example 2: quota is looking for people who are *not* parents

"quotas": [
{
          "quota_id": "c0013c3d-42e6-4a5f-9097-96c7eea4f155",
          "quantities":
                 {
                       "currently_open": 100,
                       "remaining": 100,
                       "achieved": 0
                  },
           "criteria": [
                  {
                        "qualification_code": 218,
                        "condition_codes": [
                              "111"
                          ]
                  }
                 ],
               "crtd_on": 1505724120171,
               "mod_on": 1505724120171
}
]

Example 2: quota is looking for people who are parents of boy or girl 3 months - 18 months

"quotas": [
{
          "quota_id": "c0013c3d-42e6-4a5f-9097-96c7eea4f155",
          "quantities":
                 {
                       "currently_open": 100,
                       "remaining": 100,
                       "achieved": 0
                  },
           "criteria": [
                  {
                        "qualification_code": 218,
                        "condition_codes": [
                              "112"
                          ]
                  },
                  {
                        "qualification_code": 220,
                        "condition_codes": [
                              "111",
							  "112"
                         ]
                  },
                  {
                        "qualification_code": 230,
                        "range_sets": [
                                 {
                                       "units": 312,
                                       "to": 18,
                                       "from": 3
                                 }
                         ]
                  }
                 ],
               "crtd_on": 1505724120171,
               "mod_on": 1505724120171
}
]

Example 3: quota is looking for people who are parents of a boy with age between 3 months - 18 months

"quotas": [
{
          "quota_id": "c0013c3d-42e6-4a5f-9097-96c7eea4f155",
          "quantities":
                 {
                       "currently_open": 100,
                       "remaining": 100,
                       "achieved": 0
                  },
           "criteria": [
                  {
                        "qualification_code": 218,
                        "condition_codes": [
                              "112"
                          ]
                  },
                  {
                        "qualification_code": 220,
                        "condition_codes": [
                              "111"
                         ]
                  },
                  {
                        "qualification_code": 230,
                        "range_sets": [
                                 {
                                       "units": 312,
                                       "to": 18,
                                       "from": 3
                                 }
                         ]
                  }
                 ],
               "crtd_on": 1505724120171,
               "mod_on": 1505724120171
}
]

Example 4: quota is looking for people who are parents of a boy with age between 1 year - 18 years

"quotas": [
{
          "quota_id": "c0013c3d-42e6-4a5f-9097-96c7eea4f155",
          "quantities":
                 {
                       "currently_open": 100,
                       "remaining": 100,
                       "achieved": 0
                  },
           "criteria": [
                  {
                        "qualification_code": 218,
                        "condition_codes": [
                              "112"
                          ]
                  },
                  {
                        "qualification_code": 220,
                        "condition_codes": [
                              "111"
                         ]
                  },
                  {
                        "qualification_code": 230,
                        "range_sets": [
                                 {
                                       "units": 311,
                                       "to": 18,
                                       "from": 1
                                 }
                         ]
                  }
                 ],
               "crtd_on": 1505724120171,
               "mod_on": 1505724120171
}
]
  • No labels