> 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/tracking/tracker/employee.md).

# Employee

Assign an employee as the driver of a tracker, and read who is assigned now.

Assigning an employee to a tracker records who is driving it. That link is what lets reports attribute trips, mileage, and behaviour to a person rather than only to a device.

Reading the assignment returns more than the name: it also reports the hardware key used to identify the driver, and when and where the assignment was made.

## API actions

API base path: `/tracker/employee`.

***

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

*Required tariff feature:* `app_fleet`.

## Assign or unassign an employee

> Assign or unassign the employee (driver) on a tracker.\
> \
> \_Requires the \`app\_fleet\` tariff feature.\_\
> \
> When \`new\_employee\_id\` is provided, that employee is assigned to the tracker. When it is \*\*omitted or \`null\`\*\*, any existing assignment is cleared (unassign). Error 263 is returned when the call would produce no change, for example unassigning a tracker that already has no employee.\
> \
> Requires the \`employee\_update\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ 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":{"/tracker/employee/assign":{"post":{"tags":["Trackers"],"summary":"Assign or unassign an employee","description":"Assign or unassign the employee (driver) on a tracker.\n\n_Requires the `app_fleet` tariff feature._\n\nWhen `new_employee_id` is provided, that employee is assigned to the tracker. When it is **omitted or `null`**, any existing assignment is cleared (unassign). Error 263 is returned when the call would produce no change, for example unassigning a tracker that already has no employee.\n\nRequires the `employee_update` right.","operationId":"trackerEmployeeAssign","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."},"new_employee_id":{"type":["integer","null"],"description":"ID of the employee to assign. Omit or pass `null` to unassign the current employee from the tracker.","minimum":1}},"required":["tracker_id"]}}}},"responses":{"200":{"description":"The assignment was 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"},"403":{"description":"Error 201: no tracker or employee with this ID belongs to the account. Error 208: the tracker exists but is blocked, normally because its tariff ended. Error 263: no change needed, because the tracker already has this assignment state.","$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 - No tracker or employee with this ID belongs to the account.
* 208 - The tracker exists but is blocked, normally because its tariff ended.
* 263 - No change needed, because the tracker already has this assignment state.

***

## Read the assigned employee

> Get the employee currently assigned to a tracker, and when and where the assignment last changed. Available to demo accounts.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ 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":{"Employee":{"type":"object","description":"A person working at the organization: an employee or a driver. Employees can be linked to trackers, vehicles and places.","properties":{"id":{"type":["integer","null"],"description":"Internal ID. May be null or absent when creating."},"tracker_id":{"type":["integer","null"],"description":"ID of the tracker currently assigned to this employee. Null means none."},"first_name":{"type":"string","description":"First name. **Cannot be empty.** Up to 100 characters.","minLength":1,"maxLength":100},"middle_name":{"type":"string","description":"Middle name. May be empty but **not null**. Up to 100 characters.","maxLength":100},"last_name":{"type":"string","description":"Last name. May be empty but **not null**. Up to 100 characters.","maxLength":100},"email":{"type":"string","description":"Email address, which must be valid when given. May be empty but **not null**. Up to 100 characters.","maxLength":100},"phone":{"type":"string","description":"Phone number **without the leading `+`**. May be empty but not null. Up to 32 characters.","maxLength":32},"driver_license_number":{"type":"string","description":"Driver licence number. May be empty but not null. Up to 32 characters.","maxLength":32},"driver_license_cats":{"type":"string","description":"Driver licence categories. Up to 32 characters.","maxLength":32},"driver_license_issue_date":{"type":["string","null"],"description":"Issue date of the driver licence, as `yyyy-MM-dd`."},"driver_license_valid_till":{"type":["string","null"],"description":"Date the driver licence is valid until, as `yyyy-MM-dd`."},"hardware_key":{"type":["string","null"],"description":"Hardware key, such as an iButton or RFID identifier. Up to 64 characters.","maxLength":64},"icon_id":{"type":["integer","null"],"description":"ID of the assigned icon. **Cannot be set here**: use `employee/avatar/assign`."},"avatar_file_name":{"type":["string","null"],"description":"Name of the uploaded avatar file. **Cannot be set here**: use `employee/avatar/upload`."},"department_id":{"type":["integer","null"],"description":"ID of the department this employee belongs to."},"location":{"type":["object","null"],"description":"Optional. Location associated with this employee. Must be a valid location or null.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."},"radius":{"type":"integer","description":"Radius in metres around that point."}}},"personnel_number":{"type":"string","description":"Optional. Personnel number. Up to 15 characters.","maxLength":15},"ssn":{"type":"string","description":"Optional. Social security number. Up to 32 characters.","maxLength":32},"tags":{"type":"array","description":"IDs of tags applied to the employee.","items":{"type":"integer"}}}}},"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":{"/tracker/employee/read":{"post":{"tags":["Trackers"],"summary":"Read the assigned employee","description":"Get the employee currently assigned to a tracker, and when and where the assignment last changed. Available to demo accounts.","operationId":"trackerEmployeeRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."}},"required":["tracker_id"]}}}},"responses":{"200":{"description":"The assignment","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"current":{"description":"The employee currently assigned, or null.","oneOf":[{"$ref":"#/components/schemas/Employee"},{"type":"null"}]},"last_change":{"type":["object","null"],"description":"How the assignment last changed, or null.","properties":{"id":{"type":"integer","description":"ID of the change record.","format":"int64"},"old_employee_id":{"type":["integer","null"],"description":"Deprecated. Always null.","deprecated":true},"new_employee_id":{"type":["integer","null"],"description":"Employee assigned to the tracker. May be null."},"location":{"type":["object","null"],"description":"Where the change happened. May be null.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":["string","null"],"description":"Address, may be null."}}},"changed":{"type":"string","description":"When the change happened."},"origin":{"type":"string","description":"What made the change: `supervisor` for an API call, `tracker` for a hardware driver key.","enum":["supervisor","tracker"]},"hardware_key":{"type":["string","null"],"description":"Hardware key used to change the employee."}}}}}}}},"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"},"403":{"description":"Error 201: no tracker with this ID belongs to the account. Error 208: the tracker exists but is blocked, normally because its tariff ended.","$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 - No tracker with this ID belongs to the account.
* 208 - The tracker exists but is blocked, normally because its tariff ended.


---

# 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/tracking/tracker/employee.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.
