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 Duplicate Management Configuration for a Specified Object

Learn whether duplicate management is configured for the specified object. If duplicate management is configured, learn about the object's duplicate rules and matching rules. Use the information in the response to know when to check for duplicate records.
Resource
1/ui-api/duplicates/{objectApiName}
objectApiName—The API name of a supported object.
Available Version
50.0
HTTP Method
GET
Example
Use the following request to learn what duplicate management is configured for the custom object Movie.
1/ui-api/duplicates/Movie__c
The response tells you that duplicate management is configured, and that the fields Name and Year are used to check for duplicates.
1// duplicate rules and matching rules are configured for Movie
2dedupeEnabled: true
3
4// these fields are used to check for duplicate records
5dedupeFields
60: Name
71: Year__c
8...
From the preceding response, you know to check the Name and Year fields when adding or updating a Movie record. For example, you can check if a movie with the name "Aliens" and the release year "1986" already exists.
1ui-api/predupe{
2"apiName" : "Movie__c",
3"fields" :
4{"Name": "Aliens",
5  "Year__c": "1986"
6}
Request Parameters
Parameter Name Type Description Required or Optional Available Version
recordTypeId String The record type ID (RecordType object) used to return the correct duplicate configuration. This field is optional, except for the Person Account object. If you’re searching for duplicate Person Account records, you must specify the Person Account record type ID here. Optional 52.0
Response Body
Duplicates Configuration