OrderStateItem
Type: schema
Description
An item of an order as its events carry it.
TypeScript Definition
typescript
OrderStateItem: {{
product_id: string;
product_name: string | null;
product_image_url: string | null;
/** @enum {string|null} */
product_type: "physical" | "digital" | "bundle" | null;
sku: string;
product_slug: string | null;
variant_slug: string | null;
variant_id: string | null;
variant_name: string | null;
/** @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: boolean;
on_subscription: boolean;
subscription_plan: string | null;
subscription_interval: number | null;
subscription_frequency: string | null;
quantity: number;
free_quantity: number;
is_free_item: boolean;
price_including_tax: boolean | null;
/** Format: double */
selling_price: number;
/** Format: double */
listing_price: number;
/** Format: double */
selling_price_excluding_tax: number;
/** Format: double */
promotion_discount_amount: number;
/** Format: double */
coupon_discount_amount: number;
/**
* @description The kind of tax `tax_rate` is, e.g. `GST`, as the product's pricing names it; lowercase (`gst`) on orders an admin created and on a seller's copy of a marketplace order.
* @example GST
*/
tax_type: string;
/** Format: double */
tax_rate: number;
/** Format: double */
tax_amount: number;
/** Format: double */
handling_charge_excluding_tax: number;
/** Format: double */
handling_charge_tax_rate: number;
/** Format: double */
handling_charge_including_tax: number;
associated_options: components["schemas"]["AssociatedOption"] | null;
/** @description The product's attributes when it was ordered. `null` when the order was created without them (e.g. by an admin), and empty (`{}`) on a seller's copy of a marketplace order without them. */
attributes: components["schemas"]["ProductAttribute"][] | Record<string, never> | null;
/** @description Seller ID. This field is relevant for marketplace type stores only. Will return null for b2b and b2c type stores. */
seller_id: string | null;
/** @description Seller detail information. This field is relevant for marketplace type stores only. Will return null for b2b and b2c type stores. */
seller_detail: components["schemas"]["SellerInfo"] | null;
/**
* Format: double
* @description Promotion discount expressed as a percentage.
*/
promotion_discount_percent: number;
/**
* Format: double
* @description Coupon discount expressed as a percentage.
*/
coupon_discount_percent: number;
/** @description Seller's product ID. Relevant for marketplace stores; `null` otherwise. */
seller_product_id: string | null;
/** @description Seller's variant ID. Relevant for marketplace stores; `null` otherwise. */
seller_variant_id: string | null;
/** @description Same as `variant_id`. */
product_variant_id: string | null;
/** @description HSN/SAC tax classification code of the product. `null` when not configured. */
hsncode: string | null;
/** @description The step the item's quantity changes by. */
incremental_quantity: number;
/** @description Whether the product had an active offer when it was ordered. */
on_offer: boolean;
/** @description Slug of the ordered entity (the variant's when `variant_id` is set, otherwise the product's). */
slug: string | null;
};
/** @enum {unknown} */
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["AssociatedOption"] | AssociatedOption |
components["schemas"]["ProductAttribute"] | ProductAttribute |
components["schemas"]["SellerInfo"] | SellerInfo |
OpenAPI Schema
json
{
"title": "OrderStateItem",
"description": "An item of an order as its events carry it.",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/OrderStateItem",
"description": "API reference for the OrderStateItem schema"
},
"required": [
"product_id",
"product_name",
"product_image_url",
"product_type",
"sku",
"product_slug",
"variant_slug",
"variant_id",
"variant_name",
"on_promotion",
"on_subscription",
"subscription_plan",
"subscription_interval",
"subscription_frequency",
"quantity",
"free_quantity",
"is_free_item",
"price_including_tax",
"selling_price",
"listing_price",
"selling_price_excluding_tax",
"promotion_discount_amount",
"coupon_discount_amount",
"tax_type",
"tax_rate",
"tax_amount",
"handling_charge_excluding_tax",
"handling_charge_tax_rate",
"handling_charge_including_tax",
"backorder",
"seller_id",
"seller_detail",
"promotion_discount_percent",
"coupon_discount_percent",
"seller_product_id",
"seller_variant_id",
"product_variant_id",
"hsncode",
"incremental_quantity",
"on_offer",
"slug",
"associated_options",
"attributes"
],
"properties": {
"product_id": {
"type": "string"
},
"product_name": {
"type": [
"string",
"null"
]
},
"product_image_url": {
"type": [
"string",
"null"
]
},
"product_type": {
"type": [
"string",
"null"
],
"enum": [
"physical",
"digital",
"bundle",
null
]
},
"sku": {
"type": "string"
},
"product_slug": {
"type": [
"string",
"null"
]
},
"variant_slug": {
"type": [
"string",
"null"
]
},
"variant_id": {
"type": [
"string",
"null"
]
},
"variant_name": {
"type": [
"string",
"null"
]
},
"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"
},
"on_subscription": {
"type": "boolean"
},
"subscription_plan": {
"type": [
"string",
"null"
]
},
"subscription_interval": {
"type": [
"integer",
"null"
]
},
"subscription_frequency": {
"type": [
"string",
"null"
]
},
"quantity": {
"type": "integer",
"minimum": 0
},
"free_quantity": {
"type": "integer",
"minimum": 0
},
"is_free_item": {
"type": "boolean"
},
"price_including_tax": {
"type": [
"boolean",
"null"
]
},
"selling_price": {
"type": "number",
"format": "double",
"minimum": 0
},
"listing_price": {
"type": "number",
"format": "double",
"minimum": 0
},
"selling_price_excluding_tax": {
"type": "number",
"format": "double",
"minimum": 0
},
"promotion_discount_amount": {
"type": "number",
"format": "double",
"minimum": 0
},
"coupon_discount_amount": {
"type": "number",
"format": "double",
"minimum": 0
},
"tax_type": {
"description": "The kind of tax `tax_rate` is, e.g. `GST`, as the product's pricing names it; lowercase (`gst`) on orders an admin created and on a seller's copy of a marketplace order.",
"type": "string",
"examples": [
"GST"
]
},
"tax_rate": {
"type": "number",
"format": "double",
"minimum": 0
},
"tax_amount": {
"type": "number",
"format": "double",
"minimum": 0
},
"handling_charge_excluding_tax": {
"type": "number",
"format": "double",
"minimum": 0
},
"handling_charge_tax_rate": {
"type": "number",
"format": "double",
"minimum": 0
},
"handling_charge_including_tax": {
"type": "number",
"format": "double",
"minimum": 0
},
"associated_options": {
"oneOf": [
{
"$ref": "#/components/schemas/AssociatedOption",
"description": "Used when `variant_id` is not null."
},
{
"type": "null",
"description": "Null when `variant_id` is null."
}
]
},
"attributes": {
"description": "The product's attributes when it was ordered. `null` when the order was created without them (e.g. by an admin), and empty (`{}`) on a seller's copy of a marketplace order without them.",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductAttribute"
}
},
{
"type": "object",
"maxProperties": 0
},
{
"type": "null"
}
]
},
"seller_id": {
"description": "Seller ID. This field is relevant for marketplace type stores only. Will return null for b2b and b2c type stores.",
"type": [
"string",
"null"
]
},
"seller_detail": {
"description": "Seller detail information. This field is relevant for marketplace type stores only. Will return null for b2b and b2c type stores.",
"oneOf": [
{
"$ref": "#/components/schemas/SellerInfo"
},
{
"type": "null"
}
]
},
"promotion_discount_percent": {
"description": "Promotion discount expressed as a percentage.",
"type": "number",
"format": "double",
"minimum": 0
},
"coupon_discount_percent": {
"description": "Coupon discount expressed as a percentage.",
"type": "number",
"format": "double",
"minimum": 0
},
"seller_product_id": {
"description": "Seller's product ID. Relevant for marketplace stores; `null` otherwise.",
"type": [
"string",
"null"
]
},
"seller_variant_id": {
"description": "Seller's variant ID. Relevant for marketplace stores; `null` otherwise.",
"type": [
"string",
"null"
]
},
"product_variant_id": {
"description": "Same as `variant_id`.",
"type": [
"string",
"null"
]
},
"hsncode": {
"description": "HSN/SAC tax classification code of the product. `null` when not configured.",
"type": [
"string",
"null"
]
},
"incremental_quantity": {
"description": "The step the item's quantity changes by.",
"type": "integer",
"minimum": 0
},
"on_offer": {
"description": "Whether the product had an active offer when it was ordered.",
"type": "boolean"
},
"slug": {
"description": "Slug of the ordered entity (the variant's when `variant_id` is set, otherwise the product's).",
"type": [
"string",
"null"
]
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions