Search leads
GET {{baseUrl}}/leads/search?term=<string>&fields=<string>&exact_match=<boolean>&person_id=<integer>&organization_id=<integer>&include_fields=<string>&start=0&limit=<integer>
Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
term | string | (Required) The search term to look for. Minimum 2 characters (or 1 if using exact_match ). Please note that the search term has to be URL encoded. | |
fields | string | A comma-separated string array. The fields to perform the search from. Defaults to all of them. | |
exact_match | string | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. | |
person_id | string | Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000. | |
organization_id | string | Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. | |
include_fields | string | Supports including optional fields in the results which are not provided by default | |
start | number | Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter. | |
limit | string | Items shown per page |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"success":true,"data":{"items":[{"result_score":0.29,"item":{"id":"39c433f0-8a4c-11ec-8728-09968f0a1ca0","type":"lead","title":"John Doe lead","owner":{"id":1},"person":{"id":1,"name":"John Doe"},"organization":{"id":1,"name":"John company"},"phones":[],"emails":["john@doe.com"],"custom_fields":[],"notes":[],"value":100,"currency":"USD","visible_to":3,"is_archived":false}}]},"additional_data":{"description":"The additional data of the list","type":"object","properties":{"start":{"type":"integer","description":"Pagination start"},"limit":{"type":"integer","description":"Items shown per page"},"more_items_in_collection":{"type":"boolean","description":"If there are more list items in the collection than displayed or not"}}}}