POST api/ObjectCreate?model={model}

Inserts a new record into a table

Request Information

Parameters

NameDescriptionAdditional information
model
The model name of the table

Define this parameter in the request URI.

createRecordData
Contains 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",
  "Record": {
    "name": "partner_name",
    "street": "street_value",
    "city": "city_value"
  }
}

application/xml, text/xml

Sample:
<CreateRecordRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/openErpRestApi.Models">
  <AuthToken>your authentication token</AuthToken>
  <Record 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">partner_name</d2p1:Value>
    </d2p1:KeyValueOfstringanyType>
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>street</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">street_value</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">city_value</d2p1:Value>
    </d2p1:KeyValueOfstringanyType>
  </Record>
</CreateRecordRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Response body formats

application/json, text/json

Sample:
1

application/xml, text/xml

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