locations Endpoint
The locations
endpoint enables the publisher to obtain all the user location information, along with the name of the State and the state code.
Design Recommendation
The locations
endpoint must be called from the publisher backend, and not from the customer application. Exposing this endpoint through the application will result in security concerns related to the API key.
GET
https://iql.zendrive.com/iql/<version>/locations
Headers
Name
Type
Description
Authorization*
String
APIKEY <apikey>
{
// Response
}
Sample Request URL
https://iql.zendrive.com/iql/v1/locations
Sample Request and Response
curl --location --request GET 'https://iql.zendrive.com/iql/v1/locations' \
--header 'Authorization: APIKEY <API Key value>' \
--header 'Content-Type: application/json'
Response:
{}
Response Schema
{
"countries": [
{
"country_code": "USA",
"states": [
{
"state_name": "District of Columbia",
"state_code": "DC"
},
{
"state_name": "Kansas",
"state_code": "KS"
},
{
"state_name": "Indiana",
"state_code": "IN"
},
{
"state_name": "Missouri",
"state_code": "MO"
},
{
"state_name": "Wyoming",
"state_code": "WY"
},
{
"state_name": "Georgia",
"state_code": "GA"
},
{
"state_name": "Massachusetts",
"state_code": "MA"
},
{
"state_name": "Ohio",
"state_code": "OH"
},
{
"state_name": "New Hampshire",
"state_code": "NH"
},
{
"state_name": "New Mexico",
"state_code": "NM"
},
{
"state_name": "Wisconsin",
"state_code": "WI"
},
{
"state_name": "Texas",
"state_code": "TX"
},
{
"state_name": "Virginia",
"state_code": "VA"
},
{
"state_name": "Washington",
"state_code": "WA"
},
{
"state_name": "Louisiana",
"state_code": "LA"
},
{
"state_name": "Colorado",
"state_code": "CO"
},
{
"state_name": "New Jersey",
"state_code": "NJ"
},
{
"state_name": "Pennsylvania",
"state_code": "PA"
},
{
"state_name": "Hawaii",
"state_code": "HI"
},
{
"state_name": "Oregon",
"state_code": "OR"
},
{
"state_name": "Tennessee",
"state_code": "TN"
},
{
"state_name": "South Carolina",
"state_code": "SC"
},
{
"state_name": "Iowa",
"state_code": "IA"
},
{
"state_name": "Oklahoma",
"state_code": "OK"
},
{
"state_name": "Michigan",
"state_code": "MI"
},
{
"state_name": "Connecticut",
"state_code": "CT"
},
{
"state_name": "Illinois",
"state_code": "IL"
},
{
"state_name": "Maryland",
"state_code": "MD"
},
{
"state_name": "Nebraska",
"state_code": "NE"
},
{
"state_name": "Maine",
"state_code": "ME"
},
{
"state_name": "Vermont",
"state_code": "VT"
},
{
"state_name": "Arkansas",
"state_code": "AR"
},
{
"state_name": "Idaho",
"state_code": "ID"
},
{
"state_name": "North Dakota",
"state_code": "ND"
},
{
"state_name": "Alabama",
"state_code": "AL"
},
{
"state_name": "Arizona",
"state_code": "AZ"
},
{
"state_name": "Delaware",
"state_code": "DE"
},
{
"state_name": "Kentucky",
"state_code": "KY"
},
{
"state_name": "Rhode Island",
"state_code": "RI"
},
{
"state_name": "Florida",
"state_code": "FL"
},
{
"state_name": "Alaska",
"state_code": "AK"
},
{
"state_name": "Nevada",
"state_code": "NV"
},
{
"state_name": "Mississippi",
"state_code": "MS"
},
{
"state_name": "West Virginia",
"state_code": "WV"
},
{
"state_name": "South Dakota",
"state_code": "SD"
},
{
"state_name": "Utah",
"state_code": "UT"
},
{
"state_name": "Montana",
"state_code": "MT"
},
{
"state_name": "Minnesota",
"state_code": "MN"
}
]
}
]
}