APIs & Integrations

wue
参加者

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

解決

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件の承認済みベストアンサー
WendyGoh
解決策
HubSpot Employee
HubSpot Employee

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

解決

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. 

元の投稿で解決策を見る

5件の返信
Carly_Farlow
投稿者

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

解決

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 いいね!
WendyGoh
解決策
HubSpot Employee
HubSpot Employee

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

解決

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
参加者

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

解決

Thanks.

0 いいね!
wue
参加者

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

解決

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 いいね!
WendyGoh
HubSpot Employee
HubSpot Employee

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

解決

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 いいね!