How to read custom fields in REST API


(Ankush Thakur) #1

I’m not able to figure out how to read custom fields set on contacts. Our admin added a field points_earned from the admin panel, and I was able to write the field in a PATCH request. The admin verified that the field was indeed populated. Now, I need to read that field, and it doesn’t show up when I GET (/contacts/:id) the user in question.

How is this field read, and why is it not showing up in the GET request?


(Jon Smith) #3

Hi @Ankush_Thakur
The documentation can be found here: https://developer.infusionsoft.com/docs/rest/#!/Contact/loadUsingGET
In this documentation it says that the parameter of “optional_properties” can be used and is a “Comma-delimited list of Contact properties to include in the response. (Some fields such as lead_source_id, custom_fields, and job_title aren’t included, by default.)”.

To answer the question use “optional_properties=custom_fields”.

If this isn’t working will you send the post url (minus the access token)? Also you will be able to see what should be formed if you try at the link above. Remember that authorization must be given previous to clicking the Try button.