PUT api/2.0/crm/{entityType}/customfield/{id}
Updates the selected custom field with the parameters (entity type, field title, type, etc.) specified in the request.
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
|
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.
PUT api/2.0/crm/%22some+text%22/customfield/1234
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json
{
"label": "some text",
"fieldType": 1234,
"position": 1234,
"mask": "some text"
}
application/json
{
"status": 0,
"response": {
"RelativeItemsCount": 0,
"id": 1234,
"EntityId": 14523423,
"Label": "Birthdate",
"FieldValue": "2020-12-08T17:37:04.5916406Z",
"FieldType": 5,
"Position": 10,
"Mask": ""
}
}
text/xml
<result>
<status>0</status>
<response>
<RelativeItemsCount>0</RelativeItemsCount>
<id>1234</id>
<EntityId>14523423</EntityId>
<Label>Birthdate</Label>
<FieldValue>2020-12-08T17:37:04.5916406Z</FieldValue>
<FieldType>5</FieldType>
<Position>10</Position>
<Mask />
</response>
</result>