canonical: https://jentic.com/apis/hubspot.com/hubspot-crm-carts

# HubSpot Carts

The HubSpot Carts API manages cart records inside HubSpot Commerce, representing in-progress purchases that can be associated with contacts, line items, and deals. It exposes the standard CRM v3 object pattern - read, create, update, archive, search, and batch upsert - so cart state from a storefront can be synced into HubSpot for marketing, abandonment workflows, and reporting. Each cart can carry custom properties, line item associations, and currency information.

## For AI agents

Create, read, update, archive, search, and upsert HubSpot Commerce cart records, including line item associations and contact links for abandonment workflows.

## Scope

Does not process payments, manage inventory, or render storefront UI - use only for HubSpot CRM cart object records.

## Capabilities

- Create cart records with associated contacts, line items, and currency properties
- Batch upsert carts by an external storefront id to keep HubSpot in sync without duplicates
- Search carts by contact, status, or last-modified date using filter groups
- Retrieve a single cart with its associated line items and contact in one call
- Update cart properties (status, total, currency) as the storefront state changes
- Archive completed or abandoned carts in batch to keep active CRM views clean
- Page through all carts for export or warehouse sync

## Use cases

### Storefront Cart Sync

Sync cart state from a custom storefront into HubSpot Commerce so marketing automation can target abandoned carts. The batch upsert endpoint handles up to 100 carts per request keyed on the storefront's cart id, so retried webhooks never create duplicate records.

Example prompt: POST 100 cart payloads to /crm/v3/objects/carts/batch/upsert with idProperty set to external_cart_id and contact associations from the session.

### Abandoned Cart Identification

Find carts that have been idle for over 24 hours so a marketing workflow can email the contact. The search endpoint filters by hs_lastmodifieddate and cart status, returning the cart id, contact id, and total for the email template.

Example prompt: POST /crm/v3/objects/carts/search with filterGroups for hs_status equals "OPEN" and hs_lastmodifieddate older than 24h, returning hs_total and associated contact id.

### Cart-to-Deal Conversion

When a cart is purchased, update its status, archive it, and create a corresponding deal record. Combine the carts API with the deals API so the conversion is recorded as a sales pipeline event with the cart total and contact intact.

Example prompt: PATCH the cart status to "CHECKOUT_COMPLETED", then POST a deal to /crm/v3/objects/deals/batch/create with the cart total and contact association.

### AI Agent Recovery Workflow

An AI agent monitors abandoned carts hourly, generates a personalised recovery message based on cart contents, and triggers the marketing email. Jentic exposes the cart search and contact read operations with typed schemas, so the agent does not need to read HubSpot docs.

Example prompt: Search /crm/v3/objects/carts/search for OPEN carts older than 1 hour, fetch associated contact emails, and trigger the recovery email template with the cart total.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /crm/v3/objects/carts/batch/create | Create cart records in batch |
| POST | /crm/v3/objects/carts/batch/upsert | Idempotent upsert by external id |
| POST | /crm/v3/objects/carts/batch/read | Read carts in batch by ID |
| POST | /crm/v3/objects/carts/batch/update | Update cart properties in batch |
| POST | /crm/v3/objects/carts/search | Search carts with filter groups |
| GET | /crm/v3/objects/carts/{cartId} | Retrieve a single cart |
| GET | /crm/v3/objects/carts | List carts with pagination |

## Key resources

- **carts** — Cart object with status, total, currency, and line item associations.
- **Batch operations** — Batch read, create, update, upsert, and archive for storefront sync.
- **Search** — Filter carts by status, contact, or last-modified date.

## Why Jentic

- **Setup:** Wiring the HubSpot Carts API by hand means handling its OAuth 2.0 authorization-code flow or a private app token, targeting api.hubapi.com, and building batch and search payloads yourself. Through Jentic you install once, import HubSpot Carts from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** HubSpot gates this API with per-object OAuth scopes, so you grant only the cart scopes your agent needs and you choose which operations it may call: you can allow creating and reading cart records while leaving batch updates out of the allowed set unless you add them.
- **Credential handling:** Your HubSpot OAuth token or private app 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 'sync an abandoned cart to HubSpot' or 'read cart records', and Jentic returns the matching cart operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Line Items** — Manages the line item records that are typically associated with a cart.
- **Commerce Payments** — Records payment captures associated with completed carts.
- **Stripe** — Stripe checkout sessions handle the cart-to-payment flow without HubSpot CRM linkage.

## FAQ

### What authentication does the HubSpot Carts API use?

The Carts API supports OAuth 2.0 and HubSpot private app tokens. Through Jentic, tokens live in the encrypted vault and a scoped token is injected per request so raw secrets never enter the agent context.

### Can I associate line items with a cart through the HubSpot Carts API?

Yes - pass an associations array of line item ids on cart create, or use the CRM Associations API afterwards. The GET /crm/v3/objects/carts/{cartId} endpoint returns associated line items when you set the associations query parameter.

### What are the rate limits for the HubSpot Carts API?

It uses HubSpot's standard CRM v3 limits - 100 requests per 10 seconds for OAuth apps and 110 per 10 seconds for private apps on Pro and Enterprise. Use /crm/v3/objects/carts/batch/upsert (up to 100 carts per call) for bulk storefront sync.

### How do I upsert carts through Jentic?

Run the Jentic search "upsert hubspot cart" to find POST /crm/v3/objects/carts/batch/upsert, load the schema, and execute with idProperty set to your storefront's external cart id. Jentic handles auth and returns per-record results.

### Is the HubSpot Carts API free?

The Carts API is part of HubSpot Commerce. Access is included in plans that have Commerce Hub or the Commerce features bundled. There is no per-call HubSpot fee on top of the tier subscription.

### Can I search carts by total amount?

Yes. POST /crm/v3/objects/carts/search with a filterGroup on the hs_total property using GTE, LTE, or BETWEEN operators. Combine with hs_status to find, for example, abandoned carts above a recovery threshold.

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

Yes. Because you run Jentic One yourself, your own rules decide which HubSpot Carts operations and credentials your agent may use. HubSpot gates this API with per-object OAuth scopes, so you can grant read-only cart access, letting the agent search carts and retrieve a single cart while leaving batch create, batch upsert, batch update, and archive out of the allowed set. You control exactly which endpoints the agent can call and which HubSpot token it runs with.
