queryType: updateCustomZones*

The updateCustomZones queryType is passed to the API to update zones already created via the queryType: createCustomZone.

Note:

See Special Case APIs for more information.

Parameters

These parameters should be passed to the functionParameters object regardless of which method you choose to make an API request.
ParameterDescriptionTypeDefined Value SetValue Required
queryTypeMust equal updateCustomZones.STRINGupdateCustomZonesY
customZones

An array of objects representing custom zones you want to update. Each object represents a custom zone and contains the properties of the zone you wish to modify. Each object contains:

  • ZoneId (string) - the ID of the custom zone you want to update.

  • ZoneDescription (string) - optional input value you would like to update the zone description with; pass null if you don’t want to update the ZoneDescription.
    Note:

    The zone description is required to be unique within a database.

  • CustomZoneTypes (array of string) - optional input value for CustomZoneTypes as an array of strings, where each string is a custom zone type ID corresponding to a custom zone type you previously created; pass null if you don’t want to update the CustomZoneTypes.

  • Comments - optional string value to update the comments; pass null if you don’t want to update the Comments.

  • ZoneStatusId - optional 0 for “Deleted”, 1 for “Active”; pass null if you don’t want to update the ZoneStatusId.

  • CustomerZoneId - optional value to update the CustomerZoneId; pass null if you don’t want to update the CustomerZoneId.

  • Geography - an optional GeoJSON string representing the update geography value for the custom zone; pass null if you don’t want to update the Geography.

OBJECTY

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 (of type number) - The status of the custom zone type. 0 for "Deleted" and 1 for "Active"

ARRAY-
DatabaseThe database in which the zone was createdSTRING-
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”

Sample parameters

{
"customZones":[
    {
        "ZoneId":"z-<>",
        "ZoneDescription":"updates custom zone description"        
    }
	],
"queryType":"updateCustomZones"
}