skip to main content
Querying with OData Version 2 : Formulating queries with OData Version 2 : Creating, editing, and deleting records with OData Version 2 : Create example
  

Try Now
Create example
When supplying property values, include required columns (except for those with default values or set automatically by the data store). The following screen shows a POST request in Postman to create an ACCOUNT entity in a Salesforce data store. To formulate the request:
*The header Content-Type has the value application/atom+xml.
*The URL includes:
*The service root, <myserver>:<port>/api/odata.
*The Data Source definition name, sfds.
*The plural entity name, ACCOUNTS.
*The body includes:
*The value of the entry element and structure of the m:property element were copied from the response of a GET request that fetched a single account record.
*No value was supplied for ROWID, the primary key, because Salesforce generates the value automatically.
DDC OData - Create Account example
The following lines in the response show that the new record was successfully created:DDC OData - Create Account response example
For more details on creating records and an example in JSON format, see HTTP POST (create)