Variant
Type: schema
TypeScript Definition
typescript
Variant: {{
/** @description variant id */
id: string;
/** @description product id */
product_id: string;
/** @description variant sku */
sku: string | null;
slug: string;
/** @description variant name */
name: string;
/** @description variant name */
product_name: string;
short_description: string | null;
active: $Read<boolean>;
stock_available: $Read<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;
on_promotion: $Read<boolean>;
on_subscription: $Read<boolean>;
/** @description Indicates whether a variant is marked as the default variant for a product */
is_default: $Read<boolean>;
/** @description This object contains multiple dynamic keys. Each key is a string derived from the attribute key, and the value is an object of the type `AssociatedOption`. */
associated_options: components["schemas"]["AssociatedOption"];
images: components["schemas"]["ProductImage"][];
pricing: components["schemas"]["ProductPricing"];
subscription: components["schemas"]["ProductSubscription"][];
promotion: components["schemas"]["ProductPromotion"];
inventory?: components["schemas"]["LotBatchDetail"][];
};
/** VariantDetail */
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["AssociatedOption"] | AssociatedOption |
components["schemas"]["ProductImage"] | ProductImage |
components["schemas"]["ProductPricing"] | ProductPricing |
components["schemas"]["ProductSubscription"] | ProductSubscription |
components["schemas"]["ProductPromotion"] | ProductPromotion |
components["schemas"]["LotBatchDetail"] | LotBatchDetail |
OpenAPI Schema
json
{
"title": "ProductVariant",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/Variant",
"description": "API reference for the Variant schema"
},
"required": [
"id",
"product_id",
"sku",
"slug",
"name",
"product_name",
"short_description",
"active",
"stock_available",
"on_promotion",
"on_subscription",
"is_default",
"associated_options",
"images",
"pricing",
"subscription",
"promotion"
],
"properties": {
"id": {
"description": "variant id",
"type": "string"
},
"product_id": {
"description": "product id",
"type": "string"
},
"sku": {
"description": "variant sku",
"type": [
"string",
"null"
]
},
"slug": {
"type": "string"
},
"name": {
"description": "variant name",
"type": "string"
},
"product_name": {
"description": "variant name",
"type": "string"
},
"short_description": {
"type": [
"string",
"null"
]
},
"active": {
"type": "boolean",
"readOnly": true
},
"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_promotion": {
"type": "boolean",
"readOnly": true
},
"on_subscription": {
"type": "boolean",
"readOnly": true
},
"is_default": {
"description": "Indicates whether a variant is marked as the default variant for a product",
"type": "boolean",
"readOnly": true
},
"associated_options": {
"description": "This object contains multiple dynamic keys. Each key is a string derived from the attribute key, and the value is an object of the type `AssociatedOption`.",
"$ref": "#/components/schemas/AssociatedOption"
},
"images": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductImage"
}
},
"pricing": {
"$ref": "#/components/schemas/ProductPricing"
},
"subscription": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductSubscription"
}
},
"promotion": {
"$ref": "#/components/schemas/ProductPromotion"
},
"inventory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LotBatchDetail"
}
}
},
"examples": []
}Auto-generated from OpenAPI spec and TypeScript definitions