Field values
ID of the chatroom
25
ID of the checklist field
3
GET /chatroom/{id}/checklist-field/{fid} HTTP/1.1
Host:
Accept: */*
Success
{
"fieldId": 25,
"fieldType": "text",
"attrs": "{\"~#text\":{\"label\":\"Any text\",\"autoCheck\":false,\"settings\":\"{\\\"multiline\\\":true}\"}}",
"target": false,
"type": "{\"~#text\":{\"label\":\"Any text\",\"autoCheck\":false,\"settings\":\"{\\\"multiline\\\":true}\"}}",
"chatroomId": 91,
"val": {
"value": "Quantity",
"type": "text"
},
"value": "Quantity"
}
ID of the record
25
Field ID
3
Value
22
Boolean indicating if the field is checked
true
POST /chatroom/{id}/checklist-field/{fid} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"value": 22,
"checked": true
}
Success
{
"fieldId": 25,
"fieldType": "text",
"attrs": "{\"~#text\":{\"label\":\"Any text\",\"autoCheck\":false,\"settings\":\"{\\\"multiline\\\":true}\"}}",
"target": false,
"type": "{\"~#text\":{\"label\":\"Any text\",\"autoCheck\":false,\"settings\":\"{\\\"multiline\\\":true}\"}}",
"chatroomId": 91,
"val": {
"value": "Quantity",
"type": "text"
},
"value": "Quantity"
}
ID of the record
25
Field ID
3
Value
22
Boolean indicating if the field is checked
true
PATCH /chatroom/{id}/checklist-field/{fid} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"value": 22,
"checked": true
}
Success
{
"fieldId": 25,
"fieldType": "text",
"attrs": "{\"~#text\":{\"label\":\"Any text\",\"autoCheck\":false,\"settings\":\"{\\\"multiline\\\":true}\"}}",
"target": false,
"type": "{\"~#text\":{\"label\":\"Any text\",\"autoCheck\":false,\"settings\":\"{\\\"multiline\\\":true}\"}}",
"chatroomId": 91,
"val": {
"value": "Quantity",
"type": "text"
},
"value": "Quantity"
}
Examples
The examples below will take you through filling in the checklist of your record, for all kinds of checklists fields.
Text field
Filling text
Use the Create field value API.
The value
attribute is a plaintext string.
{
"value": "Some text"
}
Modifying text
Follow the same instructions as Field values to overwrite existing text.
Clear text
To clear all text, use the Create field value API and set the value
attribute to an empty string.
{
"value": ""
}
Number field
Filling a number
Use the Create field value API.
The value
attribute is a numerical value.
{
"value": 10
}
Updating number
Follow the same instructions as Filling a number to overwrite the existing number.
Clearing number
To delete the number, use the Create field value API and set the value
attribute to null
.
{
"value": null
}
Picklist field
Filling an option
Use the Create field value API.
The value
attribute is either a string or an array of strings.
{
"value": ["abc","xyz"]
}
Deleting option
Follow the same instructions as Filling an option to overwrite the existing option(s).
Clearing options
To delete all the options, use the Create field value API and set the value
attribute to []
or null
.
{
"value": null
}
Date field
Filling a date
Use the Create field value API.
The value
attribute is a date as a string, in the format yyyy-mm-dd
.
{
"value": "1999-12-15"
}
Updating date
Follow the same instructions as Filling a date to overwrite the existing date.
Clearing date
To delete the date, use the Create field value API and set the value
attribute to null
.
{
"value": null
}
User field
Filling a user/group
Use the Create field value API. The value
attribute is a JSON object or an array of JSON objects, representing either a user or a group.
{
"value": [
{
"type": "user",
"uid": "jA6d4gH0oMfGd90uKCrFyjMnrvt2"
},
{
"id": 1098,
"type": "group"
}
]
}
Alternatively, you can use the Update field value API and specify a single user or group instead of all of them. This will effectively append a value to the existing values instead of overwriting them.
{
"value": {
"id": 2000,
"type": "group"
}
}
Deleting a user/group
Use the Delete field value API. The value
attribute is a JSON object representing the user or group you wish to delete
{
"value": {
"id": 1098,
"type": "group"
}
}
File field
Attaching a file
Use the Update field value API.
You must first upload your file using the Upload file API. Then, you can attach it to the checklist using the file id and version id.
{
"value": {
"name": "a4e0580a-a7dd-469f-a373-a852e9efb684",
"versionId": "7Pq5poXyVwHTJAzaEwS7ZYj9FdEXzkSi",
"size": 124243,
"originalName": "1280px-Giant_Panda_2.jpg",
"folderId": null
}
}
Removing file(s)
Use the Create field value API and set the value attribute to [] or null to delete all the files from the checklist field.
{
"value": []
}
Alternatively, use the Delete field value API to delete a single file from the checklist field.
{
"value": "a4e0580a-a7dd-469f-a373-a852e9efb684"
}
PDF field
Use the Create field value API. You do not need to send anything in the payload to generate the PDF.
Revision field
Use the Create field value API. When creating a revision, you can specify the following options:
A comment (revision notes)
Data to copy over
Metadata
Checklist field values
{
"value": {
"comment": "abc",
"clone": {
"metadata": [
"title",
"owner",
"members",
"dueDate",
"files",
"messages"
],
"checklistFields": [
340441,
341220,
341221,
341222
]
}
}
}
Approval field
Requesting an Approval (Adhoc)
Use the Create field value API. When requesting an approval, you can specify users and groups that can sign the approval.
{
"value": {
"requestApproval": true,
"config": {
"approvers": {
"groups": [],
"users": [
"jA6d4gH0oMfGd90uKCrFyjMnrvt2"
]
},
"minApprovers": 1
}
}
}
Signing an Approval
Use the Create field value API. When signing, you can specify the following options:
Whether to use a custom signature or the default one
Whether to approve or reject
A comment
Your email and password
{
"value": {
"customSignature": true,
"approved": true,
"comment": "abc",
"username": "[email protected]",
"password": "password"
}
}
Canceling an Approval
Use the Create field value API and set the revision
attribute to true
.
{
"value": {
"revision": true,
"comment": "abc"
}
}
Conversation field (Parent/Child)
Create new record
Use the Create field value API. The value
attribute would match the payload used in the Create record API.
{
"value": {
"title": "abc",
"type": "workflow",
"owner": "jA6d4gH0oMfGd90uKCrFyjMnrvt2",
"creator": "jA6d4gH0oMfGd90uKCrFyjMnrvt2",
"members": [
"jA6d4gH0oMfGd90uKCrFyjMnrvt2"
],
"templateId": 16650,
"description": "",
"orgId": 222,
"groups": [],
"parent": 1453392,
"numberingScheme": "API Docs Conv ###",
"checklists": [],
"privacy": "none"
}
}
To add more values, the same API can be used. It will not overwrite existing values.
Select existing record
Use the Create field value API. The value
attribute is an array of record ID's. This will overwrite any existing records present in the field.
{
"value": [
1453412,
1453413
]
}
Alternatively, you can use the Update field value API and specify a single record ID. This will "append" a value to the existing values, without overwriting them.
{
"value": 1453413
}
Delete conversation
To delete all the values, use the Create field value API and set the value
attribute to null
or []
.
{
"value": []
}
To delete a single value, use the Delete field value API and specify the value to be deleted in the payload.
{
"value": 1453413
}
Linked field
Create new record
Use the Update field value API. The value
attribute would match the payload used in the Create record API.
{
"value": {
"chatroom": {
"title": "abc",
"type": "workflow",
"owner": "jA6d4gH0oMfGd90uKCrFyjMnrvt2",
"creator": "jA6d4gH0oMfGd90uKCrFyjMnrvt2",
"members": [
"jA6d4gH0oMfGd90uKCrFyjMnrvt2"
],
"templateId": 16650,
"description": "",
"orgId": 222,
"groups": [],
"parent": 1453392,
"numberingScheme": "API Docs Conv ###",
"checklists": [],
"privacy": "none"
}
},
"linkAllVersions": true
}
Select existing record
Use the Create field value API. The value
attribute is an array of objects. This will overwrite any existing records present in the field.
{
"value": [
{
"chatroom": 1453412,
"linkAllVersions" true
},
{
"chatroom": 1453413,
"linkAllVersions" true
}
]
}
Alternatively, you can use the Update field value API and specify a single record ID. This will "append" a value to the existing values, without overwriting them.
{
"value": {
"chatroom": 1453413,
"linkAllVersions" true
}
}
Linking specific record revisions
If you set linkAllVersions
to true
in Create new recordand Select existing record, all of the revisions of the linked record will also be automatically linked.
To link only a specific revision, you can remove that attribute from the payload.
Delete record
To delete a single value, use the Delete field value API and specify the value to be deleted in the payload.
{
"value": {
"originChatroomId": 1453413
}
}
Form field
Creating a form instance
Use the Update field value API and specify the form template id.
{
"value": {
"templateId": 18585
}
}
Filling/updating/deleting a field value inside a form
See the above examples on how to fill the different types of fields.
Filling them when they are inside a form is exactly the same, but you will need to specify the formId query parameter when calling any of the APIs.
Deleting a form instance
Use the Delete field value API and specify the form instance ID in the payload.
{
"value": 235224
}
Last updated