> 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/commons/entity.md).

# Entity

Classes of object whose fields and layout an account can customize.

An entity is a class of object whose presentation and editable fields an account can customize. Adding a custom field to places, or reordering the fields already there, is done through this resource.

More than one entity type exists. A plain account lists both `place` and `task`. Reading or updating one needs the right mapped to that type, so an account can see an entity in the list and still get error 13 when it tries to read it.

## Entity object

## The CustomizableEntity object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"CustomizableEntity":{"type":"object","description":"A class of records whose presentation and editable fields can be customized, such as places.\n\nWhich rights govern an entity depends on its type, so an account may see an entity in `entity/list` that it cannot read.","properties":{"id":{"type":"integer","description":"Entity identifier."},"type":{"type":"string","description":"Which class of records this is. A plain account carries `place` and `task`; the published prose names only `place`."},"settings":{"type":"object","description":"How records of this entity are presented.","properties":{"layout":{"type":"object","description":"How the fields are laid out. **Must account for every field of the entity**, built-in and custom, with none omitted and none repeated.","properties":{"sections":{"type":"array","description":"The sections the fields are grouped into. At least one section must exist.","items":{"type":"object","properties":{"label":{"type":"string","description":"Name of the section."},"field_order":{"type":"array","description":"The fields in this section, in order. Built-in fields by name, custom fields by ID **as a string**. For `place` the built-in names are `label`, `location`, `tags` and `description`.","items":{"type":"string"}}}},"minItems":1}}}}}}}}}}
```

The `place` type is the same object the [place API](/docs/navixy-api/user-api/resources/field-service/place/work-with-poi.md) works with. Its built-in fields are `label`, `location`, `tags`, and `description`.

## API actions

API base path: `/entity`.

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

***

## List entities

> List the entity classes whose presentation and fields can be customized.\
> \
> \*\*More than one type exists.\*\* A plain account lists both \`place\` and \`task\`. Reading or updating one requires the right mapped to that type, so an account without a product's rights can see its entity in this list and get error 13 on \`entity/read\`.\
> \
> Callable with an empty body. Also accepts GET.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Entities","description":"Customizable record classes and the custom fields added to them. All resources under the /entity/ 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":{"CustomizableEntity":{"type":"object","description":"A class of records whose presentation and editable fields can be customized, such as places.\n\nWhich rights govern an entity depends on its type, so an account may see an entity in `entity/list` that it cannot read.","properties":{"id":{"type":"integer","description":"Entity identifier."},"type":{"type":"string","description":"Which class of records this is. A plain account carries `place` and `task`; the published prose names only `place`."},"settings":{"type":"object","description":"How records of this entity are presented.","properties":{"layout":{"type":"object","description":"How the fields are laid out. **Must account for every field of the entity**, built-in and custom, with none omitted and none repeated.","properties":{"sections":{"type":"array","description":"The sections the fields are grouped into. At least one section must exist.","items":{"type":"object","properties":{"label":{"type":"string","description":"Name of the section."},"field_order":{"type":"array","description":"The fields in this section, in order. Built-in fields by name, custom fields by ID **as a string**. For `place` the built-in names are `label`, `location`, `tags` and `description`.","items":{"type":"string"}}}},"minItems":1}}}}}}}},"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":{"/entity/list":{"post":{"tags":["Entities"],"summary":"List entities","description":"List the entity classes whose presentation and fields can be customized.\n\n**More than one type exists.** A plain account lists both `place` and `task`. Reading or updating one requires the right mapped to that type, so an account without a product's rights can see its entity in this list and get error 13 on `entity/read`.\n\nCallable with an empty body. Also accepts GET.","operationId":"entityList","responses":{"200":{"description":"The customizable entities","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/CustomizableEntity"}}}}}}},"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"}}}}}}
```

***

Give exactly one of `id` and `type`. Both null or both set is rejected. The `fields` that come back are described in the [field object](/docs/navixy-api/user-api/resources/commons/entity/fields.md#field-object).

## Read entity

> Return one entity together with its custom fields, by ID or by type.\
> \
> \*\*Exactly one of \`id\` and \`type\` must be given.\*\* Neither is accepted and so is both: the errors say "cannot be null if type is null" and "cannot be non-null if type is not null" respectively, which is unusually self-explaining for this API.\
> \
> Reading an entity requires the right that governs its type, so \`type\` values belonging to other products return error 13 rather than data.\
> \
> Also accepts GET with the same parameters as query-string values.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Entities","description":"Customizable record classes and the custom fields added to them. All resources under the /entity/ 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":{"CustomizableEntity":{"type":"object","description":"A class of records whose presentation and editable fields can be customized, such as places.\n\nWhich rights govern an entity depends on its type, so an account may see an entity in `entity/list` that it cannot read.","properties":{"id":{"type":"integer","description":"Entity identifier."},"type":{"type":"string","description":"Which class of records this is. A plain account carries `place` and `task`; the published prose names only `place`."},"settings":{"type":"object","description":"How records of this entity are presented.","properties":{"layout":{"type":"object","description":"How the fields are laid out. **Must account for every field of the entity**, built-in and custom, with none omitted and none repeated.","properties":{"sections":{"type":"array","description":"The sections the fields are grouped into. At least one section must exist.","items":{"type":"object","properties":{"label":{"type":"string","description":"Name of the section."},"field_order":{"type":"array","description":"The fields in this section, in order. Built-in fields by name, custom fields by ID **as a string**. For `place` the built-in names are `label`, `location`, `tags` and `description`.","items":{"type":"string"}}}},"minItems":1}}}}}}},"CustomField":{"type":"object","description":"A custom field added to an entity, so records of that entity can carry information the platform does not define.\n\nThe `type` fixes what the field accepts and **cannot be changed** once the field exists.","properties":{"id":{"type":["integer","null"],"description":"Field identifier. **Null when creating**, which is how a new field is signalled."},"label":{"type":"string","description":"Name of the field. Must be unique among the fields of one entity."},"type":{"type":"string","description":"What the field holds. `text` takes up to 700 Unicode characters. `bigtext` takes up to 20000 but has reduced search and sorting. `email` and `phone` are validated as such. `decimal` runs from -999999999999.999999 to 999999999999.999999 and stores six decimal places. `integer` runs from -2^63 to 2^63-1. `employee` links to an employee and is the only type taking `params`.","enum":["text","bigtext","email","phone","decimal","integer","employee"]},"required":{"type":"boolean","description":"Whether the field must be filled in."},"description":{"type":"string","description":"Additional information about the field, up to 512 characters.","maxLength":512},"params":{"type":"object","description":"Type-specific parameters. **Omit when the type needs none**, which is every type except `employee`.","properties":{"responsible":{"type":"boolean","description":"For an `employee` field. When `true`, records carrying this field can be shown to that employee in the Mobile Tracker App. **Only one employee field per entity may set this.**"}},"additionalProperties":true}}}},"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":{"/entity/read":{"post":{"tags":["Entities"],"summary":"Read entity","description":"Return one entity together with its custom fields, by ID or by type.\n\n**Exactly one of `id` and `type` must be given.** Neither is accepted and so is both: the errors say \"cannot be null if type is null\" and \"cannot be non-null if type is not null\" respectively, which is unusually self-explaining for this API.\n\nReading an entity requires the right that governs its type, so `type` values belonging to other products return error 13 rather than data.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"entityRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the entity. Use this or `type`, not both."},"type":{"type":"string","description":"Type of the entity. Use this or `id`, not both."}}}}}},"responses":{"200":{"description":"The entity and its fields","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"entity":{"$ref":"#/components/schemas/CustomizableEntity"},"fields":{"type":"array","description":"Custom fields associated with this entity.","items":{"$ref":"#/components/schemas/CustomField"}}}}}}},"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 13: the caller lacks the right that governs this entity type.","$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, when no entity has the given ID.

***

The entity must carry a valid ID.

{% hint style="warning" %}
`entity.settings.layout.sections` must contain the IDs of every built-in and custom field associated with the entity. No field can be left out of the layout, only reordered, and no field can appear twice even in different sections.
{% endhint %}

*Required sub-user rights:* `places_custom_fields_update` for entities with type `place`.

## Update entity

> Update the settings of a customizable entity. The entity must carry a valid \`id\`.\
> \
> \*\*The layout must account for every field.\*\* \`settings.layout.sections\` has to contain every built-in and custom field associated with the entity: nothing may be omitted, and nothing may appear twice, even in different sections. Only reordering is allowed.\
> \
> The required right depends on the entity type rather than on the operation, so it is not a fixed rights line: \`place\` needs \`places\_custom\_fields\_update\`, and other types need the right their own product defines.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Entities","description":"Customizable record classes and the custom fields added to them. All resources under the /entity/ 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":{"CustomizableEntity":{"type":"object","description":"A class of records whose presentation and editable fields can be customized, such as places.\n\nWhich rights govern an entity depends on its type, so an account may see an entity in `entity/list` that it cannot read.","properties":{"id":{"type":"integer","description":"Entity identifier."},"type":{"type":"string","description":"Which class of records this is. A plain account carries `place` and `task`; the published prose names only `place`."},"settings":{"type":"object","description":"How records of this entity are presented.","properties":{"layout":{"type":"object","description":"How the fields are laid out. **Must account for every field of the entity**, built-in and custom, with none omitted and none repeated.","properties":{"sections":{"type":"array","description":"The sections the fields are grouped into. At least one section must exist.","items":{"type":"object","properties":{"label":{"type":"string","description":"Name of the section."},"field_order":{"type":"array","description":"The fields in this section, in order. Built-in fields by name, custom fields by ID **as a string**. For `place` the built-in names are `label`, `location`, `tags` and `description`.","items":{"type":"string"}}}},"minItems":1}}}}}}}},"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":{"/entity/update":{"post":{"tags":["Entities"],"summary":"Update entity","description":"Update the settings of a customizable entity. The entity must carry a valid `id`.\n\n**The layout must account for every field.** `settings.layout.sections` has to contain every built-in and custom field associated with the entity: nothing may be omitted, and nothing may appear twice, even in different sections. Only reordering is allowed.\n\nThe required right depends on the entity type rather than on the operation, so it is not a fixed rights line: `place` needs `places_custom_fields_update`, and other types need the right their own product defines.","operationId":"entityUpdate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/CustomizableEntity"}],"description":"The entity to update, with a valid `id` and its full settings."}},"required":["entity"]}}}},"responses":{"200":{"description":"Entity 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 13: the caller lacks the right that governs this entity type.","$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):

* 7 - Invalid parameters, when the entity object violates the layout restrictions above.
* 201 - Not found in the database, when no entity has the given ID.

## More in this section

#### Entity fields

| Endpoint                                                                                                          | Method | What it does         |
| ----------------------------------------------------------------------------------------------------------------- | ------ | -------------------- |
| [`/entity/fields/read`](/docs/navixy-api/user-api/resources/commons/entity/fields.md#post-entity-fields-read)     | POST   | Read entity fields   |
| [`/entity/fields/update`](/docs/navixy-api/user-api/resources/commons/entity/fields.md#post-entity-fields-update) | POST   | Update entity fields |


---

# 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/commons/entity.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.
