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 the form templates of the current user.
Callable with an empty body. Also accepts GET.
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.
The templates
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
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 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.
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.
The created template
true if request finished successfully.
trueID of the new form template.
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.
Error 101: the current user has the demo flag, and this operation is disabled in demo mode.
Error response object
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.
Return one form template by ID.
Also accepts GET with the same parameters as query-string values.
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.
ID of the form template.
The template
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
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 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.
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.
Template updated
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 101: the current user has the demo flag, and this operation is disabled in demo mode.
Error response object
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 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.
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.
ID of the form template to delete.
Template deleted
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 101: the current user has the demo flag, and this operation is disabled in demo mode.
Error response object
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.
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.
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.
ID of the form template.
The usage counts
true if request finished successfully.
trueNumber of task schedules using this template.
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.
Error response object
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?