Skip to main content

Location

Location Object

FieldTypeDescription
idsnowflakethe location's id
organisation_idsnowflakethe organisation's id
codestring?a short code for the location (up to 12 characters)
namestring?the name of the location (up to 200 characters)
colourstringthe location's colour in hex format
colorstringthe location's colour in hex format (alias of colour)
latitudedouble?the latitude of the location
longitudedouble?the longitude of the location
radiusdouble?the geofencing radius in metres
addressstring?the address of the location
deliverybooleanwhether the location is a delivery location
timezone_codestring?the timezone code of the location
sub_locationsarray<sub_location>array of sub locations

Sub Location Object

FieldTypeDescription
idsnowflakethe sub location's id
organisation_idsnowflakethe organisation's id
location_idsnowflakethe location's id
codestring?a short code for the sub location (up to 12 characters)
namestring?the sub location's name (up to 200 characters)
asset_capacityinteger?optionally limits the number of assets that can be allocated to the sub location
enabledbooleanwhether the sub location is enabled

Create Location

POST /organisations/{organisation.id}/locations

Creates a new location in the organisation. Requires the MANAGE_LOCATIONS permission.

Parameters
FieldTypeDescriptionDefault
codestring?a short code for the location (up to 12 characters)
namestring?the name of the location (up to 200 characters)new location
colourstring?the location's colour in hex format
latitudedouble?the latitude of the location (must be provided with longitude)null
longitudedouble?the longitude of the location (must be provided with latitude)null
radiusdouble?the geofencing radius in metresnull
addressstring?the address of the location
timezone_codestring?the timezone code of the location
deliveryboolean?whether the location is a delivery location
Error Responses
Status CodeDescription
400Bad request (organisation not found)
400Bad request (latitude and longitude must be provided together)
403Forbidden (user lacks the MANAGE_LOCATIONS permission)

List Locations

GET /organisations/{organisation.id}/locations

Returns an array of location objects for the organisation. Each location includes nested sub_location objects. Requires membership in the organisation, or an accepted fleet share from the organisation.

Query Parameters
FieldTypeDescriptionDefault
deliverybooleanwhen set, filters locations by delivery statusnull
Error Responses
Status CodeDescription
400Bad request (organisation not found)
403Forbidden (user is not a member and has no fleet share)

Get Location

GET /locations/{location.id}

Returns the location object for the given location id. Requires membership in the organisation that owns the location. The response includes nested sub_location objects.

Error Responses
Status CodeDescription
400Bad request (organisation not found)
403Forbidden (user is not a member of the organisation)
404Not found (location does not exist)

Update Location

PATCH /locations/{location.id}

Updates a location's properties. Requires the MANAGE_LOCATIONS permission for the organisation.

All parameters for this method are optional. Only the fields provided will be updated.

Parameters
FieldTypeDescription
codestring?a short code for the location (up to 12 characters)
namestring?the name of the location (up to 200 characters)
colourstring?the location's colour in hex format
addressstring?the address of the location
latitudedouble?the latitude of the location
longitudedouble?the longitude of the location
radiusdouble?the geofencing radius in metres
timezone_codestring?the timezone code of the location (must be a valid IANA timezone)
deliveryboolean?whether the location is a delivery location
Error Responses
Status CodeDescription
400Bad request (invalid timezone code)
403Forbidden (user lacks the MANAGE_LOCATIONS permission)
404Not found (location does not exist)

Create Sub Location

POST /locations/{location.id}/sub-locations

Creates a new sub_location under the given location. Requires the MANAGE_LOCATIONS permission for the organisation.

Parameters
FieldTypeDescriptionDefault
codestring?a short code for the sub location (up to 12 characters)
namestring?the sub location's name (up to 200 characters)new sub location
asset_capacityinteger?limits the number of assets that can be allocated to the sub locationnull
Error Responses
Status CodeDescription
400Bad request (organisation not found)
403Forbidden (user lacks the MANAGE_LOCATIONS permission)

List Sub Locations

GET /locations/{location.id}/sub-locations

Returns an array of sub_location objects for the given location. Requires membership in the organisation that owns the location, or an accepted fleet share from that organisation.

Error Responses
Status CodeDescription
400Bad request (organisation not found)
403Forbidden (user is not a member and has no fleet share)