queryType: createCustomZone
The createCustomZone queryType is passed to the API to create a new zone that can be used as a custom zone in the various modules.
Parameters
functionParameters object regardless of which method you choose to make an API request.| Parameter | Description | Type | Defined Value Set | Value Required |
|---|---|---|---|---|
| queryType | Must equal createCustomZone . | STRING | createCustomZone | Y |
|
customZone |
An object containing the properties of the zone you wish to create. The object contains:
| OBJECT | Y |
Responses
| Code | Type | Description |
|---|---|---|
| 200 | JSON | The requested data. |
| 401 | JSON | Occurs for various unauthorized tasks e.g. if you didn't provide 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 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” |
Sample parameters
{
"customZone": {
"ZoneDescription": "my custom zone description",
"CustomZoneTypes": ['zt-<>'],
"Comments": "new custom zone comments",
"CustomerZoneId": "my own unique identifier for the custom zone",
"Geography": '{\"type\":\"Polygon\",\"coordinates\":[[[<coordinate>],[<coordinate>],[<coordinate>],[<coordinate>]]]}'
},
"queryType": "createCustomZone"
}