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

Try Now
Update example
To update a record, use a PATCH request or a POST request with the custom X-HTTP-Method header. Supply the primary key in the resource URL and the property value(s) for the column(s) to update in the body. The following screen shows a PATCH request in Postman to update an account name from Hot Diggity Dog to Hot Diggity Dogs in a Salesforce data store. To formulate the request:
*The Content-Type header value is application/json.
*The URL includes:
*The service root, <myserver>:<port>/api/odata4.
*The Data Source definition name, sfds.
*The plural entity name, ACCOUNTS followed by the primary key, 0011I000002ifiUQAQ (which is cut off in the screen shot).
*The body includes:
*A value of Hot Diggity Dogs for the SYS_NAME field .
Hybrid Data Pipeline OData - Update ACCOUNT record example
The Status value 204 No Content shown in the screen above indicates that the name was successfully updated. A fetch of the record confirms the update to Hot Diggity Dogs as shown below: Hybrid Data Pipeline OData - Update account record successful
For more information on updating, see HTTP PATCH or POST and PATCH (update)