update_custom_property

To create a custom property for an item or to update an existing one, use the item/update_custom_property method. To send a request, you should have the Edit not mentioned properties access right to the item.

Endpoint

Copied!
svc=item/update_custom_property&params={
  "itemId":<long>,
  "name":"<text>",
  "value":"<text>"
}

Parameters

The request must contain the following parameters:

Name Description
itemId Item ID.
name Custom property name.
value Custom property value. To delete the custom property, pass an empty string ("").

Returned result

If the request is completed successfully, a response in the following format is returned:

Copied!
{
	"n":"<text>",	/* custom property name */
	"v":"<text>"	/* custom property value */
}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters.
6 Undefined error.
7 Failed to fetch the item. The user may not have the Edit not mentioned properties access right to the item. The same error is returned while the account of the user is being moved to another data center.

If you find a mistake in the text, please select it and press Ctrl+Enter.