Lookup API — REST

Support DQE
Support DQE
  • Updated
Lookup API — REST Reference

Query your dedicated DQE One Lookup Server in real time for record autocomplete, pre-existence duplicate lookup, golden-record matching, and indexing.

When to use this API — Call these REST endpoints from external applications or custom backends to run real-time pre-existence checks and keep your Redis index synchronized. For Salesforce Custom Settings, Federated Search (OpenSearch XML), and Apex REST resources, see Set up Lookup for real-time record search →

Authentication & Base URL

All REST endpoints below are hosted on your dedicated DQE One Lookup Server instance (https://[YOUR APP URL]) and secured with HTTP Basic Authentication:

  • Username: the 15- or 18-character identifier of the Salesforce organization paired with your Lookup Server instance.
  • Password: the licence key provided by DQE Software (same key configured in your application environment variables).
[YOUR APP URL] is the hostname of your dedicated DQE One Lookup Server instance, [YOUR ORG ID] is your registered 15- or 18-character Salesforce Organization ID, and [YOUR LICENCE KEY] is the licence key provided by DQE Software.

Note on error responses: authentication failures return HTTP 401 (or a 302 redirect to ./login if the request sends Accept: text/html). All other application-level errors return HTTP 200 with "status": "error" in the JSON body.

searchRecords

Request

Autocomplete engine on a single search line. Queries Redis DB 1 using progressive word, prefix, and French phonetic (Soundex) matching without applying deduplication distance rules. Also available under the exact alias /api/searchGolden (identical behavior; does not filter for golden records).

Only GET is supported for this endpoint.

GEThttps://[YOUR APP URL]/api/searchRecords?search={SEARCH}&recordType={RECORD_TYPE}

Code examples

Autocomplete search on Lead records

Parameters

Parameter Description Mand / Opt
search Search terms entered by the user. If empty or omitted, the endpoint returns {}. Mandatory
recordType Target SObject API name (e.g. Lead, Account, Contact, PersonAccount) or PostgreSQL table name. Required in practice: results are filtered by Source == recordType, so omitting it returns []. Mandatory
<FieldName> Any other query parameter whose name matches a field in the returned records filters the results case-insensitively (for example PostalCode=74000). Optional

Response

Returns a JSON array of up to 50 matching records (no pagination), or {} if search is empty.

Key Description Type
Id Record primary key (for example an 18-character Salesforce ID). String
Source Origin SObject API name or PostgreSQL table name. String
FirstName First name. String
LastName Last name. String
Phone Phone number. String
MobilePhone Mobile phone number. String
Email Email address. String
Street Street address. String
City City. String
PostalCode Postal / ZIP code. String
State State or province. String
Country Country. String

Response example

Autocomplete search on Lead records

Errors

HTTP Error type Response body
401 Missing or invalid HTTP Basic credentials, or instance not yet paired with a Salesforce org.
{"status": "error", "label": "Invalid Credentials"}

lookupRecords

Request

Performs a pre-existence lookup by comparing a record's fields against all indexed records using the active deduplication ruleset (evaluating main rules first, then additional rules if no main rule matches) and returns all candidate records without distance-threshold filtering.

Both GET (query parameters) and POST (JSON request body) are supported. If any query parameter is present in the URL, the request body is ignored.

GEThttps://[YOUR APP URL]/api/lookupRecords?recordType={RECORD_TYPE}&FirstName={FIRST_NAME}&LastName={LAST_NAME}&Email={EMAIL}

Code examples

Candidate lookup on Lead

POSThttps://[YOUR APP URL]/api/lookupRecords

Send a JSON object of case-sensitive field/value pairs in the request body.

Code examples

Candidate lookup on Lead

Parameters

Parameter Description Mand / Opt
recordType SObject API name or PostgreSQL table name to restrict the lookup to one object. If omitted, all objects enabled in fsearch_SF and fsearch_HK are searched. Optional
<FieldName> Any key/value pair present in your form and used by your ruleset (for example FirstName, LastName, Email, Phone, Street, PostalCode). Keys are case-sensitive; unknown keys are ignored. Mandatory

Response

Returns a JSON array of candidate duplicate records matching the ruleset's indexing keys.

Key Description Type

Response example

Candidate lookup on Lead

Errors

HTTP Error type Response body
200 No deduplication ruleset has been loaded into Redis yet.
{"status": "error", "error": "No rules set loaded yet."}
200 Malformed JSON in the request body (when no query parameters are provided).
{"status": "error", "error": "Malformed request body"}
401 Missing or invalid HTTP Basic credentials, or instance not yet paired with a Salesforce org.
{"status": "error", "label": "Invalid Credentials"}

lookupGolden

Request

Performs a pre-existence duplicate check by comparing a record with indexed records using your ruleset's distance algorithms and thresholds, and returns only the single record with the best match score (or its parent golden record if DQE_Index_Group_ID__c is present).

Both GET (query parameters) and POST (JSON request body) are supported. If any query parameter is present in the URL, the request body is ignored.

GEThttps://[YOUR APP URL]/api/lookupGolden?recordType={RECORD_TYPE}&FirstName={FIRST_NAME}&LastName={LAST_NAME}&Email={EMAIL}

Code examples

Golden record lookup

POSThttps://[YOUR APP URL]/api/lookupGolden

Send a JSON object containing recordType, optional boolean strict, and your record's field/value pairs.

Code examples

Golden record lookup

Parameters

Parameter Description Mand / Opt
recordType Target SObject API name (e.g. Lead, Account, Contact, PersonAccount) or PostgreSQL table name. Mandatory: omitting recordType returns {"status": "error", "error": "bad request"}. Mandatory
strict Require the best match to also validate against the ruleset's main matching rule; if it does not, the next best match is tried.
Default: false · Note: on GET, any non-empty string (even ?strict=false) is evaluated as truthy; omit strict on GET to keep it disabled, or use POST with a JSON boolean.
Optional
<FieldName> Any case-sensitive field/value pair used by your ruleset (for example FirstName, LastName, Email, PersonEmail, Phone, Street, PostalCode). Mandatory

Response

Returns a JSON object with the match confidence score, the matching rule name, and the winning record (or {} if no candidate satisfies the thresholds).

Key Description Type
certainty Match confidence score between 0 and 1 (set to 1.0 when resolved to a parent golden record). Number
matched_by Name of the matching rule in the ruleset that produced the best score. String
record Best-matching indexed record (or its parent golden record). Object

Response example

Golden record lookup

Errors

HTTP Error type Response body
200 No deduplication ruleset has been loaded into Redis yet.
{"status": "error", "error": "No rules set loaded yet."}
200 Malformed JSON in the request body (when no query parameters are provided).
{"status": "error", "error": "Malformed request body"}
200 Missing recordType parameter or unhandled exception during rule evaluation.
{"status": "error", "error": "bad request"}
401 Missing or invalid HTTP Basic credentials, or instance not yet paired with a Salesforce org.
{"status": "error", "label": "Invalid Credentials"}

add

Request

Adds or updates one record (GET query parameters) or a batch of records (POST JSON body) in the Redis index without restarting a full indexation across the database.

Both GET (query parameters) and POST (JSON request body) are supported. If any query parameter is present in the URL, the request body is ignored.

GEThttps://[YOUR APP URL]/api/add?recordType={RECORD_TYPE}&Id={RECORD_ID}&FirstName={FIRST_NAME}&LastName={LAST_NAME}&Email={EMAIL}

Code examples

Add a single Lead record (GET)

POSThttps://[YOUR APP URL]/api/add

Send a JSON object keyed by Salesforce record ID. Each entry must include Id, attributes.type (the SObject API name), and the record fields.

Code examples

Add a PersonAccount record (POST)

Parameters

Parameter Description Mand / Opt
recordType SObject API name (e.g. Lead, Account, Contact, PersonAccount) or PostgreSQL table name. Passed as a query parameter on GET, or inside attributes.type on POST. Mandatory
Id Salesforce record ID (or primary key value). Case-sensitive (Id). Mandatory
<FieldName> Any case-sensitive field/value pair present on the record to index for Lookup and Federated Search. Optional

Response

Returns a JSON status object confirming that the record(s) were indexed.

Key Description Type
status Operation status (success or error). String
label Human-readable result message (Record added on success). String

Response example

Add a single Lead record (GET)

Errors

HTTP Error type Response body
200 The object API name is not mapped in Lookup Setup (GET). Add the object in DQE One Setup > Lookup first.
{"status": "error", "label": "RecordType not mapped in your application"}
200 The object API name in attributes.type is not mapped in Lookup Setup (POST).
{"status": "error", "label": "RecordType not mapped in ruleset"}
200 Redis storage limit reached (maxmemory exceeded).
{"status": "error", "label": "memory > max memory"}
200 Malformed JSON body or unhandled indexing exception.
{"status": "error", "label": "Failed to add record"}
401 Missing or invalid HTTP Basic credentials, or instance not yet paired with a Salesforce org.
{"status": "error", "label": "Invalid Credentials"}

delete

Request

Removes one record (GET query parameters) or multiple records (POST JSON body) and their associated keys from the Redis index without restarting a full indexation.

Both GET (query parameters) and POST (JSON request body) are supported. If any query parameter is present in the URL, the request body is ignored.

GEThttps://[YOUR APP URL]/api/delete?Id={RECORD_ID}&recordType={RECORD_TYPE}

Code examples

Delete a single record (GET)

POSThttps://[YOUR APP URL]/api/delete

Send a JSON object mapping each record ID to {"attributes": {"type": "<recordType>"}}.

Code examples

Delete multiple records (POST)

Parameters

Parameter Description Mand / Opt
Id Salesforce record ID (or primary key value) of the record to remove. On POST, each record ID is a top-level key in the JSON body. Mandatory
recordType SObject API name (e.g. Lead, Account, Contact, PersonAccount) or PostgreSQL table name. Any additional query parameters on GET are ignored. Mandatory

Response

Returns a JSON status object confirming removal. Deleting an Id that is already absent from Redis is idempotent and returns success.

Key Description Type
status Operation status (success or error). String
label Human-readable result message (Record(s) removed on success). String

Response example

Delete a single record (GET)

Errors

HTTP Error type Response body
200 One or more record IDs could not be removed from Redis.
{"status": "error", "label": "Failed to remove record(s)", "failed": ["00Q0900000E37F3EAJ"]}
200 Malformed JSON body or unhandled exception during removal.
{"status": "error", "label": "Failed to remove record"}
401 Missing or invalid HTTP Basic credentials, or instance not yet paired with a Salesforce org.
{"status": "error", "label": "Invalid Credentials"}

index

Request

Starts an asynchronous full re-indexation of a Salesforce object (model=SF) or Heroku Connect / PostgreSQL table (model=HK). The object and its ruleset must already be configured in the DQE One Lookup Setup interface.

Only GET is supported for this endpoint.

GEThttps://[YOUR APP URL]/api/index?recordType={RECORD_TYPE}&model={MODEL}&access_token={ACCESS_TOKEN}&instance_url={INSTANCE_URL}

Code examples

Start bulk indexation on Lead

Parameters

Parameter Description Mand / Opt
recordType SObject API name (e.g. Lead, Account, Contact) or PostgreSQL table name. Mandatory
model Data source model: SF to index a Salesforce object via Bulk API, or HK to index a PostgreSQL table.
Values: SF, HK
Mandatory
access_token Valid Salesforce OAuth2 session token (required when model=SF). Optional
instance_url Salesforce organization URL, in the format https://your-org.my.salesforce.com (required when model=SF). Optional
sub Salesforce username/email initiating the request (used to tag the temporary Bulk export file; defaults to default). Optional

Response

Starts the indexing job in a background thread and immediately returns a JSON confirmation. For model=SF, the job exports records via Bulk API (applying any saved List View filter) and clears the previous Lookup and Federated Search indexes for that object before indexing the new rows.

Key Description Type
status Operation status (success or error). String
label Human-readable status message (indexing by Bulk started when the background thread is launched). String

Response example

Start bulk indexation on Lead

Errors

HTTP Error type Response body
200 Federated Search is enabled (FS=true) but no field has a parsing method configured.
{"status": "error", "label": "Provide at least one field with parsing method."}
200 PostgreSQL connection failed when model=HK (missing or invalid DATABASE_URL).
{"status": "failed", "label": "Database connexion failed"}
200 Unmapped recordType or unexpected error launching the indexing process.
{"status": "error", "label": "Error, failed to launch process."}
401 Missing or invalid HTTP Basic credentials, or instance not yet paired with a Salesforce org.
{"status": "error", "label": "Invalid Credentials"}

For HTTP error conventions across DQE APIs, see API Response Codes — Complete Reference.

See also

Was this article helpful?

0 out of 0 found this helpful