Sync cart items

Synchronize (replace) the line items in a cart.

This endpoint creates a new cart or updates an existing one by replacing all current
line items with the provided items.

Cart resolution logic:

  • If cart_id is provided in the body, the cart with that ID is updated directly.
  • If customer_id is provided (without cart_id), the system looks for an existing
    active cart for that customer. If found, it replaces the lines; otherwise, a new cart is created.
  • If neither cart_id nor customer_id is provided, a new cart is created.

Required fields:

  • interaction_id (the current interaction/conversation ID)
  • cart_lines (at least one item)

A successful request returns the cart with the updated line items.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Scope

erc-ecommerce-cart:write

Body Params

Sync Cart Items Request.

The sync cart items request body. Replaces the cart lines with the provided items.

string
required
length between 1 and 255

The ID of the current interaction (conversation) associated with this cart operation.

string
length between 1 and 255

The brand of the provider you want to use. If the account is multi-brand, this field is required.

string
length ≥ 1

The ID of an existing cart to update. If provided, the cart lines will be replaced directly. If omitted, the system will attempt to find an existing active cart by customer_id or create a new one.

string
length ≥ 1

The ID of the customer. Used to find or associate an existing active cart when cart_id is not provided.

cart_lines
array of objects
required
length ≥ 1

The line items to set in the cart. Must contain at least one item.

cart_lines*

A line item representing a product variant and its quantity.

string
required
length ≥ 1

The ID of the product variant to add to the cart.

integer
required
1 to 100000

The quantity of this variant to add. Must be at least 1.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json