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

SOLVE
Highlighted
Occasional Contributor

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 Accepted solution

Accepted Solutions
Highlighted
HubSpot Moderator

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 Replies 5
Highlighted
HubSpot Moderator

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. 

Highlighted
Occasional Contributor

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

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Hi @wue,

 

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

/properties/v2/line_items/properties

 

 

Reply
0 Upvotes
Highlighted
Regular Contributor

Thanks.

Reply
0 Upvotes
Highlighted
Regular Contributor

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.

Reply
0 Upvotes