queryType: getZonesData*

The getZonesData queryType is passed through the API to get information about all provided zones.

Parameters

ParameterDescriptionTypeDefined Value SetValue Req’d
queryTypeMust equal getZonesData.STRINGgetZonesDataY
asOfDateThe date for which OSM base map version to use. This parameter is required if you have included “Segment” or “RelatedRoad” zone inputs. This date should be reflective of the first day of the last month in the date range for which you plan to use any zones returned by this API. The value should be provided in YYYY-MM-DD string format. The default value is the latest basemap.STRING-N
zones

An array of objects representing the zones for which you want information. Each object contains:

  • ZoneId – A custom zone ID, a segment ID, or a standard zone ID such as county ID, city ID, etc.

  • ISO_3166_2 – The ISO 3166:2 code of the standard zone. Does not apply to custom zones, segments or related roads and can be set to null.

  • ZoneType – the type of the zone.

ARRAYZoneType - “Custom”, “Segment”, ”RelatedRoad”, “State”, “County”, “City”, “TAZ”, “ZIP”, “CTR”, or “FSA”Y

Responses

CodeTypeDescription
200JSONThe requested data.
401JSONOccurs for various unauthorized tasks e.g. if you didn’t provide credentials in your parameters.
500JSONOccurs if an internal server error occurs. Contact altitudesupport@geotab.com if this occurs.

Response Schema

AttributeDescriptionData TypeDefined Value Set
AsOfDateThe date when the map snapshot was created for OSM.DATE-
Counties

An array of objects for counties the zone intersects. Each object contains:

  • CountyId – The county Id. A County ID is a unique identifier for a county; typically, the FIPS code or Canadian census subdivision CSDUID from StatCan.

  • ISO_3166_2 (string) – The ISO 3166:2 code of the county.

ARRAY-
CountryThe name of the country.STRING-
GeographyA GeoJSON string representing the geography of the zone.STRING-
ISO_3166_2The ISO 3166:2 code for the state or province.STRING-
ISO_A3ISO-A3 code for the country.STRING-
MaxLatitudeMaximum latitude of the zone.FLOAT64-
MaxLongitudeMaximum longitude of the zone.FLOAT64-
MinLatitudeMinimum latitude of the zone.FLOAT64-
MinLongitudeMinimum longitude of the zone.FLOAT64-
StateThe name of the state or province.STRING-
StateIdId of the state or province.STRING-
ZoneDescription

Description of the passed in zone when available. The value is set based on the ZoneType :

  • “State” - state name,

  • “County” - county name,

  • “City” - city name,

  • “CTR” - census tract description,

  • “Custom” - custom zone name,

  • “Segment” - road name, if available

STRING-
ZoneDetailsA JSON string of various metadata about the zone.STRING-
ZoneIdIdentifies the zone Id of the passed in zone.STRING-
ZoneSubType

The subtype value of the passed in zone, where available. The ZoneSubType value is sourced based on the ZoneType :

  • “Custom” - comma delimited string of custom zone type ids,

  • segment: road type.

  • “RelatedRoad” - related road type.

STRING-
ZoneTypeThe zone type of the passed in zone.STRING“State”, ”County”, ”City”, ”CTR”, ”ZIP”, “TAZ”, “FSA”, “Custom”, “Segment”, “RelatedRoad”

Sample parameters

{
 "queryType": "getZonesData",
 "zones": [{
    "ZoneId": "32003",
    "ISO_3166_2": "US-NV",
    "ZoneType": "County"
 }]
}