Here is the detailed documentation for the SharePoint list items and their features.
There are multiple ways to update the list item, here I am sharing the REST API Code
Steps to update the SP List Item
Follow the below listed steps to update an item.
Step 1
Create one JS file or you can use the Content Editor Web Part.
Step 2
Below is the API to get the particular list item using Item ID, you can browse this URL in the browser to check whether the API is working or not.
https://sharepoint.com/_api/web/lists/GetByTitle('samplelist')/items/getbyid(1)
Note
Replace your list name with “samplelist”.
Step 3
Refer to the jQuery in your HTML file or CEWP.
Use the below code to update the item in a SharePoint list.
- 'use strict';
- ExecuteOrDelayUntilScriptLoaded(initializePage, "sp.js");
- function initializePage() {
- var siteURL;
- var itemsArray = [];
- // This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
- $(document).ready(function() {
- var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
- UpdateListItem();
- });
- //Retrieve list items from sharepoint using API
- function UpdateListItem() {
- siteURL = _spPageContextInfo.webAbsoluteUrl;
- console.log("from top nav - " + siteURL);
- var apiPath = siteURL + "/_api/lists/getbytitle(''samplelist'')/items/getbyid(1)";
- $.ajax({
- url: apiPath,
- type: "POST",
- headers: {
- Accept: "application/json;odata=verbose"
- },
- data: "{__metadata:{'type':'SP.Data.YourlistnameListItem'},Title:”Ur input "
- }
- ",
- async: false, success: function(data) {
- alert("Item updated successfully");
- }, eror: function(data) {
- console.log("An error occurred. Please try again.");
- }
- });
- }
- }
Summary
In this blog, we have explored how to update a particular item in the SharePoint list using REST API. Happy coding.

BhavyaSree GuvvalaPosted Aug 8, 2022, 4:28 PM
Hi Kaviya.Refer to the jQuery in your HTML file or CEWP - Can you elaborate on this please..
RIYAS MOHAMMEDPosted May 23, 2022, 9:28 AM
Kaviya how to update multiple id like 1,2,3 same time in single call api
Shiv SharmaPosted Dec 24, 2018, 1:11 AM
Nice Artile Kaviya !
Viknaraj ManogararajahPosted Jul 19, 2018, 6:48 AM
Nice Article...........
Vidyadharran GPosted Jun 23, 2018, 7:11 AM
Nice explanation akka :)...
Naresh SinghalPosted Jun 22, 2018, 11:26 PM
Very well explained Kaviya Balasubramanian :)