Trying to retrieve contact using your rest api

Hello, guys, I’m trying to use your rest api interface (https://developer.infusionsoft.com/docs/rest/#!/Contact/listContactsUsingGET)

The problem is I’m trying to retrieve the data and it is not retrieving everything as you guys have told in the response sample.

I have tried using 2 keys that you have told in the response sample

preferred_name
opt_in_reason
notes

These fields were saved successfully since no error was thrown. but when I retrieve the contacts using your rest api interface I’m not able to get any of these field in the response.

can you please tell me what is it that is going wrong. Thanks

Hi @Rohan_Jalil,

Those are optional properties.

You can get them for a Contact using Retrieve a Contact with the optional_properties parameter.

For example, to retrieve Contact #13, with those optional properties, your request URL would look like: https://api.infusionsoft.com/crm/rest/v1/contacts/13?optional_properties=preferred_name,opt_in_reason,notes.

@mike.christianson I see. So I won’t be getting the these fields with the List Contacts API. If I need to get these keys I need to make use of Retrieve a Contact API.

Am I right ?

Yes, that’s correct.