I am using REST API and I want to get all the fields value from Infusionsoft including ‘Custom Fields’. I am trying with cURL, below is the code :
$getLeadURL = ‘https://api.infusionsoft.com/crm/rest/v1/contacts/181426?optional_properties=custom_fields,notes&access_token=’;
$chl = curl_init();
curl_setopt($chl, CURLOPT_URL, $getLeadURL);
curl_setopt($chl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($chl, CURLOPT_TIMEOUT, 60);
$content = curl_exec( $chl );
$response = curl_getinfo( $chl );
curl_close ( $chl );
But I am not getting all the fields value. I want some extra fields value, but how can I? I don’t know the all fields name so that’s why I can’t pass the fields on ‘optional_properties’?
Below is the example image attached :
I need ‘Previous Booker’ field value on the tab ‘Additional Info’, but I don’t know how can I pass the field name on cUrl url ‘optional_properties’?
And one more thing, if I am passing the field ‘lead_source_id’ on ‘optional_properties’ then it gives only the ID of lead_source, but how can I get the text value of lead source?
Can anybody help me?