> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/fleet/garage.md).

# 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.

{% hint style="info" %}
**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.
{% endhint %}

## Garage object

## The Garage object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"Garage":{"type":"object","description":"A depot: where vehicles are kept and maintained, with the people responsible for them.","properties":{"id":{"type":"integer","description":"Depot ID. Absent when creating, required when updating."},"location":{"type":"object","description":"Optional. Where the depot is. Omitted from a response when the stored location is not valid.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address of the depot."},"radius":{"type":"integer","description":"Radius in metres, from 1 to 300000.","minimum":1,"maximum":300000}}},"mechanic_name":{"type":"string","description":"Name of the mechanic. **Required**, up to 255 characters.","maxLength":255},"dispatcher_name":{"type":"string","description":"Name of the dispatcher. **Required**, up to 255 characters.","maxLength":255},"organization_name":{"type":"string","description":"Name of the organization. **Required**, up to 255 characters.","maxLength":255}},"required":["mechanic_name","dispatcher_name","organization_name"]}}}}
```

## API actions

API base path: `/garage`.

Operations that list no errors of their own return only the [general error codes](/docs/navixy-api/general/errors.md#error-codes).

***

## List depots

> 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.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Garages","description":"Depots where vehicles are kept and maintained. All resources under the /garage/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"Garage":{"type":"object","description":"A depot: where vehicles are kept and maintained, with the people responsible for them.","properties":{"id":{"type":"integer","description":"Depot ID. Absent when creating, required when updating."},"location":{"type":"object","description":"Optional. Where the depot is. Omitted from a response when the stored location is not valid.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address of the depot."},"radius":{"type":"integer","description":"Radius in metres, from 1 to 300000.","minimum":1,"maximum":300000}}},"mechanic_name":{"type":"string","description":"Name of the mechanic. **Required**, up to 255 characters.","maxLength":255},"dispatcher_name":{"type":"string","description":"Name of the dispatcher. **Required**, up to 255 characters.","maxLength":255},"organization_name":{"type":"string","description":"Name of the organization. **Required**, up to 255 characters.","maxLength":255}},"required":["mechanic_name","dispatcher_name","organization_name"]}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/garage/list":{"post":{"tags":["Garages"],"summary":"List depots","description":"List all depots belonging to the current user.\n\nA depot stored without a valid location omits `location` from the response entirely rather than returning it as null.\n\nCallable with an empty body. Also accepts GET.","operationId":"garageList","responses":{"200":{"description":"The user's depots","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","items":{"$ref":"#/components/schemas/Garage"}}}}}}},"400":{"description":"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.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

***

*Required sub-user rights:* `vehicle_update`.

## Create depot

> 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.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Garages","description":"Depots where vehicles are kept and maintained. All resources under the /garage/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"Garage":{"type":"object","description":"A depot: where vehicles are kept and maintained, with the people responsible for them.","properties":{"id":{"type":"integer","description":"Depot ID. Absent when creating, required when updating."},"location":{"type":"object","description":"Optional. Where the depot is. Omitted from a response when the stored location is not valid.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address of the depot."},"radius":{"type":"integer","description":"Radius in metres, from 1 to 300000.","minimum":1,"maximum":300000}}},"mechanic_name":{"type":"string","description":"Name of the mechanic. **Required**, up to 255 characters.","maxLength":255},"dispatcher_name":{"type":"string","description":"Name of the dispatcher. **Required**, up to 255 characters.","maxLength":255},"organization_name":{"type":"string","description":"Name of the organization. **Required**, up to 255 characters.","maxLength":255}},"required":["mechanic_name","dispatcher_name","organization_name"]}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/garage/create":{"post":{"tags":["Garages"],"summary":"Create depot","description":"Create a depot, and return its ID.\n\n`mechanic_name`, `dispatcher_name` and `organization_name` are all **required**. `location` is the optional one.\n\nRequires the `vehicle_update` right.","operationId":"garageCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"garage":{"allOf":[{"$ref":"#/components/schemas/Garage"}],"description":"The depot to create, without the `id` field."}},"required":["garage"]}}}},"responses":{"200":{"description":"The created depot","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"id":{"type":"integer","description":"ID of the new depot."}}}}}},"400":{"description":"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.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

***

*Required sub-user rights:* `vehicle_update`.

## Update depot

> 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.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Garages","description":"Depots where vehicles are kept and maintained. All resources under the /garage/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"schemas":{"Garage":{"type":"object","description":"A depot: where vehicles are kept and maintained, with the people responsible for them.","properties":{"id":{"type":"integer","description":"Depot ID. Absent when creating, required when updating."},"location":{"type":"object","description":"Optional. Where the depot is. Omitted from a response when the stored location is not valid.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address of the depot."},"radius":{"type":"integer","description":"Radius in metres, from 1 to 300000.","minimum":1,"maximum":300000}}},"mechanic_name":{"type":"string","description":"Name of the mechanic. **Required**, up to 255 characters.","maxLength":255},"dispatcher_name":{"type":"string","description":"Name of the dispatcher. **Required**, up to 255 characters.","maxLength":255},"organization_name":{"type":"string","description":"Name of the organization. **Required**, up to 255 characters.","maxLength":255}},"required":["mechanic_name","dispatcher_name","organization_name"]}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/garage/update":{"post":{"tags":["Garages"],"summary":"Update depot","description":"Update an existing depot. Pass a full depot object including its `id`.\n\n`mechanic_name`, `dispatcher_name` and `organization_name` are all **required**. `location` is the optional one.\n\nRequires the `vehicle_update` right.","operationId":"garageUpdate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"garage":{"allOf":[{"$ref":"#/components/schemas/Garage"}],"description":"The depot to update, including its `id`."}},"required":["garage"]}}}},"responses":{"200":{"description":"Depot updated","$ref":"#/components/responses/OK"},"400":{"description":"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.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#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

> Delete a depot by ID.\
> \
> Also accepts GET with the same parameters as query-string values.\
> \
> Requires the \`vehicle\_update\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Garages","description":"Depots where vehicles are kept and maintained. All resources under the /garage/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"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.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/garage/delete":{"post":{"tags":["Garages"],"summary":"Delete depot","description":"Delete a depot by ID.\n\nAlso accepts GET with the same parameters as query-string values.\n\nRequires the `vehicle_update` right.","operationId":"garageDelete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"garage_id":{"type":"integer","description":"ID of the depot to delete.","minimum":1}},"required":["garage_id"]}}}},"responses":{"200":{"description":"Depot deleted","$ref":"#/components/responses/OK"},"400":{"description":"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.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, if there is no depot with such an ID.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/resources/fleet/garage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
