I’m using the PHP SDK, using the REST API, and I can’t figure out how to do the following:
Find a contact by email
Prevent a duplicate created contact by email
As for finding a contact by email, I’ve tried all of the following:
$infusionsoft->contacts()->findByEmail('email@email.com'); // Method not found for REST
$infusionsoft->contacts()->find(array('email' => 'email@email.com'); // Complains that first parameter needs to be a string
$infusionsoft->contacts()->where(array('email' => 'email@email.com')->find(); // Doesn't work
I just can’t figure out how to do it…
As for trying to create a contact and avoid duplicates, here’s how I’m creating the contact, which works fine, but will create duplicates:
$infusionsoft->contacts()->create($contact);
I’ve tried adding in the following to my $contact array, but it errors out with this call:
Has anyone managed to fathom the first part of this question though:
As for finding a contact by email, I’ve tried all of the following:
$infusionsoft->contacts()->findByEmail('email@email.com'); // Method not found for REST
$infusionsoft->contacts()->find(array('email' => 'email@email.com'); // Complains that first parameter needs to be a string
$infusionsoft->contacts()->where(array('email' => 'email@email.com')->find();
Because like the OP - I can't find out how to search by email on a contact using the PHP SDK.
Documentation seems to be scarce.
Thanks in advance,
I’m in the exact same situation. Trying to migrate an old code base using the XML-RPC API to the new REST one, but my application’s workflow all starts with finding a contact by email, first or last name.
This is mind-boggling.