List cart items
Lists the items in a cart. An offset-based list; with no limit every item is on one page. sort_by takes date_created (the default), date_modified, product_id or item_id. Any token type may call it; a limited token only for a bound cart.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
cart_id*stringThe id of the cart.
limit?integerHow many items to return on one page, from 1 to 100. The default is 100. A value outside 1 to 100, or one that is not a whole number, is a 400.
1 <= value <= 100100offset?integerFor offset-based lists, how many items to skip before the page starts. Use next_page_offset or previous_page_offset from the page you have. A value that is not a whole number is a 400.
0 <= value0sort_by?stringThe field to sort by.
"date_created""date_created""date_modified""product_id""item_id"desc?booleanSort in descending order (newest, largest or last first) when true. The default is false. A value other than true or false is a 400.
falseexpand?stringComma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.
show?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseThe items in the cart.
application/json- response
An offset-based list of the items in a cart.
total_items*integerThe number of items in the whole list.
total_pages*integerThe number of pages.
current_page*integerThe page number of this page, starting at 1.
next_page_url*|The URL of the next page, or null on the last page.
urinext_page_offset*|The offset of the next page, or null on the last page.
previous_page_url*|The URL of the previous page, or null on the first page.
uriprevious_page_offset*|The offset of the previous page, or null on the first page.
current_page_url*stringThe URL of this page.
uridata*array<>The items on this page.
curl -X GET 'https://api.comecero.com/api/v1/carts/string/items'{ "total_items": 1, "total_pages": 1, "current_page": 1, "next_page_url": null, "next_page_offset": null, "previous_page_url": null, "previous_page_offset": null, "current_page_url": "https://api.comecero.com/api/v1/carts/0091307952465CafhFSTa1/items", "data": []}List cart cross-sells GET
Returns cross-sell offers for the cart: other products, often at a discount, picked from your active cross-sell promotions for the products in the cart. The pick is weighted and random, so it can change between calls. To take an offer, add its product with its `cross_sell_id`. One page. Any token type may call it; a limited token only for a bound cart.
Add an item to a cart POST
Adds a product to a cart. `product_id` is required (error `BpmhEyl`). The price comes from the product; only a secret or trusted token may set `reference_price` (a limited token gets `403`, error `m82tixT`). A product already in the cart is replaced, not added to. Adding a bundle adds one item for the bundle and one for each of its products, and then the answer is an offset list of those items instead of one item. Tax, shipping and promotions are worked out again. Any token type may call it; a limited token only for a bound cart. A closed cart is `422`.