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

Try Now
Delete example
To delete a record, use HTTP DELETE or the POST request with the custom X-HTTP-Method header value of DELETE. Supply the primary key of the record to delete. The following screen shows a request in Postman to delete an account name from a Salesforce data store.
To formulate the request:
*The Content-Type header value is application/atom+xml.
*The custom header X-HTTP-Method value is DELETE.
*The resource URL includes:
*The service root, <myserver>:<port>/api/odata.
*The Data Source definition name, sfds.
*The plural entity name, ACCOUNTS followed by the primary key (partially cut off in the screen shot).
*The body of the request is empty.
The following screen shows the result of executing the request. The Status of 204 No Content indicates that the record was successfully deleted.odata example account deletion