LineItems
Query the available line items in HubSpot.
Table Specific Information
A line item represents a line in an order, containing details such as the product, quantity, and price for each line of an order.
SELECT
When selecting line items, they can be filtered by ID or by ID and IncludeDeleted. For example:
SELECT * FROM LineItems WHERE Id = '123456789' SELECT * FROM LineItems WHERE Id = '123456789' AND IncludeDeleted = 'true'
INSERT
When creating a new line item ProductId is required. You can also specify Name, Description, Price and Quantity. For example:
INSERT INTO LineItems (ProductId, Name, Description, Quantity, Price) VALUES ('123', 'NameExample', 'DescriptionExample', '50', '1324')
UPDATE
When updating line items, you can change non readOnly field by specifying the line item Id. For example:
UPDATE LineItems SET Name = 'UpdatedName', Description = 'Updated description', Price = 123 WHERE id = '123'
DELETE
You can delete line items singularly by Id, or in batches. For example:
DELETE FROM LineItems WHERE Id = 123 DELETE FROM LineItems WHERE Id IN ( '123', '234')
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Long | True |
The internal ID for this line item. | |
Name | String | False |
The name for the product for this line item. | |
Price | String | False |
The price of the line item. | |
Quantity | String | False |
The quantity of the line item. | |
Description | String | False |
The description of the line item. | |
ProductId | String | False |
The objectId of a product object, and represents the product being sold. It is required when you create a new line item. | |
Version | Integer | True |
The current version of this line item. This is incremented each time the line item is updated. | |
IsDeleted | Boolean | True |
Boolean indicating whether or not the line item is deleted. Deleted records will not be included unless you specifically request that deleted records be included. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
Name | Type | Description |
IncludeDeleted | String |
By default, deleted records will not be returned by the API. When selecting by Id, you can include this parameter to make sure that records are returned even when they are deleted |