Item
Type: schema
TypeScript Definition
typescript
Item: {{
product_id: string;
variant_id: string | null;
sku: string | null;
product_slug?: string;
variant_slug?: string | null;
product_name: string;
variant_name: string | null;
/**
* @example physical
* @enum {string}
*/
product_type: "physical" | "digital" | "bundle";
short_description: string | null;
active: boolean;
stock_available: boolean;
on_subscription: boolean;
on_promotion: boolean;
category_ids: string[];
/** @description Expanded category objects. */
categories?: components["schemas"]["Category"][];
tags: string[] | null;
/** @description Number of approved reviews; pending, rejected and archived reviews are excluded. */
reviews_count: number;
/**
* 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 | null;
attributes?: components["schemas"]["ProductAttribute"][];
images?: components["schemas"]["ProductImage"][];
/** @description Pricing for the applicable customer group. `null` when no pricing is configured. */
pricing: components["schemas"]["ProductPricing"] | null;
promotion: components["schemas"]["ProductPromotion"];
subscription: components["schemas"]["ProductSubscription"][];
associated_options: components["schemas"]["AssociatedOption"] | null;
shipping?: components["schemas"]["ProductShipping"];
/** @description Slug of the returned entity (variant slug when `variant_id` is set, otherwise the product slug). */
slug?: string;
/** @description Freeform metadata key/value map. */
metadata?: {
[key: string]: string;
} | null;
seo?: components["schemas"]["Seo"] | null;
/** @description HSN/SAC tax classification code. `null` when not configured. */
hsn_code?: string | null;
/** @description Indicates whether the item currently has an active offer. Emitted by the search-result variant of this payload. */
on_offer?: boolean;
/** @description Packing dimensions. Emitted by the search-result variant of this payload; `null` when none configured. */
packaging?: components["schemas"]["Packaging"];
inventory?: components["schemas"]["LotBatchDetail"][];
/** @description Taxable goods value and tax by applicable goods rate. */
tax_lines?: components["schemas"]["GoodsTaxLine"][];
};
/** ItemWiseInventory */
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["Category"] | Category |
components["schemas"]["ProductAttribute"] | ProductAttribute |
components["schemas"]["ProductImage"] | ProductImage |
components["schemas"]["ProductPricing"] | ProductPricing |
components["schemas"]["ProductPromotion"] | ProductPromotion |
components["schemas"]["ProductSubscription"] | ProductSubscription |
components["schemas"]["AssociatedOption"] | AssociatedOption |
components["schemas"]["ProductShipping"] | ProductShipping |
components["schemas"]["Seo"] | Seo |
components["schemas"]["Packaging"] | Packaging |
components["schemas"]["LotBatchDetail"] | LotBatchDetail |
components["schemas"]["GoodsTaxLine"] | GoodsTaxLine |
OpenAPI Schema
json
{
"type": "object",
"properties": {
"product_id": {
"type": "string"
},
"variant_id": {
"type": [
"string",
"null"
]
},
"sku": {
"type": [
"string",
"null"
]
},
"product_slug": {
"type": "string"
},
"variant_slug": {
"type": [
"string",
"null"
]
},
"product_name": {
"type": "string"
},
"variant_name": {
"type": [
"string",
"null"
]
},
"product_type": {
"type": "string",
"enum": [
"physical",
"digital",
"bundle"
],
"examples": [
"physical"
]
},
"short_description": {
"type": [
"string",
"null"
]
},
"active": {
"type": "boolean"
},
"stock_available": {
"type": "boolean"
},
"on_subscription": {
"type": "boolean"
},
"on_promotion": {
"type": "boolean"
},
"category_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"categories": {
"description": "Expanded category objects.",
"type": "array",
"items": {
"$ref": "#/components/schemas/Category"
}
},
"tags": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"reviews_count": {
"description": "Number of approved reviews; pending, rejected and archived reviews are excluded.",
"type": "integer"
},
"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",
"null"
],
"format": "double"
},
"attributes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductAttribute"
}
},
"images": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductImage"
}
},
"pricing": {
"description": "Pricing for the applicable customer group. `null` when no pricing is configured.",
"oneOf": [
{
"$ref": "#/components/schemas/ProductPricing"
},
{
"type": "null"
}
]
},
"promotion": {
"$ref": "#/components/schemas/ProductPromotion"
},
"subscription": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductSubscription"
}
},
"associated_options": {
"oneOf": [
{
"$ref": "#/components/schemas/AssociatedOption",
"description": "Used when `variant_id` is not null."
},
{
"type": "null",
"description": "Null when `variant_id` is null."
}
]
},
"shipping": {
"$ref": "#/components/schemas/ProductShipping"
},
"slug": {
"description": "Slug of the returned entity (variant slug when `variant_id` is set, otherwise the product slug).",
"type": "string"
},
"metadata": {
"description": "Freeform metadata key/value map.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"seo": {
"oneOf": [
{
"$ref": "#/components/schemas/Seo"
},
{
"type": "null"
}
]
},
"hsn_code": {
"description": "HSN/SAC tax classification code. `null` when not configured.",
"type": [
"string",
"null"
]
},
"on_offer": {
"description": "Indicates whether the item currently has an active offer. Emitted by the search-result variant of this payload.",
"type": "boolean"
},
"packaging": {
"description": "Packing dimensions. Emitted by the search-result variant of this payload; `null` when none configured.",
"$ref": "#/components/schemas/Packaging"
},
"inventory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LotBatchDetail"
}
},
"tax_lines": {
"description": "Taxable goods value and tax by applicable goods rate.",
"type": "array",
"items": {
"$ref": "#/components/schemas/GoodsTaxLine"
}
}
},
"examples": [],
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/schemas/Item"
},
"required": [
"product_id",
"variant_id",
"sku",
"product_name",
"variant_name",
"product_type",
"short_description",
"active",
"stock_available",
"on_subscription",
"on_promotion",
"category_ids",
"tags",
"reviews_count",
"reviews_rating_sum",
"pricing",
"promotion",
"subscription",
"associated_options"
],
"title": "SKU"
}Auto-generated from OpenAPI spec and TypeScript definitions