How to upsert records using External Id in Salesforce REST API?

How to upsert records using External Id in Salesforce REST API?

We can upsert(Insert/Update) records using External Id field in Salesforce.

1. Use the following link to setup Connected App to get Access Token.

2. We can do a PATCH Request to do the Upsert operation.

Endpoint URL:

https://{Salesforce My Domain UR}/services/data/v59.0/sobjects/{Object API Name}/{External Id Field API Name}/{External Id Field Value}/

Request Header:

Request Body:

{
    "Description" : "Sample Testing"
}

Leave a Reply