APIs & Integrations

wue
Participante

How can I retrieve the product association with a deal through API?

resolver

I have a deal created with the selected product associated to the deal. Can I get the product association with the deal through the API?

1 Solução aceita
WendyGoh
Solução
HubSpot Employee
HubSpot Employee

How can I retrieve the product association with a deal through API?

resolver

Hi @wue,

 

I hope all is well with you 😄

 

When looking to get the product association with the deal API, you can do so by going through the following steps:

1. Use this endpoint: Get associations for CRM object to get the deals and line items association (Line item contains the product details as it represent a line in an order).

Note: The definition ID here is 19 - https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview (Deal to line item)

2. Once we retrieve the line items id, we can use this endpoint: Get line item by ID to get the product id, name, quantity and price. 

Exibir solução no post original

5 Respostas 5
Carly_Farlow
Colaborador(a)

How can I retrieve the product association with a deal through API?

resolver

Hi there! Curious what tool you are integrating with for the products tool?

 

We have found lots of limitations with moving forward with the products tool and would love to find a way to export all that is needed to get all products' feature into another tool that will allow us to view in an aggregated way.

0 Avaliação positiva
WendyGoh
Solução
HubSpot Employee
HubSpot Employee

How can I retrieve the product association with a deal through API?

resolver

Hi @wue,

 

I hope all is well with you 😄

 

When looking to get the product association with the deal API, you can do so by going through the following steps:

1. Use this endpoint: Get associations for CRM object to get the deals and line items association (Line item contains the product details as it represent a line in an order).

Note: The definition ID here is 19 - https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview (Deal to line item)

2. Once we retrieve the line items id, we can use this endpoint: Get line item by ID to get the product id, name, quantity and price. 

Kapil
Participante

How can I retrieve the product association with a deal through API?

resolver

Thanks.

0 Avaliação positiva
wue
Participante

How can I retrieve the product association with a deal through API?

resolver

Thanks, Wendy. That works great. 

Do you have a list of Line Items properties?I followed the examples on the page and get the property value of name, price and quantity, but would like to have te full list of properties as reference. 

 https://developers.hubspot.com/docs/methods/line-items/get_line_item_by_id

 

Thanks,

Emma

0 Avaliação positiva
WendyGoh
HubSpot Employee
HubSpot Employee

How can I retrieve the product association with a deal through API?

resolver

Hi @wue,

 

You can get all the line items properties by using this endpoint here: Get all object properties -- 

/properties/v2/line_items/properties

 

 

0 Avaliação positiva