Catch the field value with REST API

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 = ‘,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 );
echo $content;

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?

You can retrieve a list of all Custom Fields available on the Contact model by querying the /contacts/model endpoint. It returns a list of values showing the Id, Name and related properties of the Custom Fields.


Then, when you Retrieve a Contact and specify optional_properties=custom_fields, the Custom Fields will be attached with their values, related by those Ids.


I would recommend using the Interactive Documentation to run the commands, and verify that they give you a workable result.

1 Like

But I need this ‘Previous Booker’ field value, but I don’t know the field name and this is not the custom field, you can see above image attached red border.
My question is simple, how can I get this field value ‘LSA Contract Si’ ? Need extra field name on ‘optional_properties=?’ (like custom_fields, notes) ( ‘,notes&access_token=zajejfsrnc4s457q78zvtqmw’.

If you run this (,notes&access_token=zajejfsrnc4s457q78zvtqmw) url you will not see the value(LSA Contract Si) of the field ‘Previous Booker’. I want this field value but how it is possible?
Can anybody help me?

So, we did some digging; it looks like those are actually other fields, just relabeled to new names. The actual field names of those four are AssistantName, AssistantPhone, SSN and Birthday.

The REST endpoint represents a “current” model of the Contact, and lacks three of those four fields (only Birthday is supported going forward).

I would normally recommend that you use Custom Fields to supply arbitrary data regarding a Contact, put it appears that your application is currently up against the hard limit of Custom Fields on the Contact object. You may want to identify which fields aren’t adding value to your process and prune them, then create new fields to store this data.

Can anybody tell me that, how can I get the ‘Lead Source’ field value, when I run this( url, I am not getting ‘Lead Source’ field value, if I run this ( then I got the ‘ID’ of the field ‘Lead Source’, but I need the value (e.g. Test), see image attached, how it is possible? And as usual how can I post to change the value from our website to Infusionsoft? Any code?
Can anybody help me?