Search code examples
phpapiinfusionsoft

How to pass all available parameters to infusionsoft API?


I have integrated infusionsoft PHP API with my website. As Iam currently pass only name and email address of the subscriber. Now I would like pass all available field values to API.


Solution

  • Just Click on Add contact in Infusionsoft you would see form with all avaliable fields. Just inspect and you will get to know the name attribute value for each field. Just Contact0 in the name field use only postfix value. for ex, contact0First_name is name attribute value of firstname., In which we should use only First_name just ignore "contact0"

    Here I provide code...

    $contact = array(
        'Email' => $user_details['email'],
        'FirstName' => $user_details['name'],
        'StreetAddress1' => $user_details['address'],
        'State' => $user_details['state'],
        'City' => $user_details['city'],
        'PostalCode' => $user_details['zip'],
        'Country' => $user_details['country'],
        'Company' => $user_details['company'],
        'JobTitle' => $user_details['jobtitle'],
        'Phone1' => $user_details['phone'],
        'Fax1' => $user_details['fax'],
        'Website' => $user_details['website'],
        'Contact0TwitterSocialAccountName' => $user_details['twitter']
    );