For the complete documentation index, see llms.txt. This page is also available as Markdown.

Form templates

The reusable definition a single-use form is created from.

A form template is the definition a form is created from. The paper analogy is exact: the template is the printed master, and each form filled from it is one sheet, filled once and then kept as it was.

That separation is why the API works this way. A template's fields can be added, removed, or reordered over time, and none of that changes a form already filled, so an old form always reads exactly as it was submitted. It also means a user attaching a form to a task or a check-in picks a template rather than rebuilding the fields each time.

Form template object

The fields entries are described in Form fields and values.

API actions

API base path: /form/template.

Operations that list no errors of their own return only the general error codes.


List form templates

post
/form/template/list

List the form templates of the current user.

Callable with an empty body. Also accepts GET.

Authorizations
AuthorizationstringRequired

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.

Responses
200

The templates

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/form/template/list
POST /v2/form/template/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "list": [
    {
      "id": 1,
      "label": "text",
      "description": null,
      "version": 1,
      "fields": [
        {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      ],
      "created": "text",
      "updated": "text",
      "submit_in_zone": true,
      "default": true
    }
  ]
}

Required sub-user rights: form_template_update.

Create form template

post
/form/template/create

Create a form template, and return its ID.

A form is a one-shot entity: once someone fills it in, it is stored with its values for reference and cannot be reused. Templates exist so the same set of fields can be issued over and over, and so that changing the template later does not alter forms already filled in.

Requires the form_template_update right.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

The created template

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
idintegerOptional

ID of the new form template.

post/form/template/create
POST /v2/form/template/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 154

{
  "template": {
    "id": 1,
    "label": "text",
    "description": null,
    "version": 1,
    "fields": [
      {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ],
    "submit_in_zone": true,
    "default": true
  }
}
{
  "success": true,
  "id": 1
}

Errors

These errors come in addition to the general error codes:

  • 101 - In demo mode this function disabled - if current user has "demo" flag.


Read form template

post
/form/template/read

Return one form template by ID.

Also accepts GET with the same parameters as query-string values.

Authorizations
AuthorizationstringRequired

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.

Body
template_idinteger · min: 1Required

ID of the form template.

Responses
200

The template

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/form/template/read
POST /v2/form/template/read HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "template_id": 1
}
{
  "success": true,
  "value": {
    "id": 1,
    "label": "text",
    "description": null,
    "version": 1,
    "fields": [
      {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ],
    "created": "text",
    "updated": "text",
    "submit_in_zone": true,
    "default": true
  }
}

Errors

These errors come in addition to the general error codes:

  • 201 - Not found in the database - if there is no template with such an ID.


Required sub-user rights: form_template_update.

Update form template

post
/form/template/update

Update a form template. Pass a full template object including its id.

Forms already created from this template are not changed. Each keeps the fields it was issued with, which is the reason templates and forms are separate entities. version increments on every modification.

Requires the form_template_update right.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

Template updated

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/form/template/update
POST /v2/form/template/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 154

{
  "template": {
    "id": 1,
    "label": "text",
    "description": null,
    "version": 1,
    "fields": [
      {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ],
    "submit_in_zone": true,
    "default": true
  }
}
{
  "success": true
}

Errors

These errors come in addition to the general error codes:

  • 101 - In demo mode this function disabled - if current user has "demo" flag.

  • 201 - Not found in the database - if there is no template with such an ID.


Required sub-user rights: form_template_update.

Delete form template

post
/form/template/delete

Delete a form template by ID.

Forms already created from it survive, with template_id set to null.

Also accepts GET with the same parameters as query-string values.

Requires the form_template_update right.

Authorizations
AuthorizationstringRequired

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.

Body
template_idinteger · min: 1Required

ID of the form template to delete.

Responses
200

Template deleted

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/form/template/delete
POST /v2/form/template/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "template_id": 1
}
{
  "success": true
}

Errors

These errors come in addition to the general error codes:

  • 101 - In demo mode this function disabled - if current user has "demo" flag.

  • 201 - Not found in the database - if there is no template with such an ID.


Required sub-user rights: none.

Read template usage

post
/form/template/stats/read

Return how many tasks and task schedules use a form template.

Useful before deleting a template, to see what is still relying on it.

Also accepts GET with the same parameters as query-string values.

Authorizations
AuthorizationstringRequired

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.

Body
template_idinteger · min: 1Required

ID of the form template.

Responses
200

The usage counts

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
scheduledintegerOptional

Number of task schedules using this template.

post/form/template/stats/read
POST /v2/form/template/stats/read HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "template_id": 1
}
{
  "success": true,
  "tasks": {
    "unassigned": 1,
    "assigned": 1,
    "done": 1,
    "failed": 1,
    "delayed": 1,
    "arrived": 1,
    "faulty": 1
  },
  "scheduled": 1
}

Errors

These errors come in addition to the general error codes:

  • 201 - Not found in the database - if template with the specified ID does not exist.

Last updated

Was this helpful?