I am trying to create one new list item in Sharepoint 2010 using REST.


var itemProperties = {
'Title': ;Raja;, //Single line String
'Expiry_x0020‌​_Date': "02/02/2016", //Date
'Permission_x0020‌​_Type': 'Add' //Choice Column

createListItemREST('http://xyz:5000/sites/n/', 'L2', itemProperties, function(task){ 
console.log('Task' + task.TaskName + ' has been created');}, function(error){ console.log(JSON.stringify(error)); });

function createListItemREST(webUrl,listName, itemProperties, success, failure) {
        url: webUrl + "/_vti_bin/listdata.svc/" + listName,
        type: "POST",
        processData: false,
        contentType: "application/json;odata=verbose",
        data: JSON.stringify(itemProperties),
        headers: {
            "Accept": "application/json;odata=verbose"
        success: function (data) {
        error: function (data) {

i am getting following error.

400 Bad request

{"code":"","message":{"lang":"en-US","value":"Error processing request stream. The property name 'Expiry_x0020‌​_Date' specified for type 'Microsoft.SharePoint.DataService.L2Item' is not valid."}}

Note: When trying with only Title column this coding is working.

Column Details

Title - Single Line Text

Business Justification for Access - Choice Column

Expiry Date - Date and Time

Permission Type - Choice Column

 <ViewFields xmlns="http://schemas.microsoft.com/sharepoint/soap/">
      <FieldRef Name="Attachments" />
      <FieldRef Name="LinkTitle" />
      <FieldRef Name="Business_x0020_Justification_x00" />
      <FieldRef Name="Expiry_x0020_Date" />
      <FieldRef Name="Permission_x0020_Type" />

1 Answer 1


I got solution to my question.

After Updating the itemProperties i had get resolved of my issue.

Updated Code.

var itemProperties = {
'Title': userAccName,
'BusinessJustificationForAccessValue': busJust,
'ExpiryDate': expDate,
'PermissionTypeValue': 'Add'

When i browse my list with REST URL(http://xyz:5000/sites/n/_vti_bin/listdata.svc/L2) in browser i got above column names change in REST result see below.

 <content type="application/xml">
    <d:ExpiryDate m:type="Edm.DateTime">2016-02-10T00:00:00</d:ExpiryDate>
    <d:Id m:type="Edm.Int32">30</d:Id>
    <d:Modified m:type="Edm.DateTime">2016-02-02T06:26:37</d:Modified>
    <d:Created m:type="Edm.DateTime">2016-02-02T06:26:37</d:Created>
    <d:CreatedById m:type="Edm.Int32">1</d:CreatedById>
    <d:ModifiedById m:type="Edm.Int32">1</d:ModifiedById>
    <d:Owshiddenversion m:type="Edm.Int32">1</d:Owshiddenversion>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.