Product
Type: schema
TypeScript Definition
typescript
Product: {{
/** @description The ID of the product */
id: string;
/** @description Stock Keeping Unit. `null` for products that only have variant-level SKUs. */
sku: string | null;
name: string;
slug: string;
short_description: string | null;
/**
* @example physical
* @enum {string}
*/
product_type: "physical" | "digital" | "bundle";
readonly active: boolean;
/** @description Indicates whether the product has stock available */
readonly stock_available: boolean;
/** @description Indicates whether the item is being fulfilled as a backorder. When true, the item is not currently in stock and will ship later once inventory is available. This may result in the order being split into multiple shipments, with delays for the backordered portion. */
backorder?: boolean;
/** @description Indicates whether the product has any subscription plans avaialble */
readonly on_subscription: boolean;
/** @description Indicates whether the product is currently on promotion. When true, the `ProductPromotion` object will contain details of the promotion */
readonly on_promotion: boolean;
/** @description Indicates whether the product has variants */
readonly has_variant: boolean;
/** @description Freeform tags for filtering and search. `null` if no tags are assigned. */
tags: string[] | null;
/** @description IDs of categories this product belongs to. */
category_ids: string[];
/** @description Expanded category objects for this product. */
categories: components["schemas"]["Category"][];
/**
* Format: double
* @description Sum of all review ratings. Divide by `reviews_count` to compute the average rating.
*/
reviews_rating_sum: number;
/** @description Total number of customer reviews. */
reviews_count: number;
/** @description Custom product attributes (e.g., color, size, material) configured in the store. */
attributes: components["schemas"]["ProductAttribute"][];
pricing: components["schemas"]["ProductPricing"];
/** @description Available variant option axes (e.g., Size, Color) with their possible values. Present only when `has_variant` is `true`. */
variant_options: components["schemas"]["VariantOption"][] | null;
promotion: components["schemas"]["ProductPromotion"];
/** @description Product images ordered by display priority. */
images: components["schemas"]["ProductImage"][];
subscription: components["schemas"]["ProductSubscription"][];
/** @description Product variants with individual pricing and inventory. Empty array when `has_variant` is `false`. */
variants: components["schemas"]["Variant"][];
/** @description Component products included in this bundle. Only present when `product_type` is `bundle`. */
bundle_items: components["schemas"]["ProductBundleItem"];
inventory?: components["schemas"]["LotBatchDetail"][];
};
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["Category"] | Category |
components["schemas"]["ProductAttribute"] | ProductAttribute |
components["schemas"]["ProductPricing"] | ProductPricing |
components["schemas"]["VariantOption"] | VariantOption |
components["schemas"]["ProductPromotion"] | ProductPromotion |
components["schemas"]["ProductImage"] | ProductImage |
components["schemas"]["ProductSubscription"] | ProductSubscription |
components["schemas"]["Variant"] | Variant |
components["schemas"]["ProductBundleItem"] | ProductBundleItem |
components["schemas"]["LotBatchDetail"] | LotBatchDetail |
OpenAPI Schema
json
{
"title": "Product",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/Product",
"description": "API reference for the Product schema"
},
"required": [
"id",
"sku",
"name",
"slug",
"short_description",
"product_type",
"active",
"stock_available",
"on_subscription",
"on_promotion",
"has_variant",
"tags",
"category_ids",
"categories",
"reviews_rating_sum",
"reviews_count",
"attributes",
"pricing",
"variant_options",
"promotion",
"images",
"subscription",
"variants",
"bundle_items"
],
"properties": {
"id": {
"description": "The ID of the product",
"type": "string"
},
"sku": {
"description": "Stock Keeping Unit. `null` for products that only have variant-level SKUs.",
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"short_description": {
"type": [
"string",
"null"
]
},
"product_type": {
"type": "string",
"enum": [
"physical",
"digital",
"bundle"
],
"examples": [
"physical"
]
},
"active": {
"type": "boolean",
"readOnly": true
},
"stock_available": {
"description": "Indicates whether the product has stock available",
"type": "boolean",
"readOnly": true
},
"backorder": {
"description": "Indicates whether the item is being fulfilled as a backorder. When true, the item is not currently in stock and will ship later once inventory is available. This may result in the order being split into multiple shipments, with delays for the backordered portion.",
"type": "boolean"
},
"on_subscription": {
"description": "Indicates whether the product has any subscription plans avaialble",
"type": "boolean",
"readOnly": true
},
"on_promotion": {
"description": "Indicates whether the product is currently on promotion. When true, the `ProductPromotion` object will contain details of the promotion",
"type": "boolean",
"readOnly": true
},
"has_variant": {
"description": "Indicates whether the product has variants",
"type": "boolean",
"readOnly": true
},
"tags": {
"description": "Freeform tags for filtering and search. `null` if no tags are assigned.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"category_ids": {
"description": "IDs of categories this product belongs to.",
"type": "array",
"items": {
"type": "string"
}
},
"categories": {
"description": "Expanded category objects for this product.",
"type": "array",
"items": {
"$ref": "#/components/schemas/Category"
}
},
"reviews_rating_sum": {
"description": "Sum of all review ratings. Divide by `reviews_count` to compute the average rating.",
"type": "number",
"format": "double"
},
"reviews_count": {
"description": "Total number of customer reviews.",
"type": "integer"
},
"attributes": {
"description": "Custom product attributes (e.g., color, size, material) configured in the store.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductAttribute"
}
},
"pricing": {
"$ref": "#/components/schemas/ProductPricing"
},
"variant_options": {
"description": "Available variant option axes (e.g., Size, Color) with their possible values. Present only when `has_variant` is `true`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/VariantOption"
}
},
"promotion": {
"$ref": "#/components/schemas/ProductPromotion"
},
"images": {
"description": "Product images ordered by display priority.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductImage"
}
},
"subscription": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductSubscription"
}
},
"variants": {
"description": "Product variants with individual pricing and inventory. Empty array when `has_variant` is `false`.",
"type": "array",
"items": {
"$ref": "#/components/schemas/Variant"
}
},
"bundle_items": {
"description": "Component products included in this bundle. Only present when `product_type` is `bundle`.",
"$ref": "#/components/schemas/ProductBundleItem"
},
"inventory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LotBatchDetail"
}
}
},
"examples": []
}Auto-generated from OpenAPI spec and TypeScript definitions