skip to main content
Formulating queries : Creating, editing, and deleting records : Create example

Try DataDirect Cloud 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,
*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)