APIs & Integrations

Mhokano
Participant

List Product Folders

Hello,

 

How to list all Product Folder and hs_folder_id from a Portal using API? Is this possible?

Thanks

 

Marcelo

 

0 Upvotes
5 Replies 5
Mhokano
Participant

List Product Folders

Thanks, but this will work just if I had products in these folders, but If I have just folders without any products?

0 Upvotes
dennisedson
Community Manager
Community Manager

List Product Folders

@Mhokano 

I do not believe that this is possible.  I suggest you submit an idea for it.

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
dennisedson
Community Manager
Community Manager

List Product Folders

@Mhokano Have you explored the CRM Objects API for products?

Your call would look something like this:

https://api.hubapi.com/crm/v3/objects/products?archived=false&hapikey={{hapikey}}&properties=hs_fold...

Where {{hapikey}} would be replaced with your own key

 

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
cwh8944
Contributor

List Product Folders

When I make this API call, the hs_folder_id returns as null. Any suggestions? I was hopeful and thought I had a solution that I've been spending weeks trying to find, but ran into this blocker. Any insight would be greatly appreciated!!!

0 Upvotes
dennisedson
Community Manager
Community Manager

List Product Folders

If the products are in a folder, you should get an id for the folder..

Just to make sure I wasn't crazy, just ran it again.  Here is an example of what was returned with one product in a folder and the other not

{
            "id": "462948443",
            "properties": {
                "createdate": "2020-12-21T21:13:13.372Z",
                "hs_folder_id": "1858187",
                "hs_lastmodifieddate": "2021-07-14T14:53:59.007Z",
                "hs_object_id": "462948443"
            },
            "createdAt": "2020-12-21T21:13:13.372Z",
            "updatedAt": "2021-07-14T14:53:59.007Z",
            "archived": false
        },
        {
            "id": "519193051",
            "properties": {
                "createdate": "2021-01-04T17:36:09.036Z",
                "hs_folder_id": null,
                "hs_lastmodifieddate": "2021-11-12T19:46:50.842Z",
                "hs_object_id": "519193051"
            },
            "createdAt": "2021-01-04T17:36:09.036Z",
            "updatedAt": "2021-11-12T19:46:50.842Z",
            "archived": false
        }
Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes