Skip to content

Get Compare Item

Retrieve a single compare item by ID.

Endpoint

GET /api/shop/compare-items/{id}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesCustomer Bearer token (Bearer <accessToken>)

Path Parameters

ParameterTypeRequiredDescription
idintegerYesCompare item ID

Response Fields (200 OK)

FieldTypeDescription
idintegerCompare item ID
productobjectAssociated product details
customerobjectCustomer who added the item
createdAtstringTimestamp when the item was added
updatedAtstringTimestamp when the item was last updated

Validation

  • The compare item must exist and belong to the authenticated customer.

Use Cases

  • Fetch details for a single compared product
  • Refresh a row in a comparison table

Released under the MIT License.