For those interested: Search by Custom Property (Workaround)
Hi Hubspot Community,
Like some of you I was frustrated that I was unable to perform a company/contact search with the only thing available being query on Contacts which only searched a few fields.
I am currently in the progress of building a bridge API to enable such things and yesterday I finished the contact search. This code I have written could also be applied to other types of record.
The PHP code snippet from my workaround (this may not work for millions of contacts but tested upto 15,000, may work for more tho dependant on server setup):
The class snippet =======================================================================
Calling Function Demo ===================================================
$properties = array(
"firstname",
"lastname",
"company",
"sync_to_netsuite",
"send_sample_kit",
"phone",
"address",
"city",
"state",
"zip",
"country",
"associatedcompanyid",
"email"); //These are the fields to get
$parameters = array("sync_to_netsuite" => true); //This is what to search for,
print_r(fetchContacts($parameters, $properties));
Result Snippet =========================================================