# Vehicle status listing

{% hint style="warning" %}
**Deprecated!**\
This API action deprecated and should not be used.
{% endhint %}

## Vehicle status listing object

```json
{
  "id": 1,
  "order": 0,
  "label": "label123",
  "color": "FFFFFF"
}
```

* `id` - int. An ID of the status.
* `order` - int. Position of the status. Ignored when update because statuses already have position in an array.
* `label` - string. Status name (description).
* `color` - string. RGB-color.

## API actions

API path: `/vehicle/status/listing`.

### read

Gets all of user's vehicle statuses.

#### Examples

{% tabs %}
{% tab title="cURL" %}

```sh
curl -X POST 'https://api.eu.navixy.com/v2/vehicle/status/listing/read' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "a6aa75587e5c59c32d347da438505fc3"}'
```

{% endtab %}

{% tab title="HTTP GET" %}
{% code overflow="wrap" %}

```http
https://api.eu.navixy.com/v2/vehicle/status/listing/read?hash=a6aa75587e5c59c32d347da438505fc3
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Response

```json
{
  "success": true,
  "list": [
    {
      "id": 1,
      "order": 0,
      "label": "label123",
      "color": "FFFFFF"
    }
  ]
}
```

#### Errors

[General](https://navixy.com/docs/navixy-api/user-api/errors#error-codes) types only.

### update

Updates user's vehicle statuses.

#### Parameters

| name     | description                                                                                                    | type             |
| -------- | -------------------------------------------------------------------------------------------------------------- | ---------------- |
| statuses | List of vehicle\_status\_entry objects. If status ID is not null, then update, else create new vehicle status. | array of objects |

Old vehicle statuses, which are not present in `statuses` array, will be deleted.

#### Example

cURL

{% code overflow="wrap" %}

```sh
curl -X POST 'https://api.eu.navixy.com/v2/vehicle/status/listing/update' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "statuses": [{"id": 1, "order": 0, "label": "label123", "color": "FFFFFF"}]}'
```

{% endcode %}

#### Response

```json
{
  "success": true
}
```

#### Errors

[General](https://navixy.com/docs/navixy-api/user-api/errors#error-codes) types only.


---

# Agent Instructions: 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:

```
GET https://navixy.com/docs/navixy-api/user-api/backend-api/resources/fleet/vehicle/listing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
