For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 and depot are the same thing. The Navixy interface calls it a depot, and the API calls it a garage: the path is /garage and the object is Garage. This page uses garage, because that is what the API says.

Garage object

API actions

API base path: /garage.

Operations that list no errors of their own return only the general error codes.


List depots

post
/garage/list

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.

Authorizations
AuthorizationstringRequired

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.

Responses
200

The user's depots

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/garage/list
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 depot

post
/garage/create

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.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

The created depot

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
idintegerOptional

ID of the new depot.

post/garage/create
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 depot

post
/garage/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.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

Depot updated

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/garage/update
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 depot

post
/garage/delete

Delete a depot by ID.

Also accepts GET with the same parameters as query-string values.

Requires the vehicle_update right.

Authorizations
AuthorizationstringRequired

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.

Body
garage_idinteger · min: 1Required

ID of the depot to delete.

Responses
200

Depot deleted

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/garage/delete
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?