See custom properties values in Line Item within a Deal
SOLVE
We are creating custom properties for Products and Line Items using the APIs POST /properties/v2/products/properties and POST /properties/v2/line_items/properties.
We are then able to add line items with all these properties populated to a Deal. However, I cannot find a way to look at these properties from the available APIs that I know for line items.
I have the line-item id as well as line item external Object Id in hand but these do not provide me the other custom properties for the line item.
I used the following endpoints:
GET /crm-objects/v1/objects/line_items/:id
GET /crm-objects/v1/objects/line_items/paged
POST /crm-objects/v1/objects/line_items/batch-read
Sample Response for a line item from all these endpoints:
Why are the custom properties that we have created for the product/line-item not visible in the response? The only property in the response is hs_product_id.
Is there any other API from which I will be able to view other custom properties that I have created?
From the HubSpot UI I am able to view these custom properties from Contacts > List and then create a list based on these custom properties to filter the contacts but I am not able to look at them. Please suggest a way via UI/API to look at the line item properties.
"By default, only the ID, a few other system fields, and the hs_product_id are returned for the line items. You can include other line item properties in the response by requesting them in the URL. This parameter can be included multiple times to request multiple properties. See the example for more details."
This explains why you're only seeing the hs_product_id. In order to view the other properties, you can use &properties={{the internal value of the line item propety}}, in the request URL.
"By default, only the ID, a few other system fields, and the hs_product_id are returned for the line items. You can include other line item properties in the response by requesting them in the URL. This parameter can be included multiple times to request multiple properties. See the example for more details."
This explains why you're only seeing the hs_product_id. In order to view the other properties, you can use &properties={{the internal value of the line item propety}}, in the request URL.