Skip to content

Product

The Product object represents a single product in the storefront.

classDiagram
  direction LR
  Product --> ProductBundle
  Product --> Tax
  Product --> Producer
  Product --> Unit
  Product --> Currency
  Product --> Category
  Product --> ProductImage
  Product --> ProductAvailability
  Product --> ProductDelivery
  Product --> ProductVariant
  Product --> ProductAttributeGroupsList
  Product --> ProductBundlesList
  Product --> CollectionsList
  Product --> ProductFilesList
  Product --> CategoriesList
  Product --> ProductCommentsList
  Product --> ProductsList
  Product --> ProductImagesList
  Product --> ProductVariantsList
  Product --> ProductOptionsList
  Product --> ProductUrl
  Product --> Price
  Product --> DateTime
  Product --> VariantSpecialOffer
  Product --> LoyaltyProductUrl
  Product --> GpsrImporter
  Product --> GpsrProducer
  Product --> GpsrResponsible
  Product --> GpsrCertificatesList
  ProductAttributeGroupsList "1" --o "*" ProductAttributeGroup
  ProductBundlesList "1" --o "*" ProductBundle
  CollectionsList "1" --o "*" Collection
  ProductFilesList "1" --o "*" ProductFile
  CategoriesList "1" --o "*" Category
  ProductCommentsList "1" --o "*" ProductComment
  ProductImagesList "1" --o "*" ProductImage
  ProductsList "1" --o "*" Product
  ProductVariantsList "1" --o "*" ProductVariant
  ProductOptionsList "1" --o "*" ProductOption
  GpsrCertificatesList "1" --o "*" GpsrCertificate
  class ProductBundle{
  }
  class Tax{
  }
  class Price{
  }
  class Producer{
  }
  class Unit{
  }
  class Currency{
  }
  class Category{
  }
  class ProductImage{
  }
  class ProductAvailability{
  }  
  class ProductDelivery{
  }
  class ProductVariant{
  }
  class ProductAttributeGroupsList{
  }  
  class ProductBundlesList{
  }  
  class CollectionsList{
  }
  class ProductFilesList{
  }
  class CategoriesList{
  }
  class ProductCommentsList{
  }
  class ProductsList{
  }
  class ProductImagesList{
  }
  class ProductVariantsList{
  }
  class ProductOptionsList{
  }
  class ProductAttributeGroup{
  }
  class Collection{
  }
  class ProductFile{
  }
  class ProductComment{
  }
  class ProductOption{
  }
  class ProductUrl{
  }
  class DateTime{
  }
  class LoyaltyProductUrl{
  }
  class GpsrImporter{
  }
  class GpsrProducer{
  }
  class GpsrResponsible{
  }
  class GpsrCertificatesList{
  }
  class Product{
    int id
    ProductUrl url
    string name
    string code
    string ean
    string sku
    string gtin
    string isbn
    string kgo
    string bloz7
    string bloz12
    string producerCode
    string pkwiu
    string code39
    string gtu
    string description
    string shortDescription
    bool isBundle
    bool isAvailable
    bool isBestseller
    bool isProductOfTheDay
    bool isNew
    bool isUsedInLoyaltyProgram
    bool hasDifferentCurrency
    bool hasVariablePrice
    bool hasSpecialOffer
    bool hasOnlyDefaultVariant
    bool hasUnitPriceCalculation
    float width
    float height
    float length
    float volumentricWeight
    float rate
    int rateCount
    float packageQuantity
    Price otherPrice
    Price price
    Price basePrice
    Price specialOfferPrice
    ?VariantSpecialOffer specialOffer
    Price unitPrice
    Price specialOfferUnitPrice
    Price maxPrice
    Price minPrice
    ProductAttributeGroupsList attributeGroups
    ?ProductBundle bundle
    ProductBundlesList bundles
    Tax tax
    Producer producer
    CollectionsList collections
    ProductFilesList files
    Unit unit
    Unit unitPriceCalculationUnit
    Currency currency
    ?Category category
    CategoriesList additionalCategories
    ProductCommentsList comments
    ProductsList relatedProducts
    ProductImagesList images
    ProductImage featuredImage
    ProductImage promotingImage
    ProductAvailability availability
    ?ProductDelivery delivery
    ProductVariant variant
    ProductVariantsList variants
    ProductOptionsList options
    Metafields metafields
    DateTime createdAt
    DateTime modifiedAt
    ?LoyaltyProductUrl loyaltyUrl
    GpsrCertificatesList gpsrCertificates
    ?GpsrImporter gpsrImporter
    ?GpsrProducer gpsrProducer
    ?GpsrResponsible gpsrResponsible
  }
  click Category href "/object-api/objects/categories/category/"

Properties

Attribute name Type Description
id int The unique identifier of the product.
url ProductUrl The ProductUrl object that represents the url for product.
name string The name of the product.
code string The product code/SKU.
ean string The EAN code of the product.
sku string The product code/SKU.
gtin string The GTIN code of the product.
isbn string The ISBN code of the product.
kgo string The KGO code of the product.
bloz7 string The BLOZ7 code of the product.
bloz12 string The BLOZ12 code of the product.
producerCode string The producer code of the product.
pkwiu string The PKWIU code of the product.
code39 string The code39 code of the product.
gtu string The GTU classification category of the product.
description string The description of the product.
shortDescription string The short description of the product.
isBundle bool Returns true if product is a bundle.
isAvailable bool Returns true if product is available.
isBestseller bool Returns true if product is a bestseller.
isProductOfTheDay bool Returns true if product is marked as product of the day.
isNew bool Returns true if product is marked as new.
isUsedInLoyaltyProgram bool Returns true if product is used in loyalty program.
hasDifferentCurrency bool Returns true if product's price is set in different currency than the shop's default one.
hasVariablePrice bool Returns true if product has variable price based on different options.
hasSpecialOffer bool Returns true if product has special offer.
hasOnlyDefaultVariant bool Returns true if product has only a default variant.
hasUnitPriceCalculation bool Returns true if product has turned on unit price calculation.
width float The width of the product.
height float The height of the product.
length float The length of the product.
volumetricWeight float The volumetric weight of the product.
rate float The mean product rating.
rateCount int Number of votes for product rating.
packageQuantity float The quantity of the product in a single package.
specialOffer null | VariantSpecialOffer The VariantSpecialOffer object representing the special offer of the variant.
otherPrice Price The Price object representing the price of the product in different stores.
price Price The Price object representing the current price of the product.
basePrice Price The Price object representing the base price of the product (without special offer discount).
specialOfferPrice Price The Price object representing the special offer price of the product.
unitPrice Price The Price object representing the base unit price of the product
specialOfferUnitPrice Price The Price object representing the special offer unit price of the product.
maxPrice Price The Price object representing the maximum price of a variant of the product.
minPrice Price The Price object representing the minimum price of a variant of the product.
attributeGroups ProductAttributeGroupsList Reference to the ProductAttributeGroupsList object that represents the attributes group list of ProductAttributeGroup objects associated with the product.
bundle null | ProductBundle If product is bundle, returns the ProductBundle object that represents the bundle information of the product.
bundles ProductBundlesList Reference to the ProductBundlesList object that represents the bundles list of ProductBundle objects in which this product is part of the bundle.
tax Tax The Tax object representing product tax rate information.
producer Producer The Producer object that represents the producer of a product.
collections CollectionsList Reference to the CollectionsList object that represents the list of Collection objects associated with this product.
files ProductFilesList Reference to the ProductFilesList object that represents the files list of ProductFile objects associated with product.
unit Unit The Unit object representing information about a unit to measure the quantity of a product.
unitPriceCalculationUnit Unit The Unit object representing information about a unit to measure quantity of a product in unit price calculation.
currency Currency The Currency object representing information about a currency that has been manually set for the product. If it is null, the product uses the current shop currency.
category null | Category The Category object that represents main category of a product if product has active main category.
additionalCategories CategoriesList Reference to the CategoriesList object that represents the additional categories list of Category objects associated with product.
comments ProductCommentsList Reference to the ProductCommentsList object that represents the comments list of ProductComment objects associated with product.
relatedProducts ProductsList Reference to the ProductsList object that represents related products list of Product objects associated with product.
images ProductImagesList Reference to the ProductImagesList object that represents the images list of ProductImage objects associated with the product.
featuredImage ProductImage The ProductImage object that represents the main image of the product. If product doesn't have any image, placeholder will be provided.
promotingImage ProductImage The ProductImage object that represents the promoting image of the product. That is image of default variant if is in special offer, or product's featured image otherwise.
availability ProductAvailability The ProductAvailability object that represents the availability of the product.
delivery null | ProductDelivery The ProductDelivery object that represents the delivery information of the product.
variant ProductVariant The ProductVariant object that represents the default variant of the product.
variants ProductVariantsList Reference to the ProductVariantsList object that represents the variants list of ProductVariant objects associated with the product.
options ProductOptionsList Reference to the ProductOptionsList object that represents the options list of ProductOption objects associated with the product.
metafields Metafields Reference to the Metafields object that provides access to the namespaced containers for key - value pairs of data.
createdAt DateTime The DateTime object representing the date the product was created.
modifiedAt DateTime The DateTime object representing the date the product was modified.
loyaltyUrl LoyaltyProductUrl The LoyaltyProductUrl object that represents the url for product if product is available in Loyalty Program.
gpsrImporter null | GpsrImporter Reference to the GpsrImporter object that represents the importer of the product according to General Product Safety Regulation.
gpsrProducer null | GpsrProducer Reference to the GpsrProducer object that represents the producer of the product according to General Product Safety Regulation.
gpsrResponsible null | GpsrResponsible Reference to the GpsrResponsible object that represents the responsible entity of the product according to General Product Safety Regulation.
gpsrCertificates GpsrCertificatesList Reference to the GpsrCertificatesList object that represents the list of certificates of the product according to General Product Safety Regulation.

Examples

id property

{{ product.id }}
1

url property

{{ product.url }}
/en/p/product-name/10

name property

{{ product.name }}
Super Phone

code property

{{ product.code }}
12345

ean property

{{ product.ean }}
5 012345 678900

sku property

{{ product.sku }}
ABC-12345-S-BL

gtin property

{{ product.gtin }}
012345678905

isbn property

{{ product.isbn }}
SBIN0005943

kgo property

{{ product.kgo }}
12345

bloz7 property

{{ product.bloz7 }}
6453734

bloz12 property

{{ product.bloz12 }}
645373443267

producerCode property

{{ product.producerCode }}
45

pkwiu property

{{ product.pkwiu }}
26.40.41.0

code39 property

{{ product.code39 }}
64237

gtu property

{{ product.gtu }}
GTU_01

description property

{{ product.description }}
Example description

shortDescription property

{{ product.shortDescription }}
Example short description

isBundle property

{{ product.isBundle }}
true

isAvailable property

{{ product.isAvailable }}
true

isBestseller property

{{ product.isBestseller }}
true

isProductOfTheDay property

{{ product.isProductOfTheDay }}
true

isNew property

{{ product.isNew }}
true

isUsedInLoyaltyProgram property

{{ product.isUsedInLoyaltyProgram }}
true

hasDifferentCurrency property

{{ product.hasDifferentCurrency }}
true

hasVariablePrice property

{{ product.hasVariablePrice }}
true

hasSpecialOffer property

{{ product.hasSpecialOffer }}
true

hasOnlyDefaultVariant property

{{ product.hasOnlyDefaultVariant }}
true

hasUnitPriceCalculation property

{{ product.hasUnitPriceCalculation }}
true

width property

{{ product.width }}
40

height property

{{ product.height }}
89

length property

{{ product.length }}
128

volumetricWeight property

{{ product.volumetricWeight }}
12.4

rate property

{{ product.rate }}
4.7

rateCount property

{{ product.rateCount }}
68

packageQuantity property

{{ product.packageQuantity }}
2.3

specialOffer property

{{ product.specialOffer.price.formatGross }}
$0.64

otherPrice property

{{ product.otherPrice.formatGross }}
$45.21

price property

{{ product.price.formatGross }}
$25.56

basePrice property

{{ product.basePrice.formatGross }}
$28.95

specialOfferPrice property

{{ product.specialOfferPrice.formatGross }}
$0.64

unitPrice property

{{ product.unitPrice.formatGross }}
$0.98

specialOfferUnitPrice property

{{ product.specialOfferUnitPrice.formatGross }}
$0.23

maxPrice property

{{ product.maxPrice.formatGross }}
$30.01

minPrice property

{{ product.minPrice.formatGross }}
$0.64

attributeGroups property

{% for attributeGroup in product.attributeGroups %}
    {{ attributeGroup.name }}:
    {% for attribute in attributeGroup.attributes %}
        - {{ attribute.name }}: {{ attribute.value }}
    {% endfor %}
{% endfor %}
Battery specification:
- Weight: 125g
- Capacity: 90 mAh

Display specification:
- Pixel density: 300dpi
- Type: Amoled

Body specifications:
- Dimensions: 150 x 70 x 10 mm
- Build: Aluminium frame

bundle property

Bundle contains {{ product.bundle.items.count }} products.
Bundle contains 4 products.

bundles property

{% for bundle in product.bundles %}
    Bundle {{ loop|index }}:
    {% for item in Bundle.items %}
        - {{ item.bundle.product }}
    {% endfor %}
{% endfor %}
Bundle 1:
    - Super Phone
    - Charging pad
    - Nice camera

Bundle 2:
    - Super Phone
    - Glass fountain
    - A pet

Bundle 3:
    - Super Phone
    - Fast car
    - A cinema

tax property

{{ product.tax.class }}
23%

producer property

{{ product.producer.name }}
Sony

collections property

{% for collection in product.collections %}
      {{ collection.name }} - {{ collection.description|raw }}<br>
{% endfor %}
First collection - <p>this is our first assigned collection</p>
Second collection - <p>this is our second assigned collection</p>

files property

{% for file in product.files %}
    <b>{{ file.name }}</b>
    <p>{{ file.description }}</p>
    <a href="{{ file.url.absolute }}" title="{{ file.name }}">Download file</a>
    <br>
{% endfor %}
<b>Label</b>
<p>More information about ingredients</p>
<a href="https://example.com/en/p/file/1/leaflet.pdf" title="leaflet.pdf">Download file</a>
<br>
<b>Booklet</b>
<p>Check out our other products!</p>
<a href="https://example.com/en/p/file/1/booklet-mini-set.pdf" title="booklet-mini-set.pdf">Download file</a>
<br>

unit property

{{ product.unit.name }}
piece

unitPriceCalculationUnit property

{{ product.unitPriceCalculationUnit.name }}
piece

currency property

{{ product.currency.name }}
PLN

category property

{% if product.category %}
    {{ product.category.name }}
{% endif %}
Ultrawide monitors

additionalCategories property

{% for category in product.additionalCategories %}
    Category: {{ category.name }}
{% endfor %}
Category: Additional category 1
Category: Additional category 2
Category: Additional category 3

comments property

{% for comment in product.comments %}
    {{ comments.author }} - {{ comments.content }}
{% endfor %}
John Doe - Nice phone
Jack Wolfskin - I have it for 2 years and it still works

relatedProducts property

{% for relatedProduct in product.relatedProducts %}
    {{ relatedProduct.name }}
{% endfor %}
Related product 1
Related product 2
Related product 3

images property

{% for image in product.images %}
    Name: {{ image.name }}<br>
    <img src="{{ image.url }}"/><br>
    {% if image.isFeatured  %}
        <h4>Main Image</h4>
    {% endif %}
{% endfor %}
Name: Front view of red shirt
<img src="/userdata/public/gfx/1d8d2f07189da37de919102f3f41e655.jpg" /><br>
<h4>Main Image</h4> 
Name: Rear view of red shirt    
<img src="/userdata/public/gfx/8e56ac496843f9ac0fb7654d2b8a4be6.jpg" /><br>

featuredImage property

{% set featuredImage = product.featuredImage %}

Featured image info:
Name - {{ featuredImage.name }}<br>
Extension - {{ featuredImage.extension }}<br>
Featured image info:
Name - FrontCover<br>
Extension - bmp<br>

promotingImage property

{% set promotingImage = product.promotingImage %}

Promoting image info:
Name - {{ promotingImage.name }}<br>
Extension - {{ promotingImage.extension }}<br>
Promoting image info:
Name - FrontCoverRed<br>
Extension - bmp<br>

availability property

{{ product.availability.name }}
In stock

delivery property

{{ product.delivery.name }}
3 days

variant property

{% for optionValue in product.variant.optionValues %}
  {{ optionValue.option.name }}: {{ optionValue.optionValue.name }}
{% endfor %}
Color: Blue
Size: S

variants property

{% for variant in variants %}
    {% for optionValue in product.variant.optionValues %}
      {{ optionValue.option.name }}: {{ optionValue.optionValue.name }}
    {% endfor %}
{% endfor %}
Color: Blue
Size: S

Color: Green
Size: M

Color: Red
Size: L

options property

{% for option in product.options %}
  {{ option.name }}:

    {% if option.isRadio %}
        <div class="option_radio {% if option.isRequired %}option_required{% endif %}">
            {% for value in option.values %}
                <input type="radio" id="option_{{ option.id }}_{{ value.id }}" name="option_{{ option.id }}" value="{{ value.id }}" {% if option.isStockOption and not value.isAvailable %}data-unavailable{% endif %}/>
                <label for="option_{{ option.id }}_{{ value.id }}">{{ value.name }}</label>
            {% endfor %}
        </div>
    {% endif %}
{% endfor %}
example radio:

<div class="option_radio">
    <input type="radio" id="option_1_1" name="option_1" value="1" />
    <label for="option_1_2">example radio 1</label>

    <input type="radio" id="option_1_2" name="option_1" value="2" />
    <label for="option_1_2">example radio 2</label>

    <input type="radio" id="option_1_3" name="option_1" value="3" />
    <label for="option_1_3">example radio 3</label>
</div>

example radio 2:

<div class="option_radio">
    <input type="radio" id="option_2_1" name="option_2" value="1" />
    <label for="option_2_1">example radio 1</label>

    <input type="radio" id="option_2_2" name="option_2" value="2" />
    <label for="option_2_2">example radio 2</label>

    <input type="radio" id="option_2_3" name="option_2" value="3" />
    <label for="option_2_3">example radio 3</label>
</div>

metafields property

value: {{ product.metafields.someNamespaceName.key }}
value: example-value-1

createdAt property

{{ product.modifiedAt.date }}
23 september 2019

modifiedAt property

{{ product.modifiedAt.date }}
2 may 2023

loyaltyUrl property

{{ product.loyaltyUrl }}
/en/pe/product-name/10

gpsrImporter property

{{ product.gpsrImporter.name }}
Some Importer S.A.

gpsrProducer property

{{ product.gpsrProducer.name }}
Some Producer S.A.

gpsrResponsible property

{{ product.gpsrResponsible.name }}
John Smith (Some Producer S.A.)

gpsrCertificates property

{% for gpsrCertificate in product.gpsrCertificates %}
    {{ gpsrCertificate.description }}
{% endfor %}
CE marking (complies with EU standards)
EN 71 standard (toys safety)