LineitemAssociations
Returns object IDs associated with specific line items in HubSpot, supporting deal line item relationships.
Table-Specific Information
SELECT
The LineitemAssociations table always includes the same set of columns, but some return NULL unless you filter by Id and Type, which allows the component to retrieve full association details.
To return full details for Line Item associations, filter by both the Line Item Id and the association Type.
The Type identifies the associated object (such as a Deal, Company, Contact, or Ticket).
-- Retrieve all fields for associations between a specific Line Item and its related Deals
SELECT *
FROM LineItemAssociations
WHERE Id = '436648510605' -- LineItem Id
AND Type = 'Deal'; -- Associated object type
Note: Fetching all fields can cause a reduction in performance, as it requires the component to make requests for each LineItem.
DELETE
To remove a Line Item association, include both the Line Item Id and the association Type:
-- Delete a LineItem-Deal association
DELETE FROM LineItemAssociations
WHERE Id = '436648510605' -- LineItem Id
AND Type = 'Deal'; -- Associated object type
Columns
| Name | Type | ReadOnly | References | Filterable | Description |
| Id [KEY] | Long | False |
Lineitems.Id | False |
Unique identifier of the LineItem record. |
| AssociationId [KEY] | Long | False | False |
Unique identifier of the object associated with this LineItem. | |
| Type [KEY] | String | False | False |
The type of the associated object, such as a contact, deal, or ticket. | |
| TypeId [KEY] | String | False |
AssociationsLabels.TypeId | False |
Numeric ID representing the specific association type. This field is empty for general association queries. |
| Category [KEY] | String | False |
AssociationsLabels.Category | False |
The category of the association type for the object pair. This field is empty for general association queries. |
| TypeLabel | String | True |
AssociationsLabels.Label | False |
The descriptive label assigned to the association type between objects. |