PUT api/ObjectUpdate/{id}?model={model}

Update for a record with the specified id

Request Information

Parameters

NameDescriptionAdditional information
model
The model name of the table

Define this parameter in the request URI.

id
record-id for update

Define this parameter in the request URI.

updateRecordData
Contains the fields of the record and the authentication token from Login

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "AuthToken": "your authentication token",
  "Fields": {
    "name": "new name",
    "city": "new city"
  }
}

application/xml, text/xml

Sample:
<UpdateRecordRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/openErpRestApi.Models">
  <AuthToken>your authentication token</AuthToken>
  <Fields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>name</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">new name</d2p1:Value>
    </d2p1:KeyValueOfstringanyType>
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>city</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">new city</d2p1:Value>
    </d2p1:KeyValueOfstringanyType>
  </Fields>
</UpdateRecordRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Response body formats

application/json, text/json

Sample:
true

application/xml, text/xml

Sample:
<boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean>