<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get line_item_id for a specific product in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531597#M49005</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/282323"&gt;@MarkusHue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you are creating the line item, you will use that hs_product_id in the post request.&amp;nbsp; The json body you send would look something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "properties": {
    "hs_product_id": "191902"
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;Can be as simple as that.&amp;nbsp; You will then get a response which includes the ID for the newly created line item.&amp;nbsp; With that ID, you will use the associations endpoint to associate this line item with your deal of choice.&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 15:21:36 GMT</pubDate>
    <dc:creator>dennisedson</dc:creator>
    <dc:date>2021-11-24T15:21:36Z</dc:date>
    <item>
      <title>Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/350073#M34315</link>
      <description>&lt;P&gt;I am trying to use the API to add a particular product to certain deals. Reading the documentation, I understand this must be done by an object association (definition 19 or 20) using the line_item_id -- however I can't for the life of me locate the line_item_id for this particular product!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to locate by listing all line items, however there are hundreds to filter through, and it doesn't seem to allow searching via product ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a simple way to get the appropriate hs_product_id's line_item_id?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 05:00:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/350073#M34315</guid>
      <dc:creator>purrlo</dc:creator>
      <dc:date>2020-06-26T05:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/350075#M34317</link>
      <description>&lt;P&gt;Hii &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/136736"&gt;@purrlo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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:&lt;BR /&gt;&lt;BR /&gt;1. Create Product in HS library using &lt;A title="Create a Product" href="https://legacydocs.hubspot.com/docs/methods/products/create-product" target="_blank" rel="noopener"&gt;Create a Product&lt;/A&gt; . Save the object ID returned from HubSpot at your end.&lt;BR /&gt;2. Create a deal and save the deal id at your end&lt;BR /&gt;3. Run line items api using &lt;A title="Create Line Item" href="https://legacydocs.hubspot.com/docs/methods/line-items/create-line-item" target="_blank" rel="noopener"&gt;Create Line Item&lt;/A&gt; . The hs_product_id here is the object id from 1st step. Save the line item object id returned in 202 response.&lt;BR /&gt;4. Run &lt;A title="Associate CRM objects" href="https://legacydocs.hubspot.com/docs/methods/crm-associations/associate-objects" target="_blank" rel="noopener"&gt;Associate CRM objects&lt;/A&gt; to associate line items and deals. Use 20 as definition ID to associate line item to deal.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 05:20:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/350075#M34317</guid>
      <dc:creator>himanshurauthan</dc:creator>
      <dc:date>2020-06-26T05:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/350078#M34318</link>
      <description>&lt;P&gt;The products and deals already exist, I just thought I could link the two - add product A) to existing deal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I seem to have misunderstood how the line_item_id works - so I need to create a line item for the deal, and then associate the line item to the deal, for each deal instance?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 05:35:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/350078#M34318</guid>
      <dc:creator>purrlo</dc:creator>
      <dc:date>2020-06-26T05:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/414226#M41038</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/20405"&gt;@himanshurauthan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to get the Object ID for a Product in the Product Library in the HubSpot frontend UI?&amp;nbsp; I am using a middleware solution where the the connector does not searching up the Product via API to get that ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The end goal is using CRM Association to assign a Product (line item) to a Deal, but the only piece I'm missing is the Product ID.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 16:54:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/414226#M41038</guid>
      <dc:creator>JChen1</dc:creator>
      <dc:date>2021-03-02T16:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531446#M48988</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;as i´m searching at the moment for solutions within this topic i´v seen your post. As far as i´ve learned you need this API to getting this id:&lt;/P&gt;&lt;P&gt;&lt;A href="https://legacydocs.hubspot.com/docs/methods/products/get_product_by_id" target="_blank"&gt;https://legacydocs.hubspot.com/docs/methods/products/get_product_by_id&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This id is not shown in the product library and cannot be exported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: Do you have a solution for your purpose in the meantime (adding products to deals via API)?&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:01:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531446#M48988</guid>
      <dc:creator>MarkusHue</dc:creator>
      <dc:date>2021-11-24T12:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531549#M48994</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/282323"&gt;@MarkusHue&lt;/a&gt; , Products cannot be associated with another object.&amp;nbsp; You will want to look at &lt;A href="https://developers.hubspot.com/docs/api/crm/line-items" target="_blank" rel="noopener"&gt;line items&lt;/A&gt; which can be considered a subset of products which can be associated with deals&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 14:31:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531549#M48994</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-11-24T14:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531557#M48996</link>
      <description>&lt;P&gt;Hi Dennis,&lt;/P&gt;&lt;P&gt;thanks for your answer. Ok, i think i understand this way. But still unclear for me, how we come to the specific line item of a product in a deal. A single product (a unique hs_product_id) - always the same product -&amp;nbsp; can be sold in different deals. So, we should have different line item ids (for every deal a unique line item id). Am i right?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 14:38:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531557#M48996</guid>
      <dc:creator>MarkusHue</dc:creator>
      <dc:date>2021-11-24T14:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531578#M48998</link>
      <description>&lt;P&gt;Yep!&lt;/P&gt;
&lt;P&gt;Consider your products as a repository from which you can pull from.&amp;nbsp; Kind of like a collection.&amp;nbsp; When you take an individual item from this group, it is then considered a line item and that individual line item is then associated with the deal&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 14:51:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531578#M48998</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-11-24T14:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531586#M49001</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks. But still unclear for me, how we create the "line item" or how we can import a product (as a line item) into a specific deal (existing deal id). Here i´m struggling at the moment! BR&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 14:59:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531586#M49001</guid>
      <dc:creator>MarkusHue</dc:creator>
      <dc:date>2021-11-24T14:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531597#M49005</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/282323"&gt;@MarkusHue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you are creating the line item, you will use that hs_product_id in the post request.&amp;nbsp; The json body you send would look something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "properties": {
    "hs_product_id": "191902"
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;Can be as simple as that.&amp;nbsp; You will then get a response which includes the ID for the newly created line item.&amp;nbsp; With that ID, you will use the associations endpoint to associate this line item with your deal of choice.&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 15:21:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531597#M49005</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-11-24T15:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531602#M49007</link>
      <description>&lt;P&gt;Thanks, we´ll check!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 15:27:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/531602#M49007</guid>
      <dc:creator>MarkusHue</dc:creator>
      <dc:date>2021-11-24T15:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/532077#M49025</link>
      <description>&lt;P&gt;Hi Dennis,&lt;/P&gt;&lt;P&gt;i´m facing a new question on this topic: As of yet i thought the "Object ID" of an product (which we have already imported into Hubspot and which is created by Hubspot; these value is one of the product values in Hubspot) is the "hs_product_id" (object id is equal to hs_product_id). But it seems to me, that this assumption is not correct. So, where can i see or find the value "hs_product_id" for a single product, which should be included to a Deal? BR Markus&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 10:29:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/532077#M49025</guid>
      <dc:creator>MarkusHue</dc:creator>
      <dc:date>2021-11-25T10:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/533519#M49073</link>
      <description>&lt;P&gt;If you use the get all products endpoint ( &lt;STRONG&gt;&lt;A href="https://api.hubapi.com/crm/v3/objects/products" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/products&lt;/A&gt; &lt;/STRONG&gt;), the hs_product_id will be returned for each. Example:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; "results": [
        {
            "id": "252884638",
            "properties": {
                "createdate": "2020-11-04T16:34:39.975Z",
                "description": "this is a test",
                "hs_lastmodifieddate": "2020-11-04T16:34:39.975Z",
                "hs_object_id": "252884638",
                "name": "Test Product",
                "price": "1"
            },
            "createdAt": "2020-11-04T16:34:39.975Z",
            "updatedAt": "2020-11-04T16:34:39.975Z",
            "archived": false
        }&lt;/LI-CODE&gt;
&lt;P&gt;If you want to create a line item of this product, you will use the &lt;STRONG&gt;hs_object_id&lt;/STRONG&gt; that you see in the above block.&lt;/P&gt;
&lt;P&gt;Hopefully, I understood the question correctly&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 16:26:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/533519#M49073</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-11-29T16:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get line_item_id for a specific product</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/534008#M49083</link>
      <description>&lt;P&gt;Hi Dennis,&lt;/P&gt;&lt;P&gt;many thanks for your answer. We are on it and testing with the API V3 at the moment. Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 09:56:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-line-item-id-for-a-specific-product/m-p/534008#M49083</guid>
      <dc:creator>MarkusHue</dc:creator>
      <dc:date>2021-11-30T09:56:53Z</dc:date>
    </item>
  </channel>
</rss>

