New API: Line Items


#1

What's Happening?

Line items link products and the specific information about the sale of a product, to your deals within HubSpot. This could include information such as quantity or price of a product that is being ordered. Line items link products, along with specific information about the sale of a product, to your HubSpot deals.

What's Changing?

Nothing; this is an entirely new API! Check out the developer documentation here.

When is this happening?

The Line Items API is now live; integrators can begin using it immediately.

Feel free to reach out in the comments below with any questions/concerns!


#2

Hey Derek,

I could be looking in the wrong place, but didn't find any references to the term or unite price of the line items in the products.

We're looking into using this information to update custom subscription properties on companies.

Is this something that is already available, or will be at some point?


#3

Hi @Erno_Pyykko,

By default, the response will only include the ID, a few system fields for the line item, and the hs_product_id property. You can get specific properties in the response by using the &properties= parameter in the URL, and that parameter can be included multiple times to get multiple properties.


#5

Hey Derek,

Thanks for your help, got it working.

Regards,
Erno


#6

Hi Derek,

While trying to create a line item through API(https://developers.hubspot.com/docs/methods/line-items/create-line-item). Am getting this error. Can you please help me out. HubID:4594085

{
"status": "error",
"message": "Must have scope DEAL_LINE_ITEM_WRITE",
"correlationId": "f36f92bb-0858-4d6c-bd79-b5865af2e547",
"requestId": "b548139141da37db137e94299ceaea90"
}


#7

Derek,

Is this error "DEAL_LINE_ITEM_WRITE" is due to the product am using?

Currently am using the developer account and the test application, where the product it says "Sales Free".


#8

Hi @immanuel,

It's possible there are a couple of things going on. Can you give me the Hub ID of the portal you're trying to create line items in? Also are you using OAuth or hapikey authentication?


#9

Hi Derek,
If we already have price data stored in a Deal and/or Product, we are using the Line Item only as a join. Especially as that's how it appears in the Web UI - displaying a Deal shows a little box with the Product in it.

Do I need to be creating a Line Item per Deal, or is per Product sufficient?

How does it work behind the scenes for the Web UI display?

Also, please confirm I still need to make a further "join hop" using the " CRM object properties API"?

Basically, all I'm trying to do is:

  1. For a given Deal, lookup the Product
  2. For a given Product, look up the Deals

We're talking about 40,000 Deals across 80 Products.