Check for potential duplicates of a lead Run in API Explorer
Ask AI
Matches unpromoted leads and individual clients in the firm on exact first name, last name (case-insensitive) and date of birth. A promoted lead is not matched; its client account is. Records the caller cannot view are returned with their names withheld. Lead detection is always on and does not depend on the firm's duplicate client detection feature.
Body
-
First name of the lead being created or edited.
Maximum length is
255. -
Last name of the lead being created or edited.
Maximum length is
255. -
Date of birth of the lead being created or edited.
-
UUID of the lead being edited, so it is not matched against itself or against matches already dismissed for it.
POST
/api/v1/leads/check-duplicates
curl \
--request POST 'https://api.plannrcrm.com/api/v1/leads/check-duplicates' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
--data '{
"first_name": "Sam",
"last_name": "Patel",
"date_of_birth": "1985-04-12",
"exclude_lead_uuid": "b567c432-43aa-4f2d-ba06-244ecf0523a5"
}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"first_name": "Sam",
"last_name": "Patel",
"date_of_birth": "1985-04-12",
"exclude_lead_uuid": "b567c432-43aa-4f2d-ba06-244ecf0523a5"
}
Response examples (200)
{
"data": [
[
{
"uuid": "15171b57-758c-4b23-adb0-9d168de46714",
"type": "client",
"is_viewable": true,
"first_name": "Sam",
"last_name": "Patel",
"date_of_birth": "1985-04-12"
}
]
]
}
Response examples (403)
{
"message": "This action is unauthorized."
}
Response examples (422)
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is invalid."
]
}
}