Update Custom Field

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

This API helps in updating custom field data.

Endpoints

OAuth Scope

WorkDrive.datatemplates.UPDATECopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request PATCH \
  --url https://www.zohoapis.com/workdrive/api/v1/customfields/{custom_field_id} \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/vnd.api+json' \
  --data '{"data":{"attributes":{"display_name":"Candidate Role","field_properties":{"is_mandatory":false},"choices":[{"operation":"add","key":"Quality Analyst"},{"value":"Designer","operation":"update","key":"Designers"},{"operation":"delete","key":"Marketer"}]},"type":"customfields"}}'

Path Parameters

custom_field_idstring(Required)

A unique ID of the custom field.

Request Body

application/vnd.api+json
dataJSON Object(Required)
Hide Sub-Attributes
attributesJSON Object(Required)
Hide Sub-Attributes
display_namestring(Optional)

A name for the custom field.

field_propertiesJSON Object(Optional)

This represents the variables used for different data types.
Refer to this table for all supported custom field data types with supported field properties.

Show Sub-Attributes
is_mandatoryboolean(Optional)

Set true to make this custom field mandatory.

choicesJSON Array(Optional)

This represents the list of choices for choice type custom fields (dropdown, radio, checkbox).

To add any choice to the existing choice list

Eg: {key:"choice3", "operation":"add"}

To update any existing choice in the choice list

Eg: {key:"choice1", value:"choice4","operation":"update"}


To delete any existing choice in the choice list

Eg: {key:"choice2","operation":"delete"}

Show Sub-Attributes
valuestring(Optional)

Updated value for the existing choice item.

operationstring(Optional)

Operation to apply on this choice item: add, update, or delete.

keystring(Optional)

Display value for this choice item.

typestring(Required)

The JSON:API resource type. Always "customfields".

Allowed Values :
Show Values
customfieldsCopied!
Copied!Copy all as JSON Array

Body Parameters

Copied!
  {
    "data": {
      "attributes": {
        "display_name": "Candidate Role",
        "field_properties": {
          "is_mandatory": false
        },
        "choices": [
          {
            "operation": "add",
            "key": "Quality Analyst"
          },
          {
            "value": "Designer",
            "operation": "update",
            "key": "Designers"
          },
          {
            "operation": "delete",
            "key": "Marketer"
          }
        ]
      },
      "type": "customfields"
    }
  }
                
Show full

Response Example

CF069

CF069

CF037

CF004

F000

CF080

CF070

CF081

CF082

CF083

CF051

CF031

CF077

CF067

CF078

CF079

200
200
500
Copied!
  {
    "data": {
      "id": "nrkroc4c5f3259e2a410da17c3915ea990dde-MjQwMDAwMDA1ODEwMDEtMjQwMDAwMDA1ODIwMDI",
      "type": "customfields",
      "attributes": {
        "column_name": "CF61",
        "index": 1,
        "display_name": "Candidate Role",
        "type": "dropdown",
        "field_properties": {
          "description": "Role of the candidate",
          "is_mandatory": false,
          "default_value": ""
        },
        "choices": [
          {
            "key": "Developer"
          },
          {
            "key": "Designer"
          },
          {
            "key": "Quality Analyst"
          }
        ]
      },
      "links": {
        "self": "https://www.zohoapis.com/workdrive/api/v1/customfields/nrkroc4c5f3259e2a410da17c3915ea990dde-MjQwMDAwMDA1ODEwMDEtMjQwMDAwMDA1ODIwMDI"
      }
    }
  }
                
  {
    "errors": [
      {
        "id": "CF069",
        "title": "Invalid or duplicate option key"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF037",
        "title": "This template is not enabled"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF004",
        "title": "Custom fields input does not match any object in db"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F000",
        "title": "General Exception"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF080",
        "title": "Maximum dropdown/radio limit reached for this data template"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF070",
        "title": "Invalid operation"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF081",
        "title": "Maximum checkbox options limit reached for this data template"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF082",
        "title": "Date value cannot be in the past"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF083",
        "title": "Date value cannot be in the future"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF051",
        "title": "Empty customField Name is not allowed"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF031",
        "title": "CustomFieldName already exists in this template"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF077",
        "title": "Maximum custom field limit reached for this data template"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF067",
        "title": "Custom Fields position exceeds the limit"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF078",
        "title": "Maximum multi-line field limit reached for this data template"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "CF079",
        "title": "Maximum choice field (checkbox) limit reached for this data template"
      }
    ]
  }
                
Show full