> 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.md).

# Form

Attach a form to a task, read it, and download it.

These operations attach a [form](/docs/navixy-api/user-api/resources/field-service/form.md) to a [task](/docs/navixy-api/user-api/resources/field-service/task.md), read it back, and download it. A task carrying a form cannot be completed until the form is submitted, which is how a job is made to produce a record rather than just a completion.

Forms are filled by field employees in the Mobile Tracker App, for [Android](https://play.google.com/store/apps/details?id=com.navixy.xgps.tracker\&hl=ru) and [iOS](https://apps.apple.com/us/app/x-gps-tracker/id802887190). This API attaches and manages them.

For the field and value structures, see [Form fields and values](/docs/navixy-api/user-api/resources/field-service/form/field-types.md#form-fields-and-values). `task/form/list` is the exception on this page: it returns forms of every kind, not only task forms.

## API actions

API base path: `/task/form`.

***

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

## Attach form to task

> Attach a new form to an existing task or checkpoint. A form is always created from a form template.\
> \
> 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.\
> \
> Also accepts GET with the same parameters as query-string values.\
> \
> 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/create":{"post":{"tags":["Tasks"],"summary":"Attach form to task","description":"Attach a new form to an existing task or checkpoint. A form is always created from a form template.\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\nAlso accepts GET with the same parameters as query-string values.\n\nRequires the `task_update` right.","operationId":"taskFormCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"integer","description":"ID of the task or checkpoint to attach the form to.","minimum":1},"template_id":{"type":"integer","description":"ID of the form template to build the form from.","minimum":1}},"required":["task_id","template_id"]}}}},"responses":{"200":{"description":"Form attached","$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"},"409":{"description":"Error 247: the task already has a form attached.","$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 - if there is no task or template with such an ID, or task has the "route" type.
* 247 - Entity already exists - if task already has form attached to it.
* 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).

***

{% hint style="warning" %}
All form data will be lost!
{% endhint %}

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

## Delete task form

> Detach a form from its task. \*\*All data entered in the form is lost.\*\*\
> \
> Allowed while the task is \`unassigned\`, \`assigned\` or \`arrived\`. Anything else returns error 255.\
> \
> Also accepts GET with the same parameters as query-string values.\
> \
> 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/delete":{"post":{"tags":["Tasks"],"summary":"Delete task form","description":"Detach a form from its task. **All data entered in the form is lost.**\n\nAllowed while the task is `unassigned`, `assigned` or `arrived`. Anything else returns error 255.\n\nAlso accepts GET with the same parameters as query-string values.\n\nRequires the `task_update` right.","operationId":"taskFormDelete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"integer","description":"ID of the task the form is attached to.","minimum":1}},"required":["task_id"]}}}},"responses":{"200":{"description":"Form deleted","$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"},"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 - if there is no task with such an ID, or task has the "route" type, or it has no form attached.
* 255 - Invalid task state - if current task state is not `unassigned`, `assigned` or `arrived`.

***

## Download task form

> Return the form attached to a task rendered as a file.\
> \
> The response is the file itself, not a JSON envelope.\
> \
> 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":"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":{"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/download":{"post":{"tags":["Tasks"],"summary":"Download task form","description":"Return the form attached to a task rendered as a file.\n\nThe response is the file itself, not a JSON envelope.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"taskFormDownload","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"integer","description":"ID of the task.","minimum":1},"format":{"type":"string","description":"Format of the downloaded file.","enum":["xlsx","pdf"]}},"required":["task_id","format"]}}}},"responses":{"200":{"description":"The rendered form file","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"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"}}}}}}
```

#### 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 - if task does not exist or does not have attached form.

***

In addition to the data on the forms, the list contains data on the objects related to each form: tracker, vehicle, employee and task.

## List forms

> List forms created from a given template, or belonging to given tasks, with the related tracker, vehicle, employee and task for each.\
> \
> This is the one form operation that is not restricted to task forms.\
> \
> \*\*\`include\_unsubmitted\` is the only required parameter.\*\* \`ascending\` is not required, and a request carrying only \`include\_unsubmitted\` succeeds.\
> \
> Giving neither \`template\_id\` nor \`task\_ids\` is not rejected, but the list comes back empty, so one of them is needed in practice.\
> \
> 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":"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"}},"schemas":{"Period":{"type":"object","description":"A date and time range.","properties":{"from":{"type":"string","description":"Start of the range."},"to":{"type":"string","description":"End of the range."}}},"FormListEntry":{"type":"object","description":"One form in the list, with the records it relates to.","properties":{"form":{"allOf":[{"$ref":"#/components/schemas/Form"}],"description":"The form itself. Never null."},"task":{"type":"object","description":"The task the form belongs to: `id`, `label`, `from`, `to`, `creation_date`, `arrival_date`, `address`, `status`, `completion_date`, and `fact_duration`, how long the performer actually spent on it as an ISO 8601 duration.","additionalProperties":true},"employee":{"type":["object","null"],"description":"The employee who submitted it, when there is one.","additionalProperties":true},"tracker":{"type":["object","null"],"description":"The tracker involved, when there is one.","additionalProperties":true},"vehicle":{"type":["object","null"],"description":"The vehicle involved, when there is one.","additionalProperties":true},"submit_places":{"type":["object","null"],"description":"Where the form was submitted, and which places and geofences that location falls in. May be null.","properties":{"location":{"type":"object","description":"Where the form was submitted.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."}}},"places":{"type":"array","description":"Places containing the submission location. May be empty.","items":{"type":"object","additionalProperties":true}},"zones":{"type":"array","description":"Geofences containing the submission location. May be empty.","items":{"type":"object","additionalProperties":true}}}}}},"Form":{"type":"object","description":"A filled-in or fillable form. A form is created from a template and used once: after submission it is kept with its values for reference and cannot be reused.","properties":{"id":{"type":"integer","description":"Form ID."},"label":{"type":"string","description":"Form label, 1 to 100 characters.","minLength":1,"maxLength":100},"description":{"type":"string","description":"Form description. May be empty."},"fields":{"type":"array","description":"The form fields. See the form fields and values reference for the shape of each type.","items":{"type":"object","additionalProperties":true}},"created":{"type":"string","description":"When this form was created, or attached to its task. **Read-only.**","readOnly":true},"submit_in_zone":{"type":"boolean","description":"When `true`, the form can only be submitted inside the task zone."},"task_id":{"type":["integer","null"],"description":"ID of the task this form is attached to."},"checkin_id":{"type":["integer","null"],"description":"ID of the check-in this form belongs to, when it came from one."},"tracker_id":{"type":["integer","null"],"description":"ID of the tracker involved."},"template_id":{"type":["integer","null"],"description":"ID of the template this form was built from. **Null when that template has been deleted.**"},"template_version":{"type":["integer","null"],"description":"Version of the template at the time this form was created."},"values":{"type":["object","null"],"description":"The submitted values, keyed by field ID. **Null when the form has not been filled in.** See the form fields and values reference.","additionalProperties":true},"submitted":{"type":["string","null"],"description":"When the values were last submitted."},"submit_location":{"type":["object","null"],"description":"Where the values were last submitted.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."}}}}}},"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":{"/task/form/list":{"post":{"tags":["Tasks"],"summary":"List forms","description":"List forms created from a given template, or belonging to given tasks, with the related tracker, vehicle, employee and task for each.\n\nThis is the one form operation that is not restricted to task forms.\n\n**`include_unsubmitted` is the only required parameter.** `ascending` is not required, and a request carrying only `include_unsubmitted` succeeds.\n\nGiving neither `template_id` nor `task_ids` is not rejected, but the list comes back empty, so one of them is needed in practice.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"taskFormList","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"include_unsubmitted":{"type":"boolean","description":"Whether to include forms that have not been submitted yet."},"template_id":{"type":"integer","description":"Optional. Return forms built from this template.","minimum":1},"task_ids":{"type":"array","description":"Optional. Return forms belonging to these tasks. Between 1 and 5000 IDs.","items":{"type":"integer"},"minItems":1,"maxItems":5000},"order_by":{"type":"string","description":"Optional. Default `submitted`. Field to sort the list by.","enum":["task_id","created","submitted","task_address","submit_address","employee_full_name","vehicle_label","tracker_label","task_label","task_creation_date","task_from","task_to","task_arrival_date","task_completion_date","form_label","form_description"]},"ascending":{"type":"boolean","description":"Optional. Default `true`. Sort direction."},"filters":{"type":"object","description":"Optional. Narrow the list by field value. Conditions combine with logical AND. Every value except `task_id` is a partial match; `task_id` is exact.","properties":{"employee_full_name":{"type":"string","description":"Partial match against the associated employee's name."},"form_description":{"type":"string","description":"Partial match against the form description."},"form_label":{"type":"string","description":"Partial match against the form label."},"submit_address":{"type":"string","description":"Partial match against the address the form was submitted at."},"task_id":{"type":"integer","description":"Exact match against the task ID."},"task_address":{"type":"string","description":"Partial match against the task address."},"task_label":{"type":"string","description":"Partial match against the task label."},"tracker_label":{"type":"string","description":"Partial match against the tracker label."},"vehicle_label":{"type":"string","description":"Partial match against the vehicle label."}}},"submit_period":{"$ref":"#/components/schemas/Period"},"task_creation_period":{"$ref":"#/components/schemas/Period"},"task_from_period":{"$ref":"#/components/schemas/Period"},"task_to_period":{"$ref":"#/components/schemas/Period"},"task_arrival_period":{"$ref":"#/components/schemas/Period"},"task_completion_period":{"$ref":"#/components/schemas/Period"},"offset":{"type":"integer","description":"Optional. Default 0. Offset into the results, for pagination.","minimum":0},"limit":{"type":"integer","description":"Optional. Default 10000, maximum 100000. Number of forms to return.","minimum":0,"maximum":100000}},"required":["include_unsubmitted"]}}}},"responses":{"200":{"description":"Matching forms","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"count":{"type":"integer","description":"Total number of forms matching the query."},"list":{"type":"array","items":{"$ref":"#/components/schemas/FormListEntry"}}}}}}},"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"},"404":{"description":"Error 204: no form template with this ID belongs to the authorized user.","$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):

* 204 - Not found - if there is no form template with such ID belonging to authorized user.
* [General](/docs/navixy-api/general/errors.md#error-codes) types of errors.

***

current sub-user.

## Read task form

> Return the form attached to a task, together with every file associated with its fields, submitted or not.\
> \
> \`value\` is null when the task has no form.\
> \
> 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":"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"}},"schemas":{"Form":{"type":"object","description":"A filled-in or fillable form. A form is created from a template and used once: after submission it is kept with its values for reference and cannot be reused.","properties":{"id":{"type":"integer","description":"Form ID."},"label":{"type":"string","description":"Form label, 1 to 100 characters.","minLength":1,"maxLength":100},"description":{"type":"string","description":"Form description. May be empty."},"fields":{"type":"array","description":"The form fields. See the form fields and values reference for the shape of each type.","items":{"type":"object","additionalProperties":true}},"created":{"type":"string","description":"When this form was created, or attached to its task. **Read-only.**","readOnly":true},"submit_in_zone":{"type":"boolean","description":"When `true`, the form can only be submitted inside the task zone."},"task_id":{"type":["integer","null"],"description":"ID of the task this form is attached to."},"checkin_id":{"type":["integer","null"],"description":"ID of the check-in this form belongs to, when it came from one."},"tracker_id":{"type":["integer","null"],"description":"ID of the tracker involved."},"template_id":{"type":["integer","null"],"description":"ID of the template this form was built from. **Null when that template has been deleted.**"},"template_version":{"type":["integer","null"],"description":"Version of the template at the time this form was created."},"values":{"type":["object","null"],"description":"The submitted values, keyed by field ID. **Null when the form has not been filled in.** See the form fields and values reference.","additionalProperties":true},"submitted":{"type":["string","null"],"description":"When the values were last submitted."},"submit_location":{"type":["object","null"],"description":"Where the values were last submitted.","properties":{"lat":{"type":"number","description":"Latitude."},"lng":{"type":"number","description":"Longitude."},"address":{"type":"string","description":"Address at that point."}}}}},"FormFile":{"type":"object","description":"A file attached to a form field.","properties":{"id":{"type":"integer","description":"File ID."},"storage_id":{"type":"integer","description":"ID of the storage holding the file."},"user_id":{"type":"integer","description":"ID of the owning user."},"type":{"type":"string","description":"What kind of file this is.","enum":["image","file"]},"created":{"type":"string","description":"When the file record was created."},"uploaded":{"type":["string","null"],"description":"When the file was uploaded, or null if it has not been."},"name":{"type":"string","description":"File name."},"size":{"type":"integer","description":"Size in bytes. For a file that is not uploaded yet, the maximum size allowed for the upload."},"mime_type":{"type":"string","description":"MIME type of the file."},"metadata":{"type":"object","description":"Metadata for the file. For an image this carries `orientation`, the EXIF orientation.","additionalProperties":true},"state":{"type":"string","description":"Where the file is in its lifecycle.","enum":["created","in_progress","uploaded","deleted"]},"download_url":{"type":["string","null"],"description":"URL the file is available at, or null if it is not uploaded yet."},"bindings":{"type":"object","description":"Every entity this file is linked to. For a form field this carries `form_field` with `form_id`, `field_id` and `submitted`.","additionalProperties":true},"previews":{"type":["array","null"],"description":"Preview images for the file. May be null or empty for any file in any state.","items":{"type":"object","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":{"/task/form/read":{"post":{"tags":["Tasks"],"summary":"Read task form","description":"Return the form attached to a task, together with every file associated with its fields, submitted or not.\n\n`value` is null when the task has no form.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"taskFormRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"integer","description":"ID of the task.","minimum":1}},"required":["task_id"]}}}},"responses":{"200":{"description":"The form and its files","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"oneOf":[{"$ref":"#/components/schemas/Form"},{"type":"null"}],"description":"The form, or null when no form is attached."},"files":{"type":"array","description":"Files associated with this form's fields, both submitted and unsubmitted.","items":{"$ref":"#/components/schemas/FormFile"}}}}}}},"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"}}}}}}
```

#### 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 - if there is no task with such an ID, or task assigned to tracker unavailable to\\

## More in this section

#### Task form files

| Endpoint                                                                                                                   | Method | What it does     |
| -------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------- |
| [`/task/form/file/create`](/docs/navixy-api/user-api/resources/field-service/task/form/file.md#post-task-form-file-create) | POST   | Create form file |

#### Task form values

| Endpoint                                                                                                                         | Method | What it does       |
| -------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------ |
| [`/task/form/values/update`](/docs/navixy-api/user-api/resources/field-service/task/form/values.md#post-task-form-values-update) | POST   | Update form values |


---

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