canonical: https://jentic.com/apis/hubspot.com/hubspot-crm-line-items

# HubSpot Line Items

The HubSpot CRM Line Items API manages the priced rows that compose deals, quotes, invoices, and subscriptions in HubSpot Commerce. It exposes single-record CRUD, batch read, batch create, batch update, batch upsert, batch archive, and search for line item records with full property and association support. Use it to build a quote out of products, attach line items to a deal during pipeline progression, or sync line-level pricing data between HubSpot and an external billing or e-commerce system.

## For AI agents

Manage HubSpot line item records that represent the priced rows on deals, quotes, invoices, and subscriptions, with batch and search support.

## Scope

Does not handle product catalog management, payment capture, or tax calculation - use for HubSpot line item record management only.

## Capabilities

- Create individual or batched line items and link them to a parent deal, quote, invoice, or subscription
- Search line items by property filters such as product ID, amount, or quantity
- Update line item price, quantity, discount, or term in a single record or in batch
- Archive obsolete line items without affecting the parent deal or quote
- Upsert line items by a unique external identifier to keep a billing system mirror in sync

## Use cases

### Build a Quote with Multiple Products

When a sales rep or agent assembles a quote in HubSpot, each product on the quote is a separate line item record. Using the batch create endpoint, an integration can write all the line items in a single call and link them to the parent quote via the associations array. This pattern keeps the quote consistent with the source product catalogue and avoids per-row API calls.

Example prompt: POST /crm/v3/objects/line_items/batch/create with up to 100 line item records, each carrying an associations entry for the parent quote, and confirm the response status array reports zero errors.

### Mirror Stripe Subscription Items into HubSpot

Reflect the line-item composition of a Stripe subscription on the corresponding HubSpot subscription record so the CRM shows the same priced rows the customer is actually being billed for. Batch upsert keyed by an external Stripe item ID handles both create and update in one call, which is the typical pattern for a sync that runs every few minutes off Stripe webhooks.

Example prompt: POST /crm/v3/objects/line_items/batch/upsert with line item records keyed by stripe_item_id, each linked via associations to the HubSpot subscription record.

### Agent-Driven Quote Adjustment

An AI agent that drafts or revises quotes can search for the existing line items on a deal, recompute pricing or quantities, and update the records via batch update. Through Jentic, the agent finds the relevant line item operations by intent and chains search and update calls without browsing HubSpot's REST docs.

Example prompt: Search line items via POST /crm/v3/objects/line_items/search filtered by associated deal ID, then POST /crm/v3/objects/line_items/batch/update with new price values reflecting the agent's revised quote.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /crm/v3/objects/line_items | Create a line item |
| GET | /crm/v3/objects/line_items | List line items |
| GET | /crm/v3/objects/line_items/{lineItemId} | Read a specific line item |
| PATCH | /crm/v3/objects/line_items/{lineItemId} | Update a line item |
| POST | /crm/v3/objects/line_items/batch/create | Create a batch of line items |
| POST | /crm/v3/objects/line_items/search | Search line items by property filters |

## Key resources

- **Line items** — Single-record CRUD plus batch read, create, update, archive, upsert, and search for HubSpot line item records

## Why Jentic

- **Setup:** Wiring HubSpot Line Items by hand means implementing its OAuth2 authorization-code flow (or managing a private-app token), posting to api.hubapi.com with the right properties and quote or deal associations, and handling token refresh yourself. Through Jentic you install once, import HubSpot Line Items from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** This API works against the line_items object collection, with the line item id in the URL path (/crm/v3/objects/line_items/{lineItemId}) on reads and updates. Limit the agent to the operations it needs, such as creating and searching line items, so an update or batch create path is not included unless you add it.
- **Credential handling:** Your HubSpot token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'add line items to a HubSpot quote' or 'search line items', and Jentic returns the matching operation with its input schema, including the associations array shape, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **HubSpot CRM Quotes** — Quotes are the parent record that line items typically attach to
- **HubSpot CRM Products** — Products are the catalog entries that line items reference via hs_product_id
- **HubSpot CRM Deals** — Deals are another common parent for line items in the HubSpot pipeline

## FAQ

### What authentication does the HubSpot Line Items API use?

OAuth 2.0 Bearer tokens or HubSpot Private App tokens in the Authorization header. Jentic stores the token encrypted in the vault and provides a scoped reference to the agent so the raw token never enters the prompt.

### Can I create a line item and link it to a deal in one call?

Yes. POST /crm/v3/objects/line_items accepts an associations array on the request body so the line item is created and linked to a deal, quote, invoice, or subscription in a single call.

### What are the rate limits for the HubSpot Line Items API?

Standard HubSpot quotas apply: 100 requests per 10 seconds for OAuth apps and 110 for Private Apps, plus daily caps that vary by Hub tier. Batch endpoints accept up to 100 records per call and count as one request, which is the recommended pattern for high-volume sync jobs.

### How do I add multiple line items to a quote through Jentic?

Run pip install jentic, call client.search('add line items to a HubSpot quote'), client.load to get the schema for POST /crm/v3/objects/line_items/batch/create, and client.execute with the line item array - each entry includes properties and an associations array pointing at the parent quote.

### Can I search line items by product ID?

Yes. POST /crm/v3/objects/line_items/search accepts filterGroups, including a filter on hs_product_id, so you can find every line item that references a particular product across deals and quotes.

### How do I keep line items in sync with an external billing system?

POST /crm/v3/objects/line_items/batch/upsert keyed by a unique external identifier property (such as stripe_item_id) handles both create and update in one call, which is the typical sync pattern when mirroring Stripe or another billing system into HubSpot.

### Can I limit what my agent is allowed to do with the HubSpot Line Items API?

Yes. Because Jentic One runs self-hosted on your own instance, your rules decide which line item operations and which HubSpot token the agent may use. You can allow only the operations the agent actually needs, such as searching line items via POST /crm/v3/objects/line_items/search and reading a record at /crm/v3/objects/line_items/{lineItemId}, while withholding batch create, batch upsert, or update paths unless you add them. The agent can then act on the line_items collection within exactly those bounds and nothing more.
