I am writing a import app for my company to push our data into infusionsoft. but the majority of our data will be custom fields. the api documentation for custom fields in the contacts section is very sparse and i am not sure how i can access them to fill them in the api calls.
for example if i create custom field “C_field_x” how do i reference that in the custom fields block in the add/update contact call?
1 Like
Hi there,
I think you are looking for retrieveContactModelUsingGET. I have done similar similar for a project using the PHP SDK, it looks something like this:
$infusionsoft->contacts()->model();
That retrieves your custom fields already set in Keap/InfusionSoft.
Then you can format your contact update code to include the custom fields using the IDs from the first snippet of code with something like
updatePropertiesOnContactUsingPATCH.
$x['id'] = $contactID;
$x['email_addresses'] = array('test@email.com', 'field' => 'EMAIL1');
$x['custom_fields'][] = array('content' => $value, 'id' => $customid);
$infusionsoft->contacts->mock($x)->save();
I have not made custom fields using the API but it looks easy enough using createCustomFieldUsingPOST.
Hope this helps.