title: Cannot create listitem via rest api in sharepoint2013 with contribute rights
body: <p>I have an issue with our Travel Tool based on SharePoint 2013.</p>
  
  <p>This tool consists of different Content Types - all in their specific lists (travel requests, train rides, flights, etc.). There are two main groups which are using this tool: Employees (contribute) and admin staff (full control).
  On the homepage.aspx we have a ScriptEditorWebpart with a custom HomePageNewItem button and a ListView of the travel requests. When the user clicks on the custom button, a new ListItem is created via REST API and the EditForm.aspx of the currently created ListItem is displayed.</p>
  
  <p><strong>What is the problem?</strong></p>
  
  <p>This works just fine for the admin staff (full control). When employees try to create a ListItem, the following error message occurs: HRESULT: 0x80131904 (returning from the REST API). The same happens, when employees visit some of the lists. The ListView isn’t displayed, but there is the same error message.</p>
  
  <p><strong>Some additional information</strong></p>
  
  <ul>
  <li>The SQL database has enough storage on all partitions</li>
  <li>When an    employee uses the standard “New Item” Button, everything
  works just    fine (except of the ListView)</li>
  <li>When an employee is moved to the admin    staff group, everything
  works just fine</li>
  <li>All lists have correct    permissions set</li>
  <li>This worked one week before    and there were no changes    in the
  code, only some customizations of    sites e.g. homepage.aspx)</li>
  </ul>
  
  <p><strong>Additional hints</strong></p>
  
  <p>Could it has something to do with the Website Definition?</p>
  
  <p><strong>The function which creates the list item</strong></p>
  
  <pre><code> function createListItem(listName, newItem, success) {
      var itemType = getItemTypeForListName(listName);
          newItem.__metadata = { "type": itemType }
  
          $.ajax({
              url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
              type: "POST",
              contentType: "application/json;odata=verbose",
              data: JSON.stringify(newItem),
              headers: {
                  "Accept": "application/json;odata=verbose",
                  "X-RequestDigest": $("#__REQUESTDIGEST").val()
              },
              success: function (data) {
                  success(data);
              },
              error: function (data) {
                  var errorMessage = JSON.parse(data.responseText).error.message.value;
                  var statusId;
  
                  statusId = SP.UI.Status.addStatus("Hoppla:", errorMessage);
                  SP.UI.Status.setStatusPriColor(statusId, "Blue");
                  setTimeout(function () { SP.UI.Status.removeStatus(statusId); },10000);
              }
          });
      }
  
  function getItemTypeForListName(name) {
          return "SP.Data." + name.charAt(0).toUpperCase() + name.split(" ").join("").slice(1) + "ListItem";
      }
  </code></pre>
  
  <p>Thanks in advance
  Benjamin</p>