getProduct
Lists a single product
Name | Type | Description |
---|---|---|
fulfillmentDatetime | utc_timestamp | Date & time of fulfillment for the cart |
fulfillmentType | FulfillmentType | Cart's fulfillment type |
productId | uuid | Product's ID |
productSlug | String | Product's slug, use if you don't know the ID yet |
storeId | uuid | Current store ID |
storeSlug | String | Current store slug - use if you do not yet know the store ID |
Query
query getProduct(
$fulfillmentDatetime: utc_timestamp,
$fulfillmentType: FulfillmentType,
$productId: uuid,
$productSlug: String,
$storeId: uuid,
$storeSlug: String
) {
getProduct(
fulfillmentDatetime: $fulfillmentDatetime,
fulfillmentType: $fulfillmentType,
productId: $productId,
productSlug: $productSlug,
storeId: $storeId,
storeSlug: $storeSlug
) {
additionalImages {
original
standard
thumb
}
allergens
calorieData {
amountPerServing
caloriesPerServing
servingUnit
}
categoryName
defaultVariantId
description
id
image {
original
standard
thumb
}
inStock
limit
minPrice {
basePrice
}
modifierGroups {
id
maximum
minimum
modifiers {
extraPrice {
basePrice
}
id
image {
original
standard
thumb
}
inStock
name
price {
basePrice
}
restrictions {
alcoholic
}
}
name
}
name
options {
name
values
}
restrictions {
alcoholic
}
slug
specialAvailabilityInfo {
isAvailable
nextAvailable
}
type
variants {
extraPrice {
basePrice
}
id
inStock
limit
name
options {
name
values
}
price {
basePrice
}
restrictions {
alcoholic
}
}
}
}
Variables
{
"fulfillmentDatetime": utc_timestamp,
"fulfillmentType": "DELIVERY",
"productId": uuid,
"productSlug": "abc123",
"storeId": uuid,
"storeSlug": "xyz789"
}
Response
{
"data": {
"getProduct": {
"additionalImages": [Image],
"allergens": ["xyz789"],
"calorieData": CalorieData,
"categoryName": "xyz789",
"defaultVariantId": uuid,
"description": "abc123",
"id": uuid,
"image": Image,
"inStock": true,
"limit": 987,
"minPrice": Price,
"modifierGroups": [ModifierGroupAggregate],
"name": "xyz789",
"options": [Option],
"restrictions": RestrictionMap,
"slug": "xyz789",
"specialAvailabilityInfo": ProductSpecialAvailabilityInfo,
"type": "xyz789",
"variants": [VariantAggregate]
}
}
}
Key info
- additionalImages: An array of image maps that can be used to display additional images for a product
- allergens: An array of strings, listing the allergens a product may contain.
- calorieData: A map containing calorie info for the product.
- image: A map containing image URLs, as per Listing Product
- inStock: Boolean stating if the product is in stock or not
- limit: Integer giving the maximum quantity that may be ordered. Null if there is no limit.
- maxPrice: Most expensive variant price + required modifier price.
- minPrice: Cheapest variant price + required modifier price. Lowest possible price a customer can pay.
- modifierGroups: Array of modifier groups.
- options:
- variants: Array of variants
Modifier Groups
- minimum: Integer giving minimum quantity that must be ordered. Null if no minimum.
- maximum: Integer giving maximum quantity that can be ordered. Null if no maximum.
Variants
- extraPrice: The difference between this variant's price and the cheapest variant's price
- price: The absolute price of the variant