Skip to content

Get Compare Item

About

The compareItem query retrieves a single compare item by its IRI identifier. Use this query to:

  • Fetch detailed information about a specific compare item
  • Display product comparison details on a detail page
  • Verify a product exists in the customer's comparison list

Authentication

This query requires customer authentication:

  • Authenticated customers: Provide a valid customer authentication token in the Authorization header. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>

Arguments

ArgumentTypeDescription
idID!The IRI of the compare item (e.g. /api/shop/compare-items/606).

Possible Returns

FieldTypeDescription
idID!IRI identifier (e.g. /api/shop/compare-items/606).
_idInt!Numeric identifier.
productProduct!Associated product with id, name, sku, price, description, etc.
customerCustomer!Associated customer with id, email, firstName, lastName.
createdAtStringTimestamp when the item was added.
updatedAtStringTimestamp when the item was last updated.

Released under the MIT License.