LineItems

Retrieve the available LineItems in HubSpot. This table supports both OAuth and APIKey authentications.

Table Specific Information

In HubSpot, line items can be thought of as a subset of products. When a product is attached to a deal, it becomes a line item. You can create line items that are unique to an individual quote, but they will not be added to your product library.

Select

When selecting line items, they can be filtered by columns marked below as 'Filterable'. For those columns, the supported server-side operators are =, !=, <, <=, >, >=. Further filtering is available using AND and OR combinations. A maximum of 2 OR operators are supported server-side, with each of these operators supporting up to 2 AND operators inside of them. For example:

SELECT * FROM LineItems WHERE [Amount] > 1000 AND [Quantity] >= 10
SELECT * FROM LineItems WHERE [Product price] = 40 OR [Product description] = 'White t-shirt'

In the below server-offloading examples, "{Column}" represents any column you'd like to filter and "{Value}" represents any value you want to filter it on:

SELECT * FROM LineItems WHERE {Column} = {Value} AND {Column} < {Value} AND {Column} > {Value}
SELECT * FROM LineItems WHERE {Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value}
SELECT * FROM LineItems WHERE ({Column} = {Value} AND {Column} = {Value}) OR ({Column} != {Value} AND {Column} >= {Value})
SELECT * FROM LineItems WHERE ({Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value}) OR ({Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value}) OR ({Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value})

Insert


INSERT INTO LineItems(Description, [Product ID]) VALUES('description', '33318601')

Update


UPDATE LineItems SET Description = 'new description' WHERE ID='168209183'

Delete


DELETE FROM Deals WHERE ID='168209183'

Columns

Name Type ReadOnly References Filterable Description
Id [KEY] Long False True

Unique identifier of the line item.

Archived Bool True False

Whether the line item is archived or not.

CreatedAt Datetime True False

When the line item was created.

UpdatedAt Datetime True False

When the line item was last updated.

Amount Double True True

The amount of a line item

Create_Date Datetime False True

The date the line item was created

Product_description String False True

Full description of product

Discount_Amount Double False True

The discount amount applied

Cost_of_goods_sold Double False True

The amount that sold goods cost the HubSpot customer

Created_by_user_ID Double True True

The user that created this object. This value is automatically set by HubSpot and may not be modified.

Object_create_date_time Datetime True True

The date and time at which this object was created. This value is automatically set by HubSpot and may not be modified.

Discount_Percentage Double False True

The discount percentage applied

Last_Modified_Date Datetime True True

The date any property on this product was modified

Currency String False True

Currency code for the line item.

Merged_object_IDs String True True

The list of object IDs that have been merged into this object. This value is automatically set by HubSpot and may not be modified.

Object_ID Double True True

The unique ID for this object. This value is automatically set by HubSpot and may not be modified.

Position_on_quote Double False True

The order which the line item appears on the quotes

Product_ID Double False True

ID of the product this was copied from

End_Date Date True True

Recurring billing end date for a line item

Term String False True

Product recurring billing duration

Start_Date Date False True

Recurring billing start date for a line item

Sync_amount Double True True

The amount set by Ecommerce sync

Updated_by_user_ID Double True True

The user that last updated this object. This value is automatically set by HubSpot and may not be modified.

Name String False True

Product name

Product_price Double False True

Cost of product

Quantity Double False True

How many units of a product are in this line item

Recurring_billing_frequency String False True

How frequently the product is billed

Tax Double False True

The tax amount applied