title: Update SharePoint List Item using Rest API and HTML Input Element
body: <p>I am having a difficult time trying to get my below script to work for updating items on my SharePoint list “ProjectTracker”.  I researched and tried several similar methods, but I can’t seem to get the any script version to update the list item(s).  I continually receive the SharePoint error message “value”: This type SP.ListItemEntityCollection does not support HTTP PATCH method.” Statue”:400,”statusText”:”Bad Request”}.  I included a screen grab of the error and below is the script I am using.</p>
  <p>Any help or advice will be greatly appreciated.  Thank you in advance.</p>
  <p><a href="https://i.stack.imgur.com/9briI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9briI.jpg" alt="Screen Grab of Error Message" /></a></p>
  <pre><code>jQuery(document).on(&quot;click&quot;, '#UpdateListItem', function(){
   UpdateListItem();
  });//Button close
  
  function UpdateListItem() {
   var myID = $(&quot;#itemID&quot;).val();
   var listName = &quot;ProjectTracker&quot;;
   var office = $(&quot;#uOffice&quot;).val();
   var title = $(&quot;#uProjectTitle&quot;).val();
   var priority = $(&quot;#uPriority&quot;).val();
   var startDate = $(&quot;#uStartDate&quot;).val();
   var assignedTo = $(&quot;#uAssignedTo&quot;).val();
   var status = $(&quot;#uStatus&quot;).val();
   var requestor = $(&quot;#uRequestor&quot;).val();
   
   var item = {
   &quot;__metadata&quot;: { &quot;type&quot;: &quot;SP.Data.ProjectTrackerListItem&quot; },
   &quot;Office&quot;: office,
   &quot;ProjectTitle&quot;: title,
   &quot;Priority&quot;: priority,
   &quot;StartDate&quot;: startDate,
   &quot;AssignedTo&quot;: assignedTo,
   &quot;Status&quot;: status,
   &quot;Requestor&quot;: requestor
   };
   
   $.ajax({
   url: _spPageContextInfo.webAbsoluteUrl + &quot;/_api/web/lists/getbytitle('&quot; + listName + &quot;')/items(&quot; + myID + &quot;)&quot;,
   type: &quot;POST&quot;,
   data: JSON.stringify(item),
   headers: {
       contentType: &quot;application/json;odata=verbose&quot;,
       &quot;Accept&quot;: &quot;application/json;odata=verbose&quot;,
       &quot;X-RequestDigest&quot;: $(&quot;#__REQUESTDIGEST&quot;).val(),
       &quot;IF-MATCH&quot;: &quot;*&quot;,
       &quot;X-HTTP-Method&quot;:&quot;MERGE&quot;,
   },
   success: onSuccess,
  error: onError
  });
  function onSuccess(data) {
  alert('List Item Updated');
  }
  function onError(error) {
  alert(JSON.stringify(error));
  }
  }//Function close
  </code></pre>