APIs & Integrations

Christine_Wilso
Member

Get contacts in a list: Get multiple properties

Told to use this to get property or properties from the contacts:
Property &property=X - Used in the request URL If you include the “property” parameter, then the properties in the “contact” object in the returned data will only include the property or properties that you request.

When I write property=X and give one value, it works. Adding multiple isn’t working for me property=X,Y. Is there a way to format this so it works??

0 Upvotes
2 Replies 2
Christine_Wilso
Member

Get contacts in a list: Get multiple properties

Thank you! This helped me refine my PHP function that builds out the http URL from an array. I needed to add a special preg replace for this part. Now its working! :grinning:

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Get contacts in a list: Get multiple properties

Hi @Christine_Wilson

You need to include the parameter multiple times for each property that you want in the response:
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?property=x&property=y