Skip to content

OrderItem

Type: schema

TypeScript Definition

typescript
OrderItem: {{
            product_id: string;
            product_name: string;
            product_image_url: string | null;
            /** @enum {unknown} */
            product_type: "physical" | "digital" | "bundle";
            sku: string;
            slug: string;
            variant_id: string | null;
            variant_name: string | null;
            /**
             * @description backorder
             *
             *     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;
            /** 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;
            /**
             * @default GST
             * @example GST
             * @constant
             */
            tax_type: "GST";
            /** 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;
            attributes?: components["schemas"]["ProductAttribute"][];
            /** @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;
        };
        /**
         * OrderList
         * @description order list model
         */
}

Component References

ReferenceResolves To
components["schemas"]["AssociatedOption"]AssociatedOption
components["schemas"]["ProductAttribute"]ProductAttribute
components["schemas"]["SellerInfo"]SellerInfo

OpenAPI Schema

json
{
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/OrderItem",
    "description": "API reference for the OrderItem schema"
  },
  "required": [
    "product_id",
    "product_name",
    "product_image_url",
    "product_type",
    "sku",
    "slug",
    "variant_id",
    "variant_name",
    "backorder",
    "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"
  ],
  "properties": {
    "product_id": {
      "type": "string"
    },
    "product_name": {
      "type": "string"
    },
    "product_image_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "product_type": {
      "enum": [
        "physical",
        "digital",
        "bundle"
      ]
    },
    "sku": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "variant_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "variant_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "backorder": {
      "description": "backorder\n\nIndicates 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"
    },
    "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": {
      "type": "string",
      "default": "GST",
      "const": "GST",
      "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": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProductAttribute"
      }
    },
    "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"
        }
      ]
    }
  }
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: