Skip to main content
Search contacts
Updated over a year ago

To search for contacts using different criteria, you need to use the searchParams query parameter which takes a URL encoded JSON object supporting the following properties

Name

Contact name to search for

isDeleted

Set to true if searching for deleted contacts

excludeDoNotMail

Exclude contacts marked as do not email from the search results. If not set, will default to false

excludeEmailBounced

Exclude contacts with bounced emails from the search results. If not passed, will default to false

lastModified

Returns results after the given lastModified date. Date should be in yyyy-mm-dd format

companyName

Company name of the person

personType

The relationship type of the person

categoryId

Search by the category id

campaignId

Search by the campaign id

contactNumber

Search by the contact number of the person

email

Search by the email address of the person

dateOfBirth

Search by date of birth of the person

birthday

Search by birthday anniversary

createdOn

Search by creation date

For example, to search for contacts by name construct a JSON object as follows:

{ "name":"Test"}


Next, do a GET query on the contact search endpoint, pass the above URL encoded JSON object as the value to the searchParams query parameter

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22name%22%3A%22Test%22%0A%7D

Search deleted contacts

For example, to search for a deleted contacts with the string "Test" in the contact name, construct the JSON object as follows:

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

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22name%22%3A%22Test%22%2C%0A%09%22isDeleted%22%3Atrue%0A%7D

Search for contacts modified after a given date

For example, to search for contacts modified after the 20th March 2017, and having the string "Test" in the name, construct the JSON object as follows:

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

NOTE: the search string can be the exact name or part of the full name

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%0A%7B%0A%09%22name%22%3A%22Test%22%2C%0A%09%22lastModified%22%3A%222017-03-20%22%0A%7D

Search contacts excluding the ones marked do not email

For example, to search for contacts which are marked do not email and having the string "Test" in the name, construct the JSON object as follows:

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

The GET request looks like this:

Search contacts excluding the ones with bounced emails

For example, to search for contacts excluding the ones with bouned emails and update after 20th March 2017, construct the JSON object as follows:

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

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22lastModified%22%3A%222017-03-20%22%2C%0A%09%22excludeEmailBounced%22%3A%20true%0A%7D

Search by contacts company name

For example, to search for contacts having the company name Connective, construct the JSON object as follows:

{ "companyName":"Connective"}

NOTE: the search string can be the exact company name or part of it

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22companyName%22%3A%22Connective%22%0A%7D

Search for a person by relationship type

For example, to search for contacts with relationship type is Primary Application and having the name "Test", construct the JSON object as follows:

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

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22name%22%3A%22Test%22%2C%0A%09%22personType%22%3A%22Primary%20Applicant%22%0A%7D

Search for a person by category id

For example, to search for contacts with categoryId=b6b062be-3e11-11e4-b42f-00155d0a3619 and relationship type is Primary Application and having the name "Test", construct the JSON object as follows:

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

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22name%22%3A%22Test%22%2C%0A%09%22personType%22%3A%22Primary%20Applicant%22%2C%0A%09%22categoryId%22%3A%22b6b062be-3e11-11e4-b42f-00155d0a3619%22%0A%7D

Search for a person by campaign id

For example, to search for contacts with campaignId=97498ba9-b787-4a1d-9b08-0f9b4bdcdf62 and relationship type is Secondary Applicant and having the name "Test", construct the JSON object as follows:

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

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22name%22%3A%22Test%22%2C%0A%09%22personType%22%3A%22Secondary%20Applicant%22%2C%0A%09%22campaignId%22%3A%2297498ba9-b787-4a1d-9b08-0f9b4bdcdf62%22%0A%7D

Search for a person by contact number

For example, to search for contacts where contact number is 0410025256, construct the JSON object as follows:

{    "contactNumber":"0410025256"}

NOTE: the search string can be the exact contact number or part of it

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22contactNumber%22%3A%220410025256%22%0A%7D

Search for a person by email address

For example, to search for contacts where email is [email protected], construct the JSON object as follows:

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

NOTE: the search string can be the exact email address or part of it

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22email%22%3A%22test%40connective.com.au%22%0A%7D

Search for a person by date of birth

For example, to search for contacts where date of birth is 5th April 1983, construct the JSON object as follows:

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

The GET request looks like this:

https://uatapis.connective.com.au/mercury-v1/{token}/contacts?search&searchParams=%7B%0A%09%22dateOfBirth%22%3A%221983-04-05%22%0A%7D

To search for people with date of births between 2 dates, eg. 5th April 1983 to 30th April 1983, construct the JSON object as follows:

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

Note: You can also use to following separators instead of forward slash when specifying a date range:

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

To search for people with date of births before 5th April 1983 (inclusive), construct the JSON object as follows:

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

To search for people with date of births after 5th April 1983 (inclusive), construct the JSON object as follows:

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

Search for people by birthday anniversary

To search for people with birthday on a given date, say 5th April 2017, construct the JSON object as follows:

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

To search for people with birthday between 2 given dates, construct the JSON object as follows:

{      "birthday":"2017-04-01/2017-04-30"}
Did this answer your question?