APIs & Integrations

JustinDowty
Participante | Parceiro Diamante
Participante | Parceiro Diamante

Get Lists that a company belongs to by ID

resolver

Is it possible to get all of the lists that a company is a part of via the API? This is possible for contacts in the V1 API by using the optional showListMemberships parameter: https://legacydocs.hubspot.com/docs/methods/contacts/get_contact. I wasn't able to find a way to do this for Companies with any of the APIs, and for Contacts the V3 API didn't have that same functionality available that the V1 has (but I would rather be using the latest API). Does anyone know of a way to accomplish this?

1 Solução aceita
himanshurauthan
Solução
Autoridade no assunto | Parceiro Elite
Autoridade no assunto | Parceiro Elite

Get Lists that a company belongs to by ID

resolver

Hello @JustinDowty,

 

You can go with this https://legacydocs.hubspot.com/docs/methods/lists/get_lists API. With this, you can get all the lists of a specific portal and from their responses, you can get to know that if any lists have the company in it as a condition or something. Alternatively, if you know the ID of the list in which company is used then you can go with https://api.hubapi.com/contacts/v1/lists/listID?hapikey=demo, and at the place of listID you have to send your list ID in which the company is used.

 

Hope this will help you.

Digital Marketing & Inbound Expert In Growth Hacking Technology

Exibir solução no post original

2 Respostas 2
webdew
Orientador(a) | Parceiro Diamante
Orientador(a) | Parceiro Diamante

Get Lists that a company belongs to by ID

resolver

Hi @JustinDowty ,

if you want to get all companies in your portal than you can refer to this doc https://legacydocs.hubspot.com/docs/methods/companies/get-all-companies and if you want to get all contacts associated to single company then you can refer to this doc https://legacydocs.hubspot.com/docs/methods/companies/get_company_contacts

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

0 Avaliação positiva
himanshurauthan
Solução
Autoridade no assunto | Parceiro Elite
Autoridade no assunto | Parceiro Elite

Get Lists that a company belongs to by ID

resolver

Hello @JustinDowty,

 

You can go with this https://legacydocs.hubspot.com/docs/methods/lists/get_lists API. With this, you can get all the lists of a specific portal and from their responses, you can get to know that if any lists have the company in it as a condition or something. Alternatively, if you know the ID of the list in which company is used then you can go with https://api.hubapi.com/contacts/v1/lists/listID?hapikey=demo, and at the place of listID you have to send your list ID in which the company is used.

 

Hope this will help you.

Digital Marketing & Inbound Expert In Growth Hacking Technology