A product represents an item in your store. Product combined with variant represents the items that you sell in your store. A product always has at least one variant but can have many more.

Scenario A - Selling a product that comes in different variations

In this scenario we're selling a T-Shirt that has multiple sizes and colors

Size has the following possible values: Small, Medium, Large
Color has the following possible values: Red, Green, Blue

In this case the product would have the following variants:

Small Red
Small Green
Small Blue
Medium Red
Medium Green
Medium Blue
Large Red
Large Green
Large Blue


Scenario B - Selling a product that has no variations

In this scenario, we're selling a product that doesn't have any variations. Our system will still create a single variant for this product that will be used when adding products to a cart.

Properties:

id - Integer - Unique id of the product

name - String - The name of the product

model - String - Identification field used for things with a model attribute

part_number - String - Identification field representing the manufacturer's part number

internal_reference_number - String - Internal number that your company uses to identify a product

description - String - The HTML markup description of the product

brief_description - String - A short description of the product

price - Decimal - The advertised price of the product. If the product is on sale the sale price will be returned here.

regular_price - Decimal - The normal/non-sale price of the product

created_at - DateTime - When the product was created

updated_at - DateTime - When the product was last updated

path - String - URL patch to the product's page on your store

brand - Brand - The brand of the product

 on_sale? - Boolean - Indicates if the product is on sale

on_clearance? - Boolean - Indicates if the product is on clearance which means that once stock is sold out it will not be re-purchased.

msrp - Decimal - The manufacturer's suggested retail price for the product

ships_internationally? - Boolean - Indicates if the product can be shipped outside of the U.S.

categories - [Category] - Array of categories that the product belongs to

primary_category - Category - The product's primary category

product_type - ProductType - The product type assigned

properties - Hash - Property key and values

custom_fields - [ProductField] - Array of custom fields set on the product

reviews - [Review] - Array of reviews

review_count - Integer - The number of reviews

average_rating - Decimal - The average review rating

five_star_rating_count - Integer - The number of 5-star ratings

four_star_rating_count - Integer - The number of 4-star ratings

three_star_rating_count - Integer - The number of 3-star ratings

two_star_rating_count - Integer - The number of 2-star ratings

one_star_rating_count - Integer - The number of 1-star ratings

related_products - [Product] - Array of related products

variants - [ProductVariant] - Array of variants

selected_variant - ProductVariant - If the variant param is passed to the page, this returns the variant with the id passed to the page

options - [ProductOption] - Array of product options

images - [Image] - Array of images

documents - [Document] - Array of documents

primary_image - Image - The primary image

to_json - Hash - Hash representation

Did this answer your question?