MarketplaceProductBase
Type: schema
TypeScript Definition
typescript
MarketplaceProductBase: {{
/** @description The ID of the product */
id: string;
/** @description Uses the default variant values when this product has variants. */
sku: string | null;
name: string;
slug: string;
short_description: string | null;
/**
* @example physical
* @enum {string}
*/
product_type: "physical" | "digital" | "bundle";
active: $Read<boolean>;
/** @description Indicates whether the product has stock available */
stock_available: $Read<boolean>;
/** @description Indicates whether the product has any subscription plans avaialble */
on_subscription: $Read<boolean>;
/** @description Indicates whether the product is currently on promotion. When true, the `ProductPromotion` object will contain details of the promotion */
on_promotion: $Read<boolean>;
/** @description Indicates whether the product has variants */
has_variant: $Read<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 approved review ratings, preserving fractional ratings. Zero when there are no approved reviews. Divide by reviews_count when nonzero to compute the average.
*/
reviews_rating_sum: number;
/** @description Number of approved reviews; pending, rejected and archived reviews are excluded. */
reviews_count: number;
/** @description HSN/SAC tax classification code. `null` when not configured. */
hsn_code: string | null;
/** @description Custom product attributes (e.g., color, size, material) configured in the store. */
attributes: components["schemas"]["ProductAttribute"][];
/** @description Uses the default variant values when this product has variants. */
pricing: components["schemas"]["ProductPricing"] | null;
/** @description Variant option definitions; an empty array when none exist. */
variant_options: components["schemas"]["VariantOption"][] | null;
/** @description Uses the default variant values when this product has variants. */
promotion: components["schemas"]["ProductPromotion"];
/** @description Uses the default variant values when this product has variants. */
images: components["schemas"]["ProductImage"][];
videos?: components["schemas"]["ProductVideo"][];
/** @description Uses the default variant values when this product has variants. */
subscription: components["schemas"]["ProductSubscription"][];
/** @description Product variants with individual pricing and inventory. Empty array when `has_variant` is `false`. */
variants: components["schemas"]["MarketplaceVariant"][];
/** @description Returns an empty array for marketplace products. */
bundle_items: components["schemas"]["ProductBundleItem"];
inventory?: components["schemas"]["MarketplaceLotBatchDetail"][] | components["schemas"]["MarketplaceAggregatedInventory"];
};
/** MarketplaceProductDetail */
}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"]["ProductVideo"] | ProductVideo |
components["schemas"]["ProductSubscription"] | ProductSubscription |
components["schemas"]["MarketplaceVariant"] | MarketplaceVariant |
components["schemas"]["ProductBundleItem"] | ProductBundleItem |
components["schemas"]["MarketplaceLotBatchDetail"] | MarketplaceLotBatchDetail |
components["schemas"]["MarketplaceAggregatedInventory"] | MarketplaceAggregatedInventory |
OpenAPI Schema
json
{
"title": "MarketplaceProductBase",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/MarketplaceProductBase",
"description": "API reference for the MarketplaceProductBase 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",
"hsn_code",
"attributes",
"pricing",
"variant_options",
"promotion",
"images",
"subscription",
"variants",
"bundle_items"
],
"properties": {
"id": {
"description": "The ID of the product",
"type": "string"
},
"sku": {
"description": "Uses the default variant values when this product has variants.",
"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
},
"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 approved review ratings, preserving fractional ratings. Zero when there are no approved reviews. Divide by reviews_count when nonzero to compute the average.",
"type": "number",
"format": "double"
},
"reviews_count": {
"description": "Number of approved reviews; pending, rejected and archived reviews are excluded.",
"type": "integer"
},
"hsn_code": {
"description": "HSN/SAC tax classification code. `null` when not configured.",
"type": [
"string",
"null"
]
},
"attributes": {
"description": "Custom product attributes (e.g., color, size, material) configured in the store.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductAttribute"
}
},
"pricing": {
"description": "Uses the default variant values when this product has variants.",
"oneOf": [
{
"$ref": "#/components/schemas/ProductPricing"
},
{
"type": "null"
}
]
},
"variant_options": {
"description": "Variant option definitions; an empty array when none exist.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/VariantOption"
}
},
"promotion": {
"description": "Uses the default variant values when this product has variants.",
"$ref": "#/components/schemas/ProductPromotion"
},
"images": {
"description": "Uses the default variant values when this product has variants.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductImage"
}
},
"videos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductVideo"
}
},
"subscription": {
"description": "Uses the default variant values when this product has variants.",
"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/MarketplaceVariant"
}
},
"bundle_items": {
"description": "Returns an empty array for marketplace products.",
"$ref": "#/components/schemas/ProductBundleItem",
"maxItems": 0
},
"inventory": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/MarketplaceLotBatchDetail"
}
},
{
"$ref": "#/components/schemas/MarketplaceAggregatedInventory"
}
]
}
},
"examples": []
}Auto-generated from OpenAPI spec and TypeScript definitions