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 Fields (200 OK)
| Field | Type | Description |
|---|---|---|
id | integer | Compare item ID |
product | object | Associated product (id, sku, type, name, price, formattedPrice, etc.) |
customer | object | Customer who added the item (id, firstName, lastName) |
createdAt | string | Timestamp when the item was added |
updatedAt | string | Timestamp when the item was last updated |
TIP
The response is a plain JSON array of compare items. Pagination metadata is exposed via the X-Total-Count / X-Page / X-Per-Page / X-Total-Pages response headers.
Use Cases
- Display the product comparison page
- Build comparison tables across saved products
- Show a compare count in navigation
Notes
- Compare items are scoped to the authenticated customer (not channel-scoped).
- Guests cannot have compare lists — a valid customer token is required.

