queryType: getCustomZones

The getCustomZones queryType is passed to the API to get the list of zones that you have already created via the queryType: createCustomZone.

Parameters

ParameterDescriptionTypeDefined Value SetValue Req'd
queryTypeMust equal getCustomZones. STRINGgetCustomZonesY
customZoneIdsOptional array of zone IDs if you want to pull a specific set of zones. Pass an empty array if you want all zones. ARRAY-N
customZoneTypesOptional array of custom zone type IDs if you want to pull custom zones belonging to a specific subset of custom zone types. Pass an empty array if you want all custom zone types. ARRAY-N
zoneStatusesOptional array of zone status IDs, where 0 = deleted and 1 = active. If you want all active zones only, for example, pass [1]. Pass an empty array if you want all zone statuses. ARRAY[0.1]N

Responses

CodeTypeDescription
200JSONThe requested data.
401JSONOccurs for various unauthorized tasks, such as not providing credentials in your parameters.
500JSONOccurs if an internal server error occurs. Contact altitudesupport@geotab.com if this occurs.

Response Schema

AttributeDescriptionData TypeDefined Value Set
CommentsThe comments related to the zone. STRING-
Counties

Array of objects representing counties associated with the custom zone. Each object contains:

  • ISO_3166_2 (string) - unique ISO 3166:2 identifier representing the state/provincial code of a purchased region.

  • CountyId (string) - a unique identifier for a county; typically, the FIPS code or Canadian census subdivision CSDUID from StatCan.

ARRAY-
CreatedByThe user ID of the person who originally created the zone. STRING-
CreatedTimestampThe date and time the zone was created wrapped inside an object with a value attribute. OBJECT-
CustomerZoneIdThe customer zone ID that was assigned on creation. STRING-
CustomZoneTypes

An array of objects where each entry represents a zone type associated with this zone. Each zone type contains:

  • CustomZoneTypeId (string) - unique identifier for the custom zone type.

  • CustomZoneTypeName (string) - name of the custom zone type.

  • CustomZoneTypeStatus (string) - represents the custom zone's status, either "Active" or "Deleted"

ARRAY-
DatabaseThe database in which the zone type was created. STRING-
GeographyA GeoJSON string representing the boundary of the zone. STRING-
ISO_3166_2The ISO 3166:2 of the state that covers the majority of the zone. STRING-
ModifiedByThe user ID of the person who last modified the zone type. STRING-
ModifiedByTimestampThe date and time the zone type was last modified wrapped inside an object with a value attribute. OBJECT-
ZoneIdThe unique ID of the zone. STRING-
ZoneDescriptionThe name of the zone. STRING-
ZoneStatusThe status of the custom zone. 0 for “Deleted” and 1 for “Active”STRING

0 for “Deleted” and 1 for “Active”

“Active” for a zoneStatusId of 0 or

Sample parameters

{
"zoneStatuses":[1],
"queryType":"getCustomZones"
}