> 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/guides/fleet-management/use-tags.md).

# Using tags

Tags in the Navixy system are labels that facilitate quick and convenient searches for places, geofences, employees, tasks, trackers, and vehicles. You can create custom tags according to your needs, and each object can have multiple tags assigned.

## Case

To simplify searching for objects, assign specific tags to related items. For example, if a team of employees services several places and uses specific vehicles, you can assign a unique tag to these objects. This way, you can easily find tasks assigned to these teams.

## Creation

First, create the tag using the `tag/create` method. Let's name it "team1."

API request:

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

```shell
curl --request POST \
  --url 'https://api.eu.navixy.com/v2/tag/create' \
  --header 'Content-Type: application/json' \
  --data '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "tag": {"name": "team1", "color": "#00BFFF"}}'
```

{% endtab %}

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

```shell
https://api.eu.navixy.com/v2/tag/create?hash=a6aa75587e5c59c32d347da438505fc3&tag={"name": "team1", "color": "#00BFFF"}
```

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

The Navixy platform will reply with the created tag ID. You can find this tag using the `tag/list` method.

## Assigning

Next, assign this tag to your objects. You can do this when updating or creating objects by adding the "tags" parameter:

* [Place](/docs/navixy-api/user-api/resources/field-service/place/work-with-poi.md#place-object) - [update](/docs/navixy-api/user-api/resources/field-service/place/work-with-poi.md#post-place-update)/[create](/docs/navixy-api/user-api/resources/field-service/place/work-with-poi.md#post-place-create)
* [Task](/docs/navixy-api/user-api/resources/field-service/task.md#task-object) - [update](/docs/navixy-api/user-api/resources/field-service/task.md#post-task-update)/[create](/docs/navixy-api/user-api/resources/field-service/task.md#post-task-create)
* [Task schedule](/docs/navixy-api/user-api/resources/field-service/task/schedule.md#task-schedule-entry-object) - [update](/docs/navixy-api/user-api/resources/field-service/task/schedule.md#post-task-schedule-update)/[create](/docs/navixy-api/user-api/resources/field-service/task/schedule.md#post-task-schedule-create)
* [Employee](/docs/navixy-api/user-api/resources/field-service/employee.md#employee-object) - [update](/docs/navixy-api/user-api/resources/field-service/employee.md#post-employee-update)/[create](/docs/navixy-api/user-api/resources/field-service/employee.md#post-employee-create)
* [Vehicle](/docs/navixy-api/user-api/resources/fleet/vehicle.md#vehicle-object) - [update](/docs/navixy-api/user-api/resources/fleet/vehicle.md#post-vehicle-update)/[create](/docs/navixy-api/user-api/resources/fleet/vehicle.md#post-vehicle-create)
* [Zone](/docs/navixy-api/user-api/resources/tracking/zone.md#entity-description) - [update](/docs/navixy-api/user-api/resources/tracking/zone.md#post-zone-update)/[create](/docs/navixy-api/user-api/resources/tracking/zone.md#post-zone-create)
* [Tracker](/docs/navixy-api/user-api/resources/tracking/tracker.md#tracker-object-structure) - Use the `tags/set` method

## Searching objects with tags

To find all objects with a specific tag, use the `tag/search` method.

API request:

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

```shell
curl --request POST \
  --url 'https://api.eu.navixy.com/v2/tag/search' \
  --header 'Content-Type: application/json' \
  --data '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "tag_ids": [179227]}'
```

{% endtab %}

{% tab title="HTTP GET" %}

```shell
https://api.eu.navixy.com/v2/tag/search?hash=22eac1c27af4be7b9d04da2ce1af111b&tag_ids=[179227]
```

{% endtab %}
{% endtabs %}

The platform will respond with objects that have the assigned tag:

<details>

<summary>Response</summary>

```json
{
  "success": true,
  "result": {
    "place": [
      {
        "id": 1446571,
        "location": {
          "lat": 34.178868,
          "lng": -118.599672,
          "address": "21550 W Oxnard St, Woodland Hills, CA 91367, USA",
          "radius": 100
        },
        "label": "New place",
        "description": "",
        "external_id": null,
        "tags": [
          179227
        ]
      }
    ],
    "task": [
      {
        "id": 8280866,
        "user_id": 184541,
        "tracker_id": 669673,
        "status": "assigned",
        "status_change_date": "2021-06-17 12:41:52",
        "tags": [
          179227
        ],
        "label": "New task ",
        "description": "",
        "external_id": null,
        "creation_date": "2021-06-17 12:41:37",
        "origin": "manual",
        "location": {
          "lat": 33.492830,
          "lng": -112.177673,
          "address": "3836-3820 N 55th Ave, Phoenix, AZ 85031, USA",
          "radius": 152
        },
        "from": "2021-06-17 00:00:00",
        "to": "2021-06-17 23:59:59",
        "arrival_date": null,
        "stay_duration": 0,
        "min_stay_duration": 0,
        "min_arrival_duration": 0,
        "max_delay": 0,
        "type": "task"
      }
    ],
    "employee": [
      {
        "id": 55693,
        "tracker_id": 669673,
        "first_name": "Andrew",
        "middle_name": "",
        "last_name": "",
        "email": "",
        "phone": "",
        "driver_license_number": "",
        "driver_license_cats": "",
        "driver_license_issue_date": null,
        "driver_license_valid_till": null,
        "hardware_key": null,
        "department_id": null,
        "location": {
          "lat": 39.801066,
          "lng": -105.028685,
          "address": "5735 Hooker St, Denver, CO 80221, United States",
          "radius": 150
        },
        "personnel_number": "1235341231",
        "tags": [
          179227
        ]
      }
    ]
  }
}
```

</details>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://navixy.com/docs/navixy-api/user-api/guides/fleet-management/use-tags.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
