Hi,
I am creating a connection with the API to update a internal report to my client.
I have some questions on where is the correct endpoint to perform the requests.
I would like to get forms submissions under a specific filter.
I am using:
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=XXXXXX&properties=original%20source%3DPaid%20Search
Question: does the request below only return the contacts with the filter sent on “properties” parameter?
If I want include one more filter, how is the correct way of doing that?
I also would like to include a date range to only get the the information for that specific time range, how could I do that?
Example:
I would like to get -
Form submissions;
Between: 01/04/2019 to 08/04/2019;
Original Source = Paid Search;
Original Source Drill Down 1 = GDN;
How is the best way of doing that?
Thank you,
Hi @Adaptive, you’re using the get all contacts endpoint, correct? If so, you need to use &property not &properties. You can add multiple &property items to the URL. You should also be using the internal value of the property, not the Label. Check the property in your settings to find the internal value.
All the information you’re looking for can be found in the docs here: https://developers.hubspot.com/docs/methods/lists/get_list_contacts
The request will not “filter” the contacts. It will still return all contacts, but by adding the &property parameter, it’ll return the fields you specify in the URL in the response. From the docs on the property param:
“By default, only a few standard properties will be included in the response data. If you include the ‘property’ parameter, then you will instead get the specified property in the response. This parameter may be included multiple times to specify multiple properties. NOTE: Contacts only store data for properties with a value, so records with no value for a property will not include that property, even if the property is specified in the request URL.”