queryType: getStandardZonesByHierarchy*
The getStandardZonesByHierarchy queryType is passed to the API to get a list of zones of the requested type, that are within the context of the input zone(s) based on geography-based hierarchies for the country. Any standard zone type is accepted except “Custom” or “Segment”.
See Special Case APIs for more information.
Parameters
| Parameter | Description | Type | Defined Value Set | Value Required |
|---|---|---|---|---|
| queryType | Must equal getStandardZonesByHierarchy. | STRING | getStandardZonesByHierarchy | Y |
| requestZoneType | The type of zones you want returned. | STRING | Any standard zone type except “Custom” or “Segment” | Y |
| zones |
An array of objects representing the zones for which you want information. Each object contains
| ARRAY | ZoneType — any standard zone type except “Custom” or “Segment”. Refer to Zones in the Data Dictionary for details on how to structure the zone inputs for each zone type. | Y |
Responses
| Code | Type | Description |
|---|---|---|
| 200 | JSON | The requested data. |
| 401 | JSON | Occurs for various unauthorized tasks, such as not providing credentials in your parameters. |
| 500 | JSON | Occurs if an internal server error occurs. Contact Altitude Support if this occurs. |
Response Schema
| Attribute | Description | Data Type | Defined Value Set |
|---|---|---|---|
| Geography | A GeoJSON string representing the geography of the zone. | STRING | - |
| ISO_3166_2 | The ISO 3166:2 code for the state or province. | STRING | - |
| MaxLatitude | Maximum latitude of the zone. | FLOAT | - |
| MaxLongitude | Maximum longitude of the zone. | FLOAT | - |
| MinLatitude | Minimum latitude of the zone. | FLOAT | - |
| MinLongitude | Minimum longitude of the zone. | FLOAT | - |
| ZoneId | The zone ID for which data is being returned. | STRING | - |
| ZoneDescription |
Description of the zone when available. The value is based on the type of zone:
| STRING | - |
| ZoneType | The zone type of the zone. | STRING | Any standard zone type except “Custom” or “Segment” |
Sample parameters
{
"zones": [{
"ZoneId": "32003",
"ISO_3166_2": "US-NV",
"ZoneType": "county"
}],
"queryType": "getStandardZonesByHierarchy",
"requestZoneType": "City"
}