> 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/backend-api/resources/field-service/task/form/values.md).

# Updating task form values

Task form values can only be submitted using the web API if there was a previous submission using the Mobile Tracker App ([Android](https://play.google.com/store/apps/details?id=com.navixy.xgps.tracker\&hl=ru) / [iOS](https://apps.apple.com/us/app/x-gps-tracker/id802887190)). The purpose of this feature is to correct any incorrectly filled data that was accidentally submitted. It is not intended for filling out an empty form from scratch.

This action can be used when the task status is `unassigned`, `assigned`, or `arrived`, and the device must not be deleted. Sub-users with the `completed_form_update` right can also update values when the task status is `done`, `failed`, or `delayed`.

## API actions

API path: `/task/form/values`.

### update

Updates existing form values of given task.

**required sub-user rights**: `task_update`.

**Parameters**

| name     | description                   | type        |
| -------- | ----------------------------- | ----------- |
| task\_id | An ID of the task.            | int         |
| values   | Map of field\_id-value object | JSON object |

where values object is:

```json
{
    "1223344": {
      "type": "text",
      "value": "text field value"
    }
}
```

For **value** object description, see [Form fields and values](/docs/navixy-api/user-api/backend-api/resources/field-service/form/field-types.md).

#### Examples

cURL

{% code overflow="wrap" %}

```sh
curl -X POST 'https://api.eu.navixy.com/v2/task/form/values/update' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "3b47a8672465f8009969caee36fda834", "task_id": 9677618, "values": {"2533373665146": {"type": "text", "value": "Hideo Kojima"}}}'
```

{% endcode %}

#### Response

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

#### Errors

* 101 – In demo mode this function disabled - if current user has "demo" flag.
* 201 – Not found in the database - if task with the specified ID does not exist.
* 255 – Invalid task state - if current task state is not `unassigned`, `assigned` or `arrived` (plus `done`, `failed`, and `delayed` for users with `completed_form_update` right).
* 242 – There were errors during content validation - if given values are invalid for the form. Example:

```json
{
    "success": false,
    "status": {
        "code": 242,
        "description": "There were errors during content validation"
    },
    "errors": [
        {
            "field_id": "111-aaa-whatever",
            "code": 5,
            "error": "text length constraints are not met"
        }
    ]
}
```

Validation error codes:

* 1 – field required but has no value.
* 2 – field value type doesn't match field type.
* 3 – field value is null.
* 4 – value index out of bounds.
* 5 – invalid value size.
* 6 – value less than minimum.
* 7 – value more than maximum.
* 8 – field contains invalid references.
* 9 – invalid file type.
* 10 – invalid file state.


---

# 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/backend-api/resources/field-service/task/form/values.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.
