Garage (depot)
The premises a fleet is maintained from, with its address and the people responsible.
A garage is the premises a fleet is maintained from. It records the address, the mechanic and dispatcher responsible, and the other details that make maintenance and task assignment easier to organise.
Garage object
API actions
API base path: /garage.
Operations that list no errors of their own return only the general error codes.
List all depots belonging to the current user.
A depot stored without a valid location omits location from the response entirely rather than returning it as null.
Callable with an empty body. Also accepts GET.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
The user's depots
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/garage/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": true,
"list": [
{
"id": 1,
"location": {
"lat": 1,
"lng": 1,
"address": "text",
"radius": 1
},
"mechanic_name": "text",
"dispatcher_name": "text",
"organization_name": "text"
}
]
}Required sub-user rights: vehicle_update.
Create a depot, and return its ID.
mechanic_name, dispatcher_name and organization_name are all required. location is the optional one.
Requires the vehicle_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
The created depot
true if request finished successfully.
trueID of the new depot.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/garage/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 151
{
"garage": {
"id": 1,
"location": {
"lat": 1,
"lng": 1,
"address": "text",
"radius": 1
},
"mechanic_name": "text",
"dispatcher_name": "text",
"organization_name": "text"
}
}{
"success": true,
"id": 1
}Required sub-user rights: vehicle_update.
Update an existing depot. Pass a full depot object including its id.
mechanic_name, dispatcher_name and organization_name are all required. location is the optional one.
Requires the vehicle_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Depot updated
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/garage/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 151
{
"garage": {
"id": 1,
"location": {
"lat": 1,
"lng": 1,
"address": "text",
"radius": 1
},
"mechanic_name": "text",
"dispatcher_name": "text",
"organization_name": "text"
}
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database, if there is no depot with such an ID.
Required sub-user rights: vehicle_update.
Delete a depot by ID.
Also accepts GET with the same parameters as query-string values.
Requires the vehicle_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of the depot to delete.
Depot deleted
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/garage/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"garage_id": 1
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database, if there is no depot with such an ID.
Last updated
Was this helpful?