comecerodocs

List cart cross-sells

GET
/carts/{cart_id}/cross_sells

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.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

cart_id*string

The id of the cart.

Query Parameters

max_cross_sells?integer

How many cross-sell offers to return when cross_sells is expanded, 0 to 10. Default 3.

Range0 <= value <= 10
expand?string

Comma-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.

formatted?boolean

When 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.

Defaultfalse

Response Body

The cross-sell offers.

application/json
  1. response

An offset-based list of cross-sell offers for a cart. It is one page.

total_items*integer

The number of items in the whole list.

total_pages*integer

The number of pages.

current_page*integer

The page number of this page, starting at 1.

next_page_url*|

The URL of the next page, or null on the last page.

Formaturi
next_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.

Formaturi
previous_page_offset*|

The offset of the previous page, or null on the first page.

current_page_url*string

The URL of this page.

Formaturi
data*array<>

The offers on this page.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/carts/string/cross_sells'
Example Response
{  "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/cross_sells?offset=0&limit=10",  "data": [    {      "cross_sell_id": "0091307952500PtXk3Lw-a1b2",      "product_id": "pdf-fonts.test",      "name": "Font Pack",      "price": 15.99,      "price_original": 19.99,      "discount": 4,      "discount_percent": 0.2,      "currency": "USD",      "product": "https://api.comecero.com/api/v1/products/pdf-fonts.test"    }  ]}