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
| Parameter | Description | Type | Defined Value Set | Value Req'd |
|---|---|---|---|---|
| queryType | Must equal getCustomZones. | STRING | getCustomZones | Y |
| customZoneIds | Optional 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 |
| customZoneTypes | Optional 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 |
| zoneStatuses | Optional 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
| 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 altitudesupport@geotab.com if this occurs. |
Response Schema
| Attribute | Description | Data Type | Defined Value Set |
|---|---|---|---|
| Comments | The comments related to the zone. | STRING | - |
| Counties |
Array of objects representing counties associated with the custom zone. Each object contains:
| ARRAY | - |
| CreatedBy | The user ID of the person who originally created the zone. | STRING | - |
| CreatedTimestamp | The date and time the zone was created wrapped inside an object with a value attribute. | OBJECT | - |
| CustomerZoneId | The 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:
| ARRAY | - |
| Database | The database in which the zone type was created. | STRING | - |
| Geography | A GeoJSON string representing the boundary of the zone. | STRING | - |
| ISO_3166_2 | The ISO 3166:2 of the state that covers the majority of the zone. | STRING | - |
| ModifiedBy | The user ID of the person who last modified the zone type. | STRING | - |
| ModifiedByTimestamp | The date and time the zone type was last modified wrapped inside an object with a value attribute. | OBJECT | - |
| ZoneId | The unique ID of the zone. | STRING | - |
| ZoneDescription | The name of the zone. | STRING | - |
| ZoneStatus | The 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"
}