Searching
Search for data
Overview
Some endpoints will have a query parameter called search
(array[[string]]) which allows you to specify multiple search terms. These terms will be combined using an AND operator. At the moment, there is no support for other logical operators.
An API endpoint that supports searching will specify in its documentation which fields are searchable. The description will list all the fields that can be used with the search parameter, such as ‘email’, ‘phone’, ‘name’, etc.
This GET Contacts endpoint supports searching for email, phone, and name.
Syntax
The basic syntax for a search term is:
The following operators are supported:
Operator | Description |
---|---|
: | Equals |
:! | Not equal to |
:> | Greater than |
:>= | Greater than or equal |
:< | Less than |
:<= | Less than or equal |
Wildcards
When searching for string values, the wildcard character *
can be used:
Example term | Description |
---|---|
john* | Will search the field for values starting with ‘john’ |
*john | Will search the field for values ending with ‘john’ |
*john* | Will search the field for values containing with ‘john’ |
All string searches are case insensitive so searching for ‘john’ will also match with ‘John’
Examples
If you wanted to search for a contact whose name contains ‘Steele’ the query would be:
If you wanted to find results where the name contains ‘Steele’ but not ‘Hunter’ the query would be:
The search terms are combined with the AND operator by default and can not be changed at this time.