Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Get Records Using sObject Rows by External ID

Retrieves a record based on the value of the specified external ID field.

For security reasons, some Top Level Domains (TLD) can conflict with certain file format extensions. Adjust your implementation to work around such cases.

For example, using an email address, such as example@email.inc, as the External ID returns a “404 not found” error.

There are several workarounds to handle conflicting TLDs.

  • Use a different External ID field.
  • Create a new External ID field that is the same as the email field and replace the "." with an "_" to handle this case.
  • Run a query for emails ending in ".inc" to retrieve the record ID and use that for the upsert request.
  • Use SOAP API instead of REST API for upsert requests.
  • Accept the email as a query parameter instead of a path parameter by creating a custom Apex REST API. Use Apex to perform the upsert request.

Note

Syntax

URI: /services/data/vXX.X/sobjects/sObject/fieldName/fieldValue

Formats: JSON, XML

HTTP Method: GET

Authentication: Authorization: Bearer token

Parameters: None

Example

For an example of retrieving a record based on an external ID, see Get a Record Using an External ID.