All pages
Powered by GitBook
1 of 1

Loading...

Field values

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.

Follow the same instructions as to overwrite the existing number.

To delete the number, use the API and set the value attribute to null.

Use the API.

The value attribute is either a string or an array of strings.

Follow the same instructions as to overwrite the existing option(s).

To delete all the options, use the API and set the value attribute to [] or null.

Use the API.

The value attribute is a date as a string, in the format yyyy-mm-dd.

Follow the same instructions as to overwrite the existing date.

To delete the date, use the API and set the value attribute to null.

Use the API. The value attribute is a JSON object or an array of JSON objects, representing either a user or a group.

Alternatively, you can use the 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.

Use the API. The value attribute is a JSON object representing the user or group you wish to delete

Use the 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.

Use the API and set the value attribute to [] or null to delete all the files from the checklist field.

Alternatively, use the API to delete a single file from the checklist field.

Use the API. You do not need to send anything in the payload to generate the PDF.

Use the API. When creating a revision, you can specify the following options:

  • A comment (revision notes)

  • Data to copy over

    • Metadata

Use the API. When requesting an approval, you can specify users and groups that can sign the approval.

Use the 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

Use the API and set the revision attribute to true.

Use the API. The value attribute would match the payload used in the API.

To add more values, the same API can be used. It will not overwrite existing values.

Use the API. The value attribute is an array of record ID's. This will overwrite any existing records present in the field.

Alternatively, you can use the API and specify a single record ID. This will "append" a value to the existing values, without overwriting them.

To delete all the values, use the API and set the value attribute to null or [].

To delete a single value, use the API and specify the value to be deleted in the payload.

Use the API. The value attribute would match the payload used in the API.

Use the API. The value attribute is an array of objects. This will overwrite any existing records present in the field.

Alternatively, you can use the API and specify a single record ID. This will "append" a value to the existing values, without overwriting them.

If you set linkAllVersions to true in and , 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.

To delete a single value, use the API and specify the value to be deleted in the payload.

Use the API and specify the form template id.

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.

Use the API and specify the form instance ID in the payload.

Checklist field values
{
    "value": 10
}
{
    "value": null
}
{
    "value": ["abc","xyz"]
}
{
    "value": null
}
{
    "value": "1999-12-15"
}
{
    "value": null
}
{
  "value": [
    {
      "type": "user",
      "uid": "jA6d4gH0oMfGd90uKCrFyjMnrvt2"
    },
    {
      "id": 1098,
      "type": "group"
    }
  ]
}
{
  "value": {
    "id": 2000,
    "type": "group"
  }
}
{
  "value": {
    "id": 1098,
    "type": "group"
  }
}
{
  "value": {
    "name": "a4e0580a-a7dd-469f-a373-a852e9efb684",
    "versionId": "7Pq5poXyVwHTJAzaEwS7ZYj9FdEXzkSi",
    "size": 124243,
    "originalName": "1280px-Giant_Panda_2.jpg",
    "folderId": null
  }
}
{
  "value": []
}
{
  "value": "a4e0580a-a7dd-469f-a373-a852e9efb684"
}
{
  "value": {
    "comment": "abc",
    "clone": {
      "metadata": [
        "title",
        "owner",
        "members",
        "dueDate",
        "files",
        "messages"
      ],
      "checklistFields": [
        340441,
        341220,
        341221,
        341222
      ]
    }
  }
}
{
  "value": {
    "requestApproval": true,
    "config": {
      "approvers": {
        "groups": [],
        "users": [
          "jA6d4gH0oMfGd90uKCrFyjMnrvt2"
        ]
      },
      "minApprovers": 1
    }
  }
}
{
  "value": {
    "customSignature": true,
    "approved": true,
    "comment": "abc",
    "username": "abc@unifize.com",
    "password": "password"
  }
}
{
  "value": {
    "revision": true,
    "comment": "abc"
  }
}
{
  "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"
  }
}
{
  "value": [
    1453412,
    1453413
  ]
}
{
  "value": 1453413
}
{
  "value": []
}
{
  "value": 1453413
}
{
  "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
}
{
  "value": [
    {
      "chatroom": 1453412, 
      "linkAllVersions" true
    },
    { 
      "chatroom": 1453413, 
      "linkAllVersions" true
    }
  ]
}
{
  "value": {
    "chatroom": 1453413, 
    "linkAllVersions" true
  }
}
{
  "value": {
    "originChatroomId": 1453413
  }
}
{
  "value": {
    "templateId": 18585
  }
}
{
  "value": 235224
}

Updating number

Clearing number

Picklist field

Filling an option

Deleting option

Clearing options

Date field

Filling a date

Updating date

Clearing date

User field

Filling a user/group

Deleting a user/group

File field

Attaching a file

Removing file(s)

PDF field

Revision field

Approval field

Requesting an Approval (Adhoc)

Signing an Approval

Canceling an Approval

Conversation field (Parent/Child)

Create new record

Select existing record

Delete conversation

Linked field

Create new record

Select existing record

Linking specific record revisions

Delete record

Form field

Creating a form instance

Filling/updating/deleting a field value inside a form

The responses of Update field value and Get field value APIs for a form field will include two identifiers which might be confusing to distinguish.

  • templateId This is the ID of the form template. It will remain constant throughout the form instances, across chatrooms. This is the ID you should use when creating a form instance.

  • id This is the ID of the unique, individual form instance. This is the ID you should use when filling a field inside a form.

Deleting a form instance

Create field value
Create field value
Create field value
Create field value
Create field value
Create field value
Update field value
Delete field value
Update field value
Create field value
Delete field value
Create field value
Create field value
Create field value
Create field value
Create field value
Create field value
Create record
Create field value
Update field value
Create field value
Delete field value
Update field value
Create record
Create field value
Update field value
Delete field value
Update field value
Delete field value
Filling a number
Filling an option
Filling a date
Create new record
Select existing record

Get field value

get
Path parameters
idintegerRequired

ID of the chatroom

Example: 25
fidintegerRequired

ID of the checklist field

Example: 3
Responses
200

Success

application/json
fieldIdintegerRequired

Field ID

Example: 25
fieldTypestringRequired

Field type

Example: text
attrsstringRequired

Attributes of the Checklist field

Example: {"~#text":{"label":"Any text","autoCheck":false,"settings":"{\"multiline\":true}"}}
targetbooleanRequired

Flag indicating if it's a target

Example: false
typestringRequired

Attributes of the Checklist field

Example: {"~#text":{"label":"Any text","autoCheck":false,"settings":"{\"multiline\":true}"}}
chatroomIdintegerRequired

ID of the chatroom

Example: 91
valueanyRequired

Value of the Checklist field

Example: Quantity
typestringRequired

Type of the value

Example: text
valuestringRequired

Value of the Checklist field

Example: Quantity
get/chatroom/{id}/checklist-field/{fid}
GET /chatroom/{id}/checklist-field/{fid} HTTP/1.1
Accept: */*
200

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"
}

Create field value

post
Path parameters
idintegerRequired

ID of the record

Example: 25
fidintegerRequired

Field ID

Example: 3
Body
valueanyRequired

Value

Example: 22
checkedbooleanOptional

Boolean indicating if the field is checked

Example: true
Responses
200

Success

application/json
fieldIdintegerRequired

Field ID

Example: 25
fieldTypestringRequired

Field type

Example: text
attrsstringRequired

Attributes of the Checklist field

Example: {"~#text":{"label":"Any text","autoCheck":false,"settings":"{\"multiline\":true}"}}
targetbooleanRequired

Flag indicating if it's a target

Example: false
typestringRequired

Attributes of the Checklist field

Example: {"~#text":{"label":"Any text","autoCheck":false,"settings":"{\"multiline\":true}"}}
chatroomIdintegerRequired

ID of the chatroom

Example: 91
valueanyRequired

Value of the Checklist field

Example: Quantity
typestringRequired

Type of the value

Example: text
valuestringRequired

Value of the Checklist field

Example: Quantity
post/chatroom/{id}/checklist-field/{fid}
POST /chatroom/{id}/checklist-field/{fid} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "value": 22,
  "checked": true
}
200

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"
}

Update field value

patch
Path parameters
idintegerRequired

ID of the record

Example: 25
fidintegerRequired

Field ID

Example: 3
Body
valueanyRequired

Value

Example: 22
checkedbooleanOptional

Boolean indicating if the field is checked

Example: true
Responses
200

Success

application/json
fieldIdintegerRequired

Field ID

Example: 25
fieldTypestringRequired

Field type

Example: text
attrsstringRequired

Attributes of the Checklist field

Example: {"~#text":{"label":"Any text","autoCheck":false,"settings":"{\"multiline\":true}"}}
targetbooleanRequired

Flag indicating if it's a target

Example: false
typestringRequired

Attributes of the Checklist field

Example: {"~#text":{"label":"Any text","autoCheck":false,"settings":"{\"multiline\":true}"}}
chatroomIdintegerRequired

ID of the chatroom

Example: 91
valueanyRequired

Value of the Checklist field

Example: Quantity
typestringRequired

Type of the value

Example: text
valuestringRequired

Value of the Checklist field

Example: Quantity
patch/chatroom/{id}/checklist-field/{fid}
PATCH /chatroom/{id}/checklist-field/{fid} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "value": 22,
  "checked": true
}
200

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"
}

Delete field value

delete
Path parameters
idintegerRequired

ID of the record

Example: 25
fidintegerRequired

Field ID

Example: 3
Responses
204

No Content

No content

delete/chatroom/{id}/checklist-field/{fid}/value
DELETE /chatroom/{id}/checklist-field/{fid}/value HTTP/1.1
Accept: */*
204

No Content

No content