Get Started
Usage API
More information

PUT api/2.0/crm/{entityType}/customfield/{id} This function requires authentication

Description

Updates the selected custom field with the parameters (entity type, field title, type, etc.) specified in the request.

Parameters
Name Description Type Example
id
sent in url
Custom field ID number 1234
entityType
sent in url
New entity type
Allowed values: contact, person, company, opportunity, case
string some text
label
sent in body
New field title string some text
fieldType
sent in body
New custom field type
Allowed values: 0 (TextField), 1 (TextArea), 2 (SelectBox), 3 (CheckBox), 4 (Heading) or 5 (Date)
number 1234
position
sent in body
New field position
optional
number 1234
mask
sent in body
New mask
Sent in json format only
optional
string some text
Remark

You can update field if there are no related elements. If such elements exist, only label and mask will be updated. Other parameters will be ignored.

Example
PUT api/2.0/crm/some+text/customfield/1234
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "label": "some text",
  "fieldType": 1234,
  "position": 1234,
  "mask": "some text"
}
Returns

Updated custom field

Example Response

application/json

{
  "status": 0,
  "response": {
    "relativeItemsCount": 0,
    "entityId": 14523423,
    "label": "Birthdate",
    "fieldValue": "2021-11-26T04:36:28.0800400Z",
    "fieldType": 5,
    "position": 10,
    "mask": "",
    "id": 0
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <relativeItemsCount>0</relativeItemsCount>
    <entityId>14523423</entityId>
    <label>Birthdate</label>
    <fieldValue>2021-11-26T04:36:28.0800400Z</fieldValue>
    <fieldType>5</fieldType>
    <position>10</position>
    <mask></mask>
    <id>0</id>
  </response>
</result>