The PATCH action is an alternative to the traditional GET, POST, PUT, or DELETE verbs. Where available, it lets you submit only the fields that should be changed without having to load a full item beforehand.
Calls to PATCH endpoints should contain a
JSON Patch document
in the request body. This document is an array of patch operations represented as
JsonPatchOperation instances.
This generally follows the JSON Patch standard, with the following exceptions:
/- index cannot be used.
add and copy
operations cannot be used to add new properties. Similarly, the remove and
move operations cannot remove properties — only clear them.
test operation is not currently supported.
Custom Attributes are accessed by their ID rather than their position in the collection. Only the
value of the attribute needs to be submitted — not a full CustomAttribute
instance. For choice-based attributes, the value is a string containing the ID of the selected
choice, or a comma-separated list of IDs for multi-select attributes.
For an item with Title and Account properties and a custom attributes
collection named Attributes, the following request body sets the title, account, and
a custom attribute with ID 1234, and clears the custom attribute with ID 5678.
[
{"op": "add", "path": "/title", "value": "Updated Title"},
{"op": "add", "path": "/accountid", "value": 47},
{"op": "add", "path": "/attributes/1234", "value": "New Attribute Value"},
{"op": "remove", "path": "/attributes/5678"}
]