post
/api/v2/zones/custom-sub-types
Python SDK method:
client.zones.create_sub_type(params)

Create custom zone sub-type

Creates a new custom zone sub-type for the authenticated user's database. Sub-types categorise custom zones (e.g. distribution centre, fuel stop).

Altitude Help Center — createCustomZoneType

Request Body

Custom zone sub-type definition.

application/json: object

NameTypeInput ShapeValuesDescriptionValue Required
commentsstring--Optional notes describing the purpose or usage of this custom zone sub-type.N
namestring--Display name for the custom zone sub-type. Must be unique within the database.Y

Examples

Create custom zone subType request

Translated from the v1 createCustomZoneType sample.

{
  "comments": "Fueling locations",
  "name": "Fuel Stop"
}

Success Responses

201 response: object

Resource created.

NameTypeDescription
commentsstringNotes describing the purpose or usage of this sub-type.
createdstringTimestamp of when the resource was created.
createdBystringUsername of the user who created the resource.
databasestringDatabase the sub-type belongs to. Omitted for global sub-types.
idstringUnique custom zone sub-type identifier.
modifiedstringTimestamp of the most recent modification.
modifiedBystringUsername of the user who last modified the resource.
namestringDisplay name for the custom zone sub-type.
statusinteger (int64)Lifecycle status: 1 = active, 0 = archived.

Response Errors

HTTP Status CodeReason
400The request body or parameters are invalid.
401Authentication is required or the provided credentials are invalid.
403The authenticated user lacks permission to perform this operation.
422The request is syntactically valid but semantically cannot be processed.
429The request rate limit has been exceeded.
500An unexpected server error occurred.