Hello, i have an issue with the intégration of the endpoint /objects/product/search using python Requests.
I have to type of products stored in two different folders: Programmes and Lots.
I want to use the search endpoint to retrieve only one category of products (let’s say the Lots)
code exemple:
data = {
"properties": ["hs_folder_id,hs_price_eur,createdate,lot__availability_date,lot__available,lot__description,lot__equipements,lot__fiscality_type,lot_floor,lot__floor_display,lot__id,lot__images,lot__living_space,lot_number_of_rooms,lot__orientation,lot__programme_id,lot__programme_name,reference,lot__rent,lot__type"],
"filtersGroups": [{"filters": [
{"propertyName": 'hs_folder_id',
'operator': 'EQ',
'value': HubspotFolders.LOTS.value}
]}]
}
response = r.post(base_url+'products/search', params={**base_query}, json=data)
hubspot_lots = response.json()['results']
base_query contain my auth token, data is the payload of the request and base_url is the url of the hubspot api
HubspotFolders.LOTS == 2382461
HubspotFolders.PROGRAMMES == 2382460
IDs of the hubspot folders object.
expected result:
one lot with hs_folder_id == 2382461
actual result:
10 programmes objects with hs_folder_id 2382460 (10 being the default size of result list)