In HubSpot, products represent the goods or services you sell. The products endpoints allow you to manage and sync this data.
POST
request to crm/v3/objects/products
. In the request body, include a properties
object containing any product properties that you’d like to set on create. You can later update a product’s properties through a PATCH
request to the same endpoint.
To see all available product properties, make a GET
request to the properties API. To retrieve product properties, the request URL will be /crm/v3/properties/products
.
hs_recurring_billing_period
is formatted as P#M
, where # is the number of months.1234567
. For a full list of available line item properties, make a GET
request to the properties API. The URL for line items would be crm/v3/properties/line_items
. Because you’re create the line item from an existing product, it will inherit property values from the product, such as price.
7791176460
.
To associate the line item with an existing deal (ID: 14795354663
), you’ll make a PUT
request to /crm/v4/objects/line_items/7791176460/associations/default/deals/14795354663
. This request uses the default association type.
A 200
response will return information similar to the following:
associations
array in the line item create request.
To create the line item, make a POST
request to crm/v3/objects/line_item
. Your request body will look similar to the following. Note that the associationTypeId
for the line item-deal association is 20
. Learn more about association types between different types of CRM records.
200
response will return details about the new line item. In HubSpot, the deal record will display the line item in the Line items card.