# Get line\_item\_id for a specific product

**URL:** <https://community.hubspot.com/t/get-line-item-id-for-a-specific-product/22141>\
**Category:** APIs & Integrations\
**Tags:** cms-content, developer-tools\
**Created:** [June 26, 2020, 5:00am UTC](https://community.hubspot.com/t/get-line-item-id-for-a-specific-product/22141 "2020-06-26T05:00:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![himanshurauthan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/himanshurauthan/32/53076_2.png) [@himanshurauthan](https://community.hubspot.com/u/himanshurauthan)\
**Post date:** [June 26, 2020, 5:20am UTC](https://community.hubspot.com/t/get-line-item-id-for-a-specific-product/22141/2 "2020-06-26T05:20:12Z")

</div>

Hii @purrlo

Have you completed running creation of line items API in which we send HS Product Id? Additionally this is the process to do the above:  
1. Create Product in HS library using [Create a Product](https://legacydocs.hubspot.com/docs/methods/products/create-product) . Save the object ID returned from HubSpot at your end.  
2. Create a deal and save the deal id at your end  
3. Run line items api using [Create Line Item](https://legacydocs.hubspot.com/docs/methods/line-items/create-line-item) . The hs\_product\_id here is the object id from 1st step. Save the line item object id returned in 202 response.  
4. Run [Associate CRM objects](https://legacydocs.hubspot.com/docs/methods/crm-associations/associate-objects) to associate line items and deals. Use 20 as definition ID to associate line item to deal.  
Thanks

---

_[View the full topic](https://community.hubspot.com/t/get-line-item-id-for-a-specific-product/22141)._
