Skip to main content

Searching contacts via the Mercury API

Learn how to search contacts using the Mercury API search endpoint and the searchParams query parameter.

Updated over 2 weeks ago

You can search contacts using the Mercury API by passing a URL-encoded JSON object to the searchParams query parameter.

The JSON object supports multiple filter properties, allowing you to refine your search results.

Contact search endpoint

GET https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams={URL_ENCODED_JSON}

Replace {token} with your authentication token and ensure the JSON is URL encoded before sending.

Supported search properties

The searchParams JSON object supports the following fields:

Property

Description

name

Contact name (partial or full match)

isDeleted

Set to true to search deleted contacts

excludeDoNotMail

Exclude contacts marked as Do Not Email (default: false)

excludeEmailBounced

Exclude contacts with bounced emails (default: false)

lastModified

Return results modified after a date (yyyy-mm-dd)

companyName

Company name (partial or full match)

personType

Relationship type (e.g. Primary Applicant)

categoryId

Search by category ID

campaignId

Search by campaign ID

contactNumber

Contact phone number (partial or full match)

email

Email address (partial or full match)

dateOfBirth

Search by date of birth

birthday

Search by birthday anniversary

createdOn

Search by creation date


Search examples

Below are common examples.

Search by name

JSON:

{ "name":"Test" }

Search deleted contacts

JSON:

{ "name":"Test", "isDeleted": true }

Search by last modified date

Example: Contacts modified after 20 March 2017.

{ "name":"Test", "lastModified":"2017-03-20" }

Exclude “Do Not Email” contacts

{ "name":"Test", "excludeDoNotMail": true }

Exclude bounced emails

Example: Modified after 20 March 2017 and exclude bounced emails.

{    "lastModified":"2017-03-20",    "excludeEmailBounced": true  }

Search by company name

{ "companyName":"Connective" }

Search by relationship type

Example: Primary Applicant.

{    "name":"Test",    "personType":"Primary Applicant"  }

Search by category ID

{    "name":"Test",    "personType":"Primary Applicant",   "categoryId":"b6b062be-3e11-11e4-b42f-00155d0a3619" }

Search by campaign ID

{    "name":"Test",   "personType":"Secondary Applicant",   "campaignId":"97498ba9-b787-4a1d-9b08-0f9b4bdcdf62" }

Search by contact number

{ "contactNumber":"0410025256" }

Search by email address

{ "email":"[email protected]" }

Search by date of birth

Exact match:

{ "dateOfBirth":"1983-04-05" }

Date of birth range

You can specify ranges using:

Forward slash:

{ "dateOfBirth":"1983-04-05/1983-04-30" }

Double dots:

{ "dateOfBirth":"1983-04-05..1983-04-30" }

"to" keyword:

{ "dateOfBirth":"1983-04-05to1983-04-30" }

Before a date (inclusive)

{ "dateOfBirth":"/1983-04-05" }

After a date (inclusive)

{ "dateOfBirth":"1983-04-05/" }

Search by birthday anniversary

Exact date:

{ "birthday":"2017-04-05" }

Date range:

{ "birthday":"2017-04-01/2017-04-30" }

Important notes

  • All JSON must be URL encoded before being passed to searchParams.

  • The search string may be a full value or partial match.

  • Date format must be yyyy-mm-dd.

Need help?

If you need help using the Mercury API or integrating contact search functionality, contact your Partnership Manager or email [email protected].

Did this answer your question?