Scope requirements
Scope requirements
Create a line item
To create a line item, make aPOST request to /crm/objects/2026-03/line_items. In the request body, include the line item’s details, such as name, quantity, and price. You may also want to include additional data in the request body:
- To create a line item based on an existing product (created through the products API or in HubSpot), include
hs_product_idin the request body. - To include the tax rate for your line item, include its ID as the
hs_tax_rate_group_idwithin thepropertiesfield of the request body. - You can also associate the line item with deals, quotes, invoices, payment links, or subscriptions by including an
associationsarray in the request body. For example, the request body below would create a line item named “New standalone line item” that’s associated with a deal (ID:12345).
Tiered pricing
Line items support the same tiered pricing model as products. You can create a tiered pricing line item in two ways:- Based on an existing product: include
hs_product_idin the request body. The tiered pricing properties are inherited from the product. - Directly on the line item: include
hs_pricing_model,hs_tier_ranges, andhs_tier_pricesin thepropertiesobject of the request body, using the same format as products.
GET request to /crm/objects/2026-03/line_item/{lineItemId}?properties=hs_pricing_model,hs_tier_ranges,hs_tier_prices
The response will include the tiered pricing properties:
Recurring billing
When creating a line item with recurring billing, two properties control billing behavior:recurringbillingfrequency and hs_recurring_billing_period. These properties configure how frequently the customer is charged and for how long (i.e., how many payments).
recurringbillingfrequency: how often the customer is billed. Valid values areweekly,biweekly,monthly,quarterly,per_six_months,annually,per_two_years,per_three_years,per_four_years, andper_five_years.hs_recurring_billing_period: the total billing duration, in ISO 8601 duration format (PnYnMnDorPnW). Setting this property alongsiderecurringbillingfrequencylimits billing to a fixed number of payments. Omit this property to automatically renew billing until canceled.
PnW (weeks) format with weekly or biweekly frequency, and PnM or PnY (months/years) format with all other frequencies.
recurringbillingfrequency | hs_recurring_billing_period | Result |
|---|---|---|
weekly | P12W | 12 weekly payments (12 weeks total) |
monthly | P8M | 8 monthly payments (8 months total) |
quarterly | P1Y | 4 quarterly payments (1 year total) |
annually | P3Y | 3 annual payments (3 years total) |
monthly | (not set) | billing renews monthly until canceled |
P8M represents 8 months, and combined with monthly frequency, results in 8 total payments.
hs_recurring_billing_period is omitted, billing continues until the subscription is canceled.
- Setting
hs_recurring_billing_end_datealone does not create fixed-term billing. Usehs_recurring_billing_periodto limit a recurring line item to a specific number of payments. - The
hs_recurring_billing_termsproperty andhs_recurring_billing_number_of_paymentsare both calculated automatically from the period and frequency. You cannot set them directly.
Retrieve a line item
You can retrieve line items individually or in bulk.- To retrieve a specific line item, make a
GETrequest to/crm/objects/2026-03/line_items/{lineItemId}wherelineItemIdis the ID of the line item. - To retrieve all line items, make a
GETrequest to/crm/objects/2026-03/line_items.
| Parameter | Description |
|---|---|
properties | A comma-separated list of the properties to be returned in the response. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a line item doesn’t have a value, it will be returned as null. |
propertiesWithHistory | A comma-separated list of the properties to be returned along with their history of previous values. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a line item doesn’t have a value, it will be returned as null. |
Update a line item
To update a line item, make aPATCH request to /crm/objects/2026-03/line_items/{lineItemId}, where lineItemId is the ID of the line item.
In the request body, include the property values that you want to update. You cannot update associations through this method. Instead, use the associations API.
For example, your request body might look similar to the following:
Delete a line item
To delete a line item, make aDELETE request to /crm/objects/2026-03/line_items/{lineItemId}, where lineItemId is the ID of the line item.
Line item properties
For a full list of default line item properties, see the Line item object definition. To retrieve all line item properties from your account, including any custom properties, make aGET request to /crm/properties/2026-03/line_items. Learn more about using the properties API.
When line items are cloned (for example, when cloning a deal to a quote, or a quote to a new quote), properties with unique values (
hasUniqueValue: true) are not copied to the new line items. This is because uniqueness is enforced across all line items, and copying the value would cause a conflict. To set unique property values on cloned line items, update the line items after creation.Retrieve tax rates
You can apply a tax rate to individual line items (e.g., a MA Sales tax of 6.25%). Once you configure your tax rate library in your HubSpot account, you can then make aGET request to /tax-rates/v1/tax-rates to fetch all tax rates, or /tax-rates/v1/tax-rates/{taxRateId} to fetch a tax rate by its ID. Your app will need to authorize the tax_rates.read scope to make this request.
The resulting response will resemble the following:
| Property name | Description |
|---|---|
name | The internal descriptor for the tax rate. |
percentageRate | The value of the tax rate, expressed as a percentage. |
label | The buyer-facing descriptor of the tax rate, shown on the quote, invoice, or other parent objects. |
active | A boolean that denotes whether the tax rate can be applied to a new quote or invoice. You might set this to false for a previous year’s tax rate that’s no longer applicable. |
id | The ID of the tax rate. |
createdAt | An ISO 8601 timestamp denoting when the tax rate was created. |
updatedAt | An ISO 8601 timestamp denoting when the tax rate was last updated. |
id for the hs_tax_rate_group_id within the properties field when creating a line item. Learn more about creating line items in the section above.