When using search_by_module v4_1, I can set the select_fields
array. For each search result that is found, it will return the field values provided in the select_fields
array.
This works pretty well, but I am unable to return the email address field when searching the Contacts module.
Is it possible to return the email field in search_by_module
search results?
Here is my API call payload:
{
"method": "search_by_module",
"input_type": "JSON",
"response_type": "JSON",
"rest_data": {
"session": "111111111111",
"search_string": "Joe Bob",
"modules": [
"Contacts"
],
"offset": "0",
"max_results": "5",
"id": "",
"select_fields": [
"id",
"name",
"email1"
],
"unified_search_only": false,
"favorites": false
}
}
I suspect this is not possible because email addresses live in a relationship table and not on the contacts table.
As a followup, is there any other way to search for Contacts by name or email and include the name and email in the search results? Is there an example using get_entry_list
endpoint?
Thanks!