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

# Task form values

Correct the values of a form that has already been submitted from the mobile app.

This operation corrects a form that was already filled. It exists for fixing data submitted by mistake, not for filling an empty form: values can only be updated when the form was previously submitted from the Mobile Tracker App, for [Android](https://play.google.com/store/apps/details?id=com.navixy.xgps.tracker\&hl=ru) or [iOS](https://apps.apple.com/us/app/x-gps-tracker/id802887190).

When it can be called depends on the task's state. Any caller can update values while the task is `unassigned`, `assigned`, or `arrived`, and the device must not be deleted. A sub-user holding the `completed_form_update` right can also update values once the task is `done`, `failed`, or `delayed`.

## API actions

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

The `values` object maps each form field ID, as a string, to a value object:

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

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

***

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

```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.

## Update form values

> Correct the values of a form already attached to a task.\
> \
> \*\*This is for correcting a submitted form, not for filling an empty one.\*\* The form must have been submitted at least once from the Mobile Tracker App, and the task's device must not be deleted.\
> \
> Allowed while the task is \`unassigned\`, \`assigned\` or \`arrived\`. A sub-user with the \`completed\_form\_update\` right may also act on a \`done\`, \`failed\` or \`delayed\` task. Anything else returns error 255.\
> \
> When a value fails validation the call returns error 242 and an \`errors\` array whose entries carry \`field\_id\`, a numeric \`code\`, and a message. The codes are listed on this page.\
> \
> Requires the \`task\_update\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Tasks","description":"Field service tasks: the places to visit, the routes and checkpoints they group into, the history of every change, and the forms field employees fill in. All resources under the /task/ 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":{"/task/form/values/update":{"post":{"tags":["Tasks"],"summary":"Update form values","description":"Correct the values of a form already attached to a task.\n\n**This is for correcting a submitted form, not for filling an empty one.** The form must have been submitted at least once from the Mobile Tracker App, and the task's device must not be deleted.\n\nAllowed while the task is `unassigned`, `assigned` or `arrived`. A sub-user with the `completed_form_update` right may also act on a `done`, `failed` or `delayed` task. Anything else returns error 255.\n\nWhen a value fails validation the call returns error 242 and an `errors` array whose entries carry `field_id`, a numeric `code`, and a message. The codes are listed on this page.\n\nRequires the `task_update` right.","operationId":"taskFormValuesUpdate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"integer","description":"ID of the task.","minimum":1},"values":{"type":"object","description":"Map of form field ID, as a string, to a value object. A value object carries a `type` matching the field type and a `value`. See the form fields and values reference.","additionalProperties":true}},"required":["task_id","values"]}}}},"responses":{"200":{"description":"Form values 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 101: the current user has the demo flag, and this operation is disabled in demo mode.","$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):

* 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:


---

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