API Get/Add Contacts

Good afternoon,

I am trying to work with your V2.1 API and the PHP repository on GitHub. I can run the test call with no problems and I can successfully GET contacts with the following line of code:

$contacts = $i->getContacts(array());

When I try to add a filter for the first name it doesn't apply the filter and I get the same results. Here is the line I am running for that:

$contacts = $i->getContacts(array("filters" => array('FIRST_NAME=\'Test\'')));

At the end of the day, I am trying to get contact information from a GravityForm on a WordPress site via Javascript, send it to PHP via AJAX and then have the PHP file call the insightly.php file and send the contact to Insightly. So far I have the AJAX call working I believe, it's just a matter of formatting it properly for the addContact function and getting the addContact function to work.

I am not sure of all the fields I need to include on my POST, even after doing several GET calls in Postman and in the V2.2 API page. The main information I want to send would be first name, last name, company name, email, phone number and possibly two custom fields.

Any help is greatly appreciated, thank you in advance.



  • Official comment

    Thanks for writing. The PHP library was written by one of our users, so your best bet is to submit an issue via the github repo.

    I would also recommend switching to the v2.2 API if you are doing filtered searches, as it provides easy to use search endpoints, where 2.1 uses OData which, frankly, is not easy to work with. You can find the v2.2 docs and sandbox at api.insigh.ly/v2.2/Help

    If you have any other questions, please let us know. Thanks,

    Brian McConnell

    Insightly Engineering Team

    Comment actions Permalink
  • Thank you for your prompt reply Mr. McConnell. The GET request was just a test, I don't really need to use filtered searches, just add the contact from the form and nothing else. The search continues...

    Comment actions Permalink
  • Hey Bryan,

    Did you ever make any headway on this? We'd love to learn from you and maybe lend a hand.

    Comment actions Permalink

Please sign in to leave a comment.