api-docs v5.116.0
API Docs
Table of contents
Form_Template
Form Template - Delete
Delete a specific form template
DELETE /form-templates/:id
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Examples
Example usage:
curl "https://yourdomain.com/form-templates/<form-template-id>" \
-X DELETE \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
id | string |
|
createdBy | string |
account uid |
createdAt | number |
timestamp |
facility | string |
|
type | string |
|
subtype | string |
|
name | string |
|
description | string |
|
template | string |
for printing, html layout that can be run thru templating engines like pug/jade/ejs. all data except template will be fed to the template for rendering |
items | object[] |
|
items.id | string |
Default value: auto-generated-id |
items.order | number |
|
items.set | string |
for categorizing, nesting |
items.question | string |
|
items.required | boolean |
|
items.type | string |
Allowed values: identification,multiplechoice,trueorfalse,checklist,date,time,year |
items.choices | string[] |
|
tags | string[] |
can be prefixed (e.g., restriction::uid:: |
meta | object |
|
hiddenBy | string |
account uid |
hiddenAt | number |
timestamp |
config | object |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
Form Template - Find
Get list of form templates
GET /form-templates
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Examples
Example usage:
curl "https://yourdomain.com/form-templates" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
formTemplates | object[] |
array of formTemplate |
formTemplates.id | string |
|
formTemplates.createdBy | string |
account uid |
formTemplates.createdAt | number |
timestamp |
formTemplates.facility | string |
|
formTemplates.type | string |
|
formTemplates.subtype | string |
|
formTemplates.name | string |
|
formTemplates.description | string |
|
formTemplates.template | string |
for printing, html layout that can be run thru templating engines like pug/jade/ejs. all data except template will be fed to the template for rendering |
formTemplates.items | object[] |
|
formTemplates.items.id | string |
Default value: auto-generated-id |
formTemplates.items.order | number |
|
formTemplates.items.set | string |
for categorizing, nesting |
formTemplates.items.question | string |
|
formTemplates.items.required | boolean |
|
formTemplates.items.type | string |
Allowed values: identification,multiplechoice,trueorfalse,checklist,date,time,year |
formTemplates.items.choices | string[] |
|
formTemplates.tags | string[] |
can be prefixed (e.g., restriction::uid:: |
formTemplates.meta | object |
|
formTemplates.hiddenBy | string |
account uid |
formTemplates.hiddenAt | number |
timestamp |
formTemplates.config | object |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
[
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
},
{
"id": "id-2",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
]
Form Template - Get
Get a specific form template
GET /form-templates/:id
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Examples
Example usage:
curl "https://yourdomain.com/form-templates/<form-template-id>" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
id | string |
|
createdBy | string |
account uid |
createdAt | number |
timestamp |
facility | string |
|
type | string |
|
subtype | string |
|
name | string |
|
description | string |
|
template | string |
for printing, html layout that can be run thru templating engines like pug/jade/ejs. all data except template will be fed to the template for rendering |
items | object[] |
|
items.id | string |
Default value: auto-generated-id |
items.order | number |
|
items.set | string |
for categorizing, nesting |
items.question | string |
|
items.required | boolean |
|
items.type | string |
Allowed values: identification,multiplechoice,trueorfalse,checklist,date,time,year |
items.choices | string[] |
|
tags | string[] |
can be prefixed (e.g., restriction::uid:: |
meta | object |
|
hiddenBy | string |
account uid |
hiddenAt | number |
timestamp |
config | object |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
Form Template - Patch
Update form template
PATCH /form-templates/:id
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Parameters - Parameter
Name | Type | Description |
---|---|---|
createdAt | number |
optional timestamp Default value: currentTime |
facility | string |
optional |
type | string |
|
subtype | string |
optional |
name | string |
optional |
description | string |
optional |
template | string |
optional for printing, html layout that can be run thru templating engines like pug/jade/ejs. all data except template will be fed to the template for rendering |
items | object[] |
optional |
items.id | string |
Default value: auto-generated-id |
items.order | number |
|
items.set | string |
for categorizing, nesting |
items.question | string |
|
items.required | boolean |
|
items.type | string |
Allowed values: identification,multiplechoice,trueorfalse,checklist,date,time,year |
items.choices | string[] |
|
tags | string[] |
optional can be prefixed (e.g., restriction::uid:: |
meta | object |
optional |
config | object |
optional |
hide | boolean |
optional operator |
Examples
Example usage:
curl "https://yourdomain.com/form-templates/<form-template-id>" \
-X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-token>" \
-d '{
"hide": true
}'
Parameters examples
json
- Request-Example
{
"hide": true
}
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
id | string |
|
createdBy | string |
account uid |
createdAt | number |
timestamp |
facility | string |
|
type | string |
|
subtype | string |
|
name | string |
|
description | string |
|
template | string |
for printing, html layout that can be run thru templating engines like pug/jade/ejs. all data except template will be fed to the template for rendering |
items | object[] |
|
items.id | string |
Default value: auto-generated-id |
items.order | number |
|
items.set | string |
for categorizing, nesting |
items.question | string |
|
items.required | boolean |
|
items.type | string |
Allowed values: identification,multiplechoice,trueorfalse,checklist,date,time,year |
items.choices | string[] |
|
tags | string[] |
can be prefixed (e.g., restriction::uid:: |
meta | object |
|
hiddenBy | string |
account uid |
hiddenAt | number |
timestamp |
config | object |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
Form Template - Post
Create form template
POST /form-templates
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Parameters - Parameter
Name | Type | Description |
---|---|---|
createdAt | number |
optional timestamp Default value: currentTime |
facility | string |
optional |
type | string |
|
subtype | string |
optional |
name | string |
optional |
description | string |
optional |
template | string |
optional for printing, html layout that can be run thru templating engines like pug/jade/ejs. all data except template will be fed to the template for rendering |
items | object[] |
optional |
items.id | string |
Default value: auto-generated-id |
items.order | number |
|
items.set | string |
for categorizing, nesting |
items.question | string |
|
items.required | boolean |
|
items.type | string |
Allowed values: identification,multiplechoice,trueorfalse,checklist,date,time,year |
items.choices | string[] |
|
tags | string[] |
optional can be prefixed (e.g., restriction::uid:: |
meta | object |
optional |
config | object |
optional |
Examples
Example usage:
curl "https://yourdomain.com/form-templates" \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-token>" \
-d '{
"type": "sample-type",
"facility": "facility-id"
}'
Parameters examples
json
- Request-Example
{
"type": "sample-type",
"facility": "facility-id"
}
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
id | string |
|
createdBy | string |
account uid |
createdAt | number |
timestamp |
facility | string |
|
type | string |
|
subtype | string |
|
name | string |
|
description | string |
|
template | string |
for printing, html layout that can be run thru templating engines like pug/jade/ejs. all data except template will be fed to the template for rendering |
items | object[] |
|
items.id | string |
Default value: auto-generated-id |
items.order | number |
|
items.set | string |
for categorizing, nesting |
items.question | string |
|
items.required | boolean |
|
items.type | string |
Allowed values: identification,multiplechoice,trueorfalse,checklist,date,time,year |
items.choices | string[] |
|
tags | string[] |
can be prefixed (e.g., restriction::uid:: |
meta | object |
|
hiddenBy | string |
account uid |
hiddenAt | number |
timestamp |
config | object |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}