Skip to content

Order

Type: schema

TypeScript Definition

typescript
Order: {{
            order_number?: string;
            /** Format: date-time */
            order_date?: string;
            /** @enum {string} */
            status?: "draft" | "awaiting_approval" | "confirmed" | "partially_scheduled" | "awaiting_shipment" | "shipped" | "partially_shipped" | "undelivered" | "partially_undelivered" | "return_to_origin" | "partially_return_to_origin" | "complete" | "partially_delivered" | "cancelled" | "pending";
            /** @enum {string} */
            payment_status?: "pending" | "success" | "failed" | "partially_paid";
            payment_success_date?: string | null;
            customer_note?: string | null;
            is_promotion_applied?: boolean;
            /** Format: double */
            promotion_discount_amount?: number;
            /** Format: double */
            promotion_discount_percent?: number;
            is_coupon_applied?: boolean;
            coupon_code?: string | null;
            /** Format: double */
            coupon_discount_amount?: number;
            /** Format: double */
            coupon_discount_percent?: number;
            /** @description Information about the promotional offers that have been applied to the cart. */
            applied_promotions: components["schemas"]["AppliedPromotion"][];
            /** @description This key provides details about the savings in cart after coupon have been applied to the cart. */
            applied_coupons: components["schemas"]["AppliedCoupon"][];
            /** Format: float */
            promotion_savings?: number;
            /** Format: float */
            coupon_savings?: number;
            /** Format: float */
            other_savings?: number;
            /** Format: float */
            total_savings?: number;
            on_subscription?: boolean;
            /** Format: double */
            subtotal?: number;
            /** Format: double */
            item_total_tax?: number;
            /** Format: double */
            subtotal_including_tax?: number;
            /** Format: double */
            shipping_estimated_cost?: number;
            /** Format: double */
            shipping_discount_amount?: number;
            /** Format: double */
            shipping_amount?: number;
            /** Format: double */
            shipping_tax_rate?: number;
            /** Format: double */
            shipping_tax_amount?: number;
            /** Format: double */
            shipping_amount_including_tax?: number;
            fulfillment_preference?: components["schemas"]["FulfillmentPreference"];
            estimated_delivery_days?: number | null;
            /** Format: double */
            handling_charge_excluding_tax?: number;
            /** Format: double */
            handling_charge_tax_amount?: number;
            /** Format: double */
            handling_charge_including_tax?: number;
            /** Format: double */
            total_tax?: number;
            /** Format: double */
            grand_total?: number;
            loyalty_points_earned?: number;
            loyalty_points_redeemed?: number;
            credit_balance_used?: number;
            /** Format: double */
            to_be_paid?: number;
            order_items_count?: number;
            order_items?: components["schemas"]["OrderItem"][];
            billing_address?: components["schemas"]["CustomerAddress"];
            shipping_address?: components["schemas"]["CustomerAddress"];
            currency?: {
                name?: string;
                code?: string;
                symbol?: string;
            };
            /** @description Additional metadata associated with the order. */
            metadata?: {
                [key: string]: string;
            } | null;
            /** @description order cancellation option should be visible only if this flag is true. */
            is_cancellation_allowed?: boolean;
            /** @description to show refundable details in order cancellation ui. */
            cancellation_refund_details?: {
                /** @description loyalty point redeemed will be rollbacked and credited to user account. */
                loyalty_point?: number;
                /** @description amount that will be refunded to customer. */
                refundable_amount?: number;
                /** @description amount deducted from paid amount. */
                cancellation_charges?: number;
                /** @description reason for cancellation charges. */
                cancellation_charges_reason?: string;
                /**
                 * @description payment mode for refund.
                 * @enum {string}
                 */
                payment_mode?: "original-payment-mode" | "bank-transfer";
            };
            feedback?: string | null;
        };
        /** OrderDetail */
}

Component References

ReferenceResolves To
components["schemas"]["AppliedPromotion"]AppliedPromotion
components["schemas"]["AppliedCoupon"]AppliedCoupon
components["schemas"]["FulfillmentPreference"]FulfillmentPreference
components["schemas"]["OrderItem"]OrderItem
components["schemas"]["CustomerAddress"]CustomerAddress

OpenAPI Schema

json
{
  "title": "Order",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/Order",
    "description": "API reference for the Order schema"
  },
  "required": [
    "applied_promotions",
    "applied_coupons"
  ],
  "properties": {
    "order_number": {
      "type": "string"
    },
    "order_date": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "awaiting_approval",
        "confirmed",
        "partially_scheduled",
        "awaiting_shipment",
        "shipped",
        "partially_shipped",
        "undelivered",
        "partially_undelivered",
        "return_to_origin",
        "partially_return_to_origin",
        "complete",
        "partially_delivered",
        "cancelled",
        "pending"
      ]
    },
    "payment_status": {
      "type": "string",
      "enum": [
        "pending",
        "success",
        "failed",
        "partially_paid"
      ]
    },
    "payment_success_date": {
      "type": [
        "string",
        "null"
      ]
    },
    "customer_note": {
      "type": [
        "string",
        "null"
      ]
    },
    "is_promotion_applied": {
      "type": "boolean"
    },
    "promotion_discount_amount": {
      "type": "number",
      "format": "double"
    },
    "promotion_discount_percent": {
      "type": "number",
      "format": "double"
    },
    "is_coupon_applied": {
      "type": "boolean"
    },
    "coupon_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "coupon_discount_amount": {
      "type": "number",
      "format": "double"
    },
    "coupon_discount_percent": {
      "type": "number",
      "format": "double"
    },
    "applied_promotions": {
      "description": "Information about the promotional offers that have been applied to the cart.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppliedPromotion"
      }
    },
    "applied_coupons": {
      "description": "This key provides details about the savings in cart after coupon have been applied to the cart.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppliedCoupon"
      }
    },
    "promotion_savings": {
      "type": "number",
      "format": "float",
      "minimum": 0
    },
    "coupon_savings": {
      "type": "number",
      "format": "float",
      "minimum": 0
    },
    "other_savings": {
      "type": "number",
      "format": "float",
      "minimum": 0
    },
    "total_savings": {
      "type": "number",
      "format": "float",
      "minimum": 0
    },
    "on_subscription": {
      "type": "boolean"
    },
    "subtotal": {
      "type": "number",
      "format": "double"
    },
    "item_total_tax": {
      "type": "number",
      "format": "double"
    },
    "subtotal_including_tax": {
      "type": "number",
      "format": "double"
    },
    "shipping_estimated_cost": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "shipping_discount_amount": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "shipping_amount": {
      "type": "number",
      "format": "double"
    },
    "shipping_tax_rate": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "shipping_tax_amount": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "shipping_amount_including_tax": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "fulfillment_preference": {
      "$ref": "#/components/schemas/FulfillmentPreference"
    },
    "estimated_delivery_days": {
      "type": [
        "integer",
        "null"
      ]
    },
    "handling_charge_excluding_tax": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "handling_charge_tax_amount": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "handling_charge_including_tax": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "total_tax": {
      "type": "number",
      "format": "double"
    },
    "grand_total": {
      "type": "number",
      "format": "double"
    },
    "loyalty_points_earned": {
      "type": "integer",
      "minimum": 0
    },
    "loyalty_points_redeemed": {
      "type": "integer",
      "minimum": 0
    },
    "credit_balance_used": {
      "type": "integer"
    },
    "to_be_paid": {
      "type": "number",
      "format": "double"
    },
    "order_items_count": {
      "type": "integer"
    },
    "order_items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/OrderItem"
      }
    },
    "billing_address": {
      "$ref": "#/components/schemas/CustomerAddress"
    },
    "shipping_address": {
      "$ref": "#/components/schemas/CustomerAddress"
    },
    "currency": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        }
      }
    },
    "metadata": {
      "description": "Additional metadata associated with the order.",
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      }
    },
    "is_cancellation_allowed": {
      "description": "order cancellation option should be visible only if this flag is true.",
      "type": "boolean"
    },
    "cancellation_refund_details": {
      "description": "to show refundable details in order cancellation ui.",
      "type": "object",
      "properties": {
        "loyalty_point": {
          "description": "loyalty point redeemed will be rollbacked and credited to user account.",
          "type": "integer"
        },
        "refundable_amount": {
          "description": "amount that will be refunded to customer.",
          "type": "number"
        },
        "cancellation_charges": {
          "description": "amount deducted from paid amount.",
          "type": "number"
        },
        "cancellation_charges_reason": {
          "description": "reason for cancellation charges.",
          "type": "string"
        },
        "payment_mode": {
          "description": "payment mode for refund.",
          "type": "string",
          "enum": [
            "original-payment-mode",
            "bank-transfer"
          ]
        }
      }
    },
    "feedback": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: