Product
Type: schema
TypeScript Definition
typescript
Product: {{
/** @description The ID of the product */
id: string;
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;
tags: string[] | null;
category_ids: string[];
categories: components["schemas"]["Category"][];
/** Format: double */
reviews_rating_sum: number;
reviews_count: number;
attributes: components["schemas"]["ProductAttribute"][];
pricing: components["schemas"]["ProductPricing"];
/** @description this will be used if has_variant is true, to auto set default values. */
variant_options: components["schemas"]["VariantOption"][] | null;
promotion: components["schemas"]["ProductPromotion"];
images: components["schemas"]["ProductImage"][];
subscription: components["schemas"]["ProductSubscription"][];
variants: components["schemas"]["Variant"][];
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": {
"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": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"category_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"categories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Category"
}
},
"reviews_rating_sum": {
"type": "number",
"format": "double"
},
"reviews_count": {
"type": "integer"
},
"attributes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductAttribute"
}
},
"pricing": {
"$ref": "#/components/schemas/ProductPricing"
},
"variant_options": {
"description": "this will be used if has_variant is true, to auto set default values.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/VariantOption"
}
},
"promotion": {
"$ref": "#/components/schemas/ProductPromotion"
},
"images": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductImage"
}
},
"subscription": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductSubscription"
}
},
"variants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Variant"
}
},
"bundle_items": {
"$ref": "#/components/schemas/ProductBundleItem"
},
"inventory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LotBatchDetail"
}
}
},
"examples": []
}Auto-generated from OpenAPI spec and TypeScript definitions