Get Compare Items
Retrieve the products in the authenticated customer's comparison list.
Endpoint
GET /api/shop/compare_itemsRequest Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Customer Bearer token (Bearer <accessToken>) |
Response
A bare JSON array of comparison rows. Each row identifies its product and customer by path reference, not as a nested object — the product's name, price, and attributes are not in this payload.
| Field | Type | Description |
|---|---|---|
id | integer | Comparison row ID. Use it on Get One and Delete. |
product | string | Path of the compared product, e.g. /api/shop/products/126. The trailing segment is the product ID. |
customer | string | Path of the owning customer. |
createdAt / updatedAt | string | ISO 8601 timestamps. |
Pagination is reported in headers, not in the body: X-Total-Count, X-Page, X-Per-Page, X-Total-Pages.
Unlike the wishlist, the comparison list is not scoped to a channel — the same rows come back on every channel.
Over GraphQL the same rows expose product and customer as nested objects selectable in one query — see Get Compare Items.
Use Cases
- Comparison table — read the rows, take the numeric ID from the end of each
productpath, and fetch those products with their attribute values to build the table columns. - "Compare (n)" badge — read
X-Total-Count; the array holds only the current page.
Best Practices
- Do not expect product attributes here — the row is a pointer, so a comparison view always needs a second round of product fetches, or the GraphQL query instead.
- Fetch the products in one call — the product listing endpoint accepts filters, so a single request can return every compared product rather than one request per row.
- Keep the row
idalongside the product ID — deletion addresses the comparison row, not the product.
Related Resources
- Get Single Compare Item — one comparison row by id
- Create Compare Item — add a product to the comparison list
- Delete Compare Item — remove one comparison row
- Delete All Compare Items — clear the whole comparison list

