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

# Form

Structured information collected from a field employee when they complete a task or check in.

A form collects structured information from a field employee at the moment they finish something: a customer's name, a delivery date, a signature, a photo. It is filled from the Mobile Tracker App, and a form attached to a task blocks that task from completing until it is submitted.

A form is single-use. Each one is created from a [template](/docs/navixy-api/user-api/resources/field-service/form/template.md) and, once filled, is stored with its values for good. That separation is deliberate: a template can change over time without altering any form already filled from it.

This API only attaches and fills forms on **tasks**. Check-in forms are created from the mobile application. For working with task forms, see [Task forms](/docs/navixy-api/user-api/resources/field-service/task/form.md), and for the field and value structures, see [Form fields and values](/docs/navixy-api/user-api/resources/field-service/form/field-types.md). For a walkthrough, see [how to use task forms](/docs/navixy-api/user-api/guides/field-service-management/create-forms.md).

## Form object

## The Form object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"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."}}}}}}}}
```

The `fields` and `values` entries are described in [Form fields and values](/docs/navixy-api/user-api/resources/field-service/form/field-types.md).

## Form file object

## The FormFile object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"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}}}}}}}
```

## API actions

API base path: `/form`.

***

## Read form

> Return a form by ID, together with the files used in its values.\
> \
> 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":"Forms","description":"Forms and the templates they are issued from. All resources under the /form/ path. Forms attached to tasks are under /task/form/ and carry the Tasks tag."}],"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":{"/form/read":{"post":{"tags":["Forms"],"summary":"Read form","description":"Return a form by ID, together with the files used in its values.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"formRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the form.","minimum":1}},"required":["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":{"$ref":"#/components/schemas/Form"},"files":{"type":"array","description":"Files used in the values of this form. May be null or empty.","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 form with such an ID.

***

## Download form

> Return a form rendered as a file.\
> \
> The response is the file itself, not a JSON envelope, unless an error occurs.\
> \
> 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":"Forms","description":"Forms and the templates they are issued from. All resources under the /form/ path. Forms attached to tasks are under /task/form/ and carry the Tasks tag."}],"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":{"/form/download":{"post":{"tags":["Forms"],"summary":"Download form","description":"Return a form rendered as a file.\n\nThe response is the file itself, not a JSON envelope, unless an error occurs.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"formDownload","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the form.","minimum":1},"format":{"type":"string","description":"File format of the rendered form.","enum":["pdf","xlsx"]}},"required":["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 there is no form with such an ID.

## More in this section

#### Form templates

| Endpoint                                                                                                                        | Method | What it does         |
| ------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------- |
| [`/form/template/list`](/docs/navixy-api/user-api/resources/field-service/form/template.md#post-form-template-list)             | POST   | List form templates  |
| [`/form/template/create`](/docs/navixy-api/user-api/resources/field-service/form/template.md#post-form-template-create)         | POST   | Create form template |
| [`/form/template/read`](/docs/navixy-api/user-api/resources/field-service/form/template.md#post-form-template-read)             | POST   | Read form template   |
| [`/form/template/update`](/docs/navixy-api/user-api/resources/field-service/form/template.md#post-form-template-update)         | POST   | Update form template |
| [`/form/template/delete`](/docs/navixy-api/user-api/resources/field-service/form/template.md#post-form-template-delete)         | POST   | Delete form template |
| [`/form/template/stats/read`](/docs/navixy-api/user-api/resources/field-service/form/template.md#post-form-template-stats-read) | POST   | Read template usage  |


---

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