Update an item in a list
Update the properties on a listItem.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Sites.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | Sites.ReadWrite.All |
HTTP request
PATCH /sites/{site-id}/lists/{list-id}/items/{item-id}/fields
Optional request headers
Name | Value | Description |
---|---|---|
if-match | etag | If this request header is included and the eTag provided does not match the current eTag on the item, a 412 Precondition Failed response is returned and the item will not be updated. |
Request body
In the request body, supply a JSON representation of a fieldValueSet specifying the fields to update.
Example
Here is an example that updates the Color and Quantity fields of the list item with new values. All other values on the listItem are left alone.
PATCH /sites/{site-id}/lists/{list-id}/items/{item-id}/fields
Content-Type: application/json
{
"Color": "Fuchsia",
"Quantity": 934
}
Response
If successful, this method returns a fieldValueSet in the response body for the updated list item.
HTTP/1.1 201 Created
Content-type: application/json
{
"Name": "Widget",
"Color": "Fuchsia",
"Quantity": 934
}