AdminOrderItem
Type: schema
TypeScript Definition
typescript
AdminOrderItem: {{
product_id?: $Read<string>;
product_name?: $Read<string>;
/** @description Slug of the thing actually ordered — the variant's slug when the item has a variant, otherwise the product's. */
slug?: $Read<string>;
product_slug?: $Read<string | null>;
/** @description Null or an empty string when the item has no variant. */
variant_slug?: $Read<string | null>;
product_type?: components["schemas"]["ProductType"];
product_image_url?: $Read<string | null>;
sku: string;
on_offer?: $Read<boolean>;
on_promotion?: $Read<boolean>;
on_subscription?: boolean;
subscription_plan?: string | null;
subscription_interval?: $Read<number | null>;
subscription_frequency?: $Read<string | null>;
quantity: number;
/** @description Step the quantity can be changed by. */
incremental_quantity?: $Read<number>;
free_quantity?: $Read<number>;
is_free_item?: $Read<boolean>;
/** Format: double */
selling_price?: $Read<number>;
/** Format: double */
selling_price_excluding_tax?: $Read<number>;
/** Format: double */
listing_price?: $Read<number>;
/** @description Whether `selling_price` and `listing_price` already include tax. A flag, not an amount. */
price_including_tax?: $Read<boolean>;
/** Format: double */
promotion_discount_amount?: $Read<number>;
/** Format: double */
promotion_discount_percent?: $Read<number>;
/** Format: double */
coupon_discount_amount?: $Read<number>;
/** Format: double */
coupon_discount_percent?: $Read<number | null>;
/**
* @description Tax type from product pricing; seller order copies can use lowercase values.
* @default GST
* @enum {string}
*/
tax_type?: $Read<"gst" | "GST" | "VAT" | "ECO" | "vat" | "eco">;
/** Format: float */
tax_rate?: $Read<number>;
/** Format: double */
tax_amount?: $Read<number>;
/** @description HSN code used for the item's tax treatment. */
hsncode?: $Read<string | null>;
/** Format: double */
handling_charge_excluding_tax?: $Read<number>;
/** Format: double */
handling_charge_including_tax?: number;
/** Format: double */
handling_charge_tax_rate?: number;
variant_id?: string | null;
variant_name?: string | null;
product_variant_id?: $Read<string | 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"]["SellerBasicDetail"] | null;
/** @description Seller's own product identifier. Relevant to marketplace stores only; `null` for b2b and b2c stores. */
seller_product_id?: $Read<string | null>;
/** @description Seller's own variant identifier. Relevant to marketplace stores only; `null` for b2b and b2c stores. */
seller_variant_id?: $Read<string | null>;
/** @description Product attributes captured on the item at the time of the order. */
attributes?: $Read<{
id?: string;
/** @description Attribute name in snake case. */
key?: string;
name?: string;
/** @description Attribute type, e.g. `single-select`, `boolean`, `text`, `multi-select`, `date`, `color`. */
type?: string;
/** @description The attribute value captured on the order item. Its JSON shape follows the attribute type: strings for text, single-select and date; booleans for boolean; lists for multi-select; structured values for color. */
value?: unknown;
}[] | null>;
/** @description Variant options, keyed by the option's snake-case key. `null` for items with no variant. */
associated_options?: $Read<{
[key: string]: {
name?: string;
type?: string;
value?: string;
};
} | null>;
/** @description Taxable goods value and GST by applicable rate. A free reward at a higher rate can change the rate on its qualifying earning units. */
tax_lines?: components["schemas"]["AdminGoodsTaxLine"][];
};
/** OrderItemRead */
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["ProductType"] | ProductType |
components["schemas"]["SellerBasicDetail"] | SellerBasicDetail |
components["schemas"]["AdminGoodsTaxLine"] | AdminGoodsTaxLine |
OpenAPI Schema
json
{
"type": "object",
"properties": {
"product_id": {
"type": "string",
"readOnly": true
},
"product_name": {
"type": "string",
"readOnly": true
},
"slug": {
"description": "Slug of the thing actually ordered — the variant's slug when the item has a variant, otherwise the product's.",
"type": "string",
"readOnly": true
},
"product_slug": {
"type": [
"string",
"null"
],
"readOnly": true
},
"variant_slug": {
"description": "Null or an empty string when the item has no variant.",
"type": [
"string",
"null"
],
"readOnly": true
},
"product_type": {
"$ref": "#/components/schemas/ProductType"
},
"product_image_url": {
"type": [
"string",
"null"
],
"readOnly": true
},
"sku": {
"type": "string"
},
"on_offer": {
"type": "boolean",
"readOnly": true
},
"on_promotion": {
"type": "boolean",
"readOnly": true
},
"on_subscription": {
"type": "boolean"
},
"subscription_plan": {
"type": [
"string",
"null"
]
},
"subscription_interval": {
"type": [
"integer",
"null"
],
"readOnly": true
},
"subscription_frequency": {
"type": [
"string",
"null"
],
"readOnly": true
},
"quantity": {
"type": "integer"
},
"incremental_quantity": {
"description": "Step the quantity can be changed by.",
"type": "integer",
"readOnly": true
},
"free_quantity": {
"type": "integer",
"readOnly": true
},
"is_free_item": {
"type": "boolean",
"readOnly": true
},
"selling_price": {
"type": "number",
"format": "double",
"readOnly": true
},
"selling_price_excluding_tax": {
"type": "number",
"format": "double",
"readOnly": true
},
"listing_price": {
"type": "number",
"format": "double",
"readOnly": true
},
"price_including_tax": {
"description": "Whether `selling_price` and `listing_price` already include tax. A flag, not an amount.",
"type": "boolean",
"readOnly": true
},
"promotion_discount_amount": {
"type": "number",
"format": "double",
"readOnly": true
},
"promotion_discount_percent": {
"type": "number",
"format": "double",
"readOnly": true
},
"coupon_discount_amount": {
"type": "number",
"format": "double",
"readOnly": true
},
"coupon_discount_percent": {
"type": [
"number",
"null"
],
"format": "double",
"readOnly": true
},
"tax_type": {
"description": "Tax type from product pricing; seller order copies can use lowercase values.",
"type": "string",
"default": "GST",
"enum": [
"gst",
"GST",
"VAT",
"ECO",
"vat",
"eco"
],
"readOnly": true
},
"tax_rate": {
"type": "number",
"format": "float",
"readOnly": true
},
"tax_amount": {
"type": "number",
"format": "double",
"readOnly": true
},
"hsncode": {
"description": "HSN code used for the item's tax treatment.",
"type": [
"string",
"null"
],
"readOnly": true
},
"handling_charge_excluding_tax": {
"type": "number",
"format": "double",
"readOnly": true
},
"handling_charge_including_tax": {
"type": "number",
"format": "double"
},
"handling_charge_tax_rate": {
"type": "number",
"format": "double"
},
"variant_id": {
"type": [
"string",
"null"
]
},
"variant_name": {
"type": [
"string",
"null"
]
},
"product_variant_id": {
"type": [
"string",
"null"
],
"readOnly": true
},
"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/SellerBasicDetail"
},
{
"type": "null"
}
]
},
"seller_product_id": {
"description": "Seller's own product identifier. Relevant to marketplace stores only; `null` for b2b and b2c stores.",
"type": [
"string",
"null"
],
"readOnly": true
},
"seller_variant_id": {
"description": "Seller's own variant identifier. Relevant to marketplace stores only; `null` for b2b and b2c stores.",
"type": [
"string",
"null"
],
"readOnly": true
},
"attributes": {
"description": "Product attributes captured on the item at the time of the order.",
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"description": "Attribute name in snake case.",
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"description": "Attribute type, e.g. `single-select`, `boolean`, `text`, `multi-select`, `date`, `color`.",
"type": "string"
},
"value": {
"description": "The attribute value captured on the order item. Its JSON shape follows the attribute type: strings for text, single-select and date; booleans for boolean; lists for multi-select; structured values for color."
}
}
},
"readOnly": true
},
"associated_options": {
"description": "Variant options, keyed by the option's snake-case key. `null` for items with no variant.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"readOnly": true
},
"tax_lines": {
"description": "Taxable goods value and GST by applicable rate. A free reward at a higher rate can change the rate on its qualifying earning units.",
"type": "array",
"items": {
"$ref": "#/components/schemas/AdminGoodsTaxLine"
}
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/schemas/AdminOrderItem"
},
"required": [
"sku",
"quantity"
],
"title": "OrderItem",
"x-tags": [
"Orders"
]
}Auto-generated from OpenAPI spec and TypeScript definitions