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

Version 1 Next »

The Regional Targeting API allows partners to pass in a zipcode/postcode in any locale and returns all geolocation qualifications mapped to that zipcode/postcode. This allows for suppliers to account for all potential qualifications related to geolocation for their users to then best match them to surveys which target these qualifications. 

GET: https://api.spectrumsurveys.com/suppliers/v2/zipcodes/38401402?localization=pt_BR

When updating this information for members, please limit the API calls to 50 per minute

HEADER

Parameter

Type

Required

Description

access-token

String

Yes

Token used to identify the authenticity of the user

QUERY STRING REQUEST PARAMETERS

Parameter

Type

Required

Description

zipcode

integer

Yes

This field provides the zipcode/postcode to be targeted

localization

string

Yes

This field provides the country code

The API is case sensitive, for example if country (“US”) isn't capitalized or language (“en”) doesn’t match these cases, the request will return an error.


Sample Response

Success:
 {
     "zipcode": "29692",
     "qualifications": [
         {
             "question_id": 223,
             "question_name": "Region",
             "answer_id": "3",
             "answer_name": "South"
         },
         {
             "question_id": 224,
             "question_name": "Division",
             "answer_id": "5",
             "answer_name": "South Atlantic"
         },
         {
             "question_id": 225,
             "question_name": "State",
             "answer_id": "45",
             "answer_name": "South Carolina"
         },
         {
             "question_id": 231,
             "question_name": "Dma",
             "answer_id": "567",
             "answer_name": "GREENVLL-SPART-ASHEVLL-AND"
         },
         {
             "question_id": 227,
             "question_name": "Csa",
             "answer_id": "24940",
             "answer_name": "Greenwood, SC"
         },
         {
             "question_id": 228,
             "question_name": "County",
             "answer_id": "45047",
             "answer_name": "Greenwood"
         }
     ]
 }

ERROR MESSAGES

{

    "statusCode": 400,

    "msg": "Country/Language combination is not supported"

}

{

    "statusCode": 400,

    "msg": "Zipcode is not supported"

}

{
"statusCode": 400,
"msg": "Zipcode formatting is incorrect, please refer to our validation rules- /^([0-9]{3,5})$/i"
}

These will be adjusted with an additional release going to production 6/4

  • No labels