comecerodocs

List related products for a cart

GET
/carts/{cart_id}/related_products

Lists up to 3 products set as related to the products in the cart. Products already in the cart are left out. One page; it takes no paging parameters. 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

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.

show?string

Comma-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?string

Comma-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?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 related products.

application/json
  1. response

An offset-based list of products related to the items in a cart. Up to 3 products on 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 products on this page.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/carts/string/related_products'
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/related_products?offset=0&limit=10",  "data": [    {      "object": "product",      "url": "https://api.comecero.com/api/v1/products/widget.test",      "product_id": "widget.test",      "date_created": "2026-11-02T14:36:52Z",      "date_modified": "2026-11-02T14:36:52Z",      "test": true,      "account_id": "AB1234",      "name": "Widget",      "price": 49.95,      "currency": "USD",      "compare_at_price": 59.95,      "type": "physical",      "description": "A simple widget for everyday use.",      "headline": "The widget you will use every day",      "tax_code": null,      "prices": [        {          "price": 49.95,          "currency": "USD"        },        {          "price": 45.95,          "currency": "EUR"        }      ],      "compare_at_prices": [        {          "price": 59.95,          "currency": "USD"        }      ],      "volume_prices": [        {          "low": 10,          "high": null,          "prices": [            {              "price": 39.95,              "currency": "USD"            }          ]        }      ],      "effective_volume_prices": [        {          "low": 1,          "high": 9,          "price": 49.95,          "currency": "USD",          "discount_percent": 0,          "discount_amount": 0        },        {          "low": 10,          "high": null,          "price": 39.95,          "currency": "USD",          "discount_percent": 0.2,          "discount_amount": 10        }      ],      "inventory": {        "in_stock": true,        "quantity": 120,        "allow_oversells": false,        "low_quantity_notification": 10      },      "bundle_items": [],      "weight": {        "amount": 3,        "unit": "lb"      },      "active": true,      "deleted": false,      "hidden": false,      "date_deleted": null,      "file": null,      "has_file": false,      "license_service": null,      "has_license_service": false,      "subscription_plan": null,      "subscription_terms": null,      "images": [        {          "object": "image",          "url": "https://api.comecero.com/api/v1/images/0099844605810ImLAMbo73",          "image_id": "0099844605810ImLAMbo73",          "date_created": "2026-11-02T14:36:45Z",          "date_modified": "2026-11-02T14:36:45Z",          "test": true,          "account_id": "AB1234",          "link": "https://cdn.comecero.net/AB1234/0099844605810ImLAMbo73/widget.png",          "link_small": "https://cdn.comecero.net/AB1234/0099844605810ImLAMbo73/sm_widget.png",          "link_medium": "https://cdn.comecero.net/AB1234/0099844605810ImLAMbo73/md_widget.png",          "link_large": "https://cdn.comecero.net/AB1234/0099844605810ImLAMbo73/lg_widget.png",          "link_square": "https://cdn.comecero.net/AB1234/0099844605810ImLAMbo73/sq_widget.png",          "filename": "widget.png"        }      ],      "video_url": null,      "related_products": "https://api.comecero.com/api/v1/products/widget.test/related_products",      "subscription_change_products": "https://api.comecero.com/api/v1/products/widget.test/subscription_change_products",      "subscription_term_change_products": "https://api.comecero.com/api/v1/products/widget.test/subscription_term_change_products",      "meta": null,      "translations": {        "de": {          "name": "Widget",          "headline": "Das Widget fur jeden Tag",          "description": "Ein einfaches Widget fur jeden Tag."        }      }    }  ]}