interface Order {
    anonymousId?: string;
    billingAddress?: Address;
    businessUnit?: BusinessUnitKeyReference;
    cart?: CartReference;
    completedAt?: string;
    country?: string;
    createdAt: string;
    createdBy?: CreatedBy;
    custom?: CustomFields;
    customLineItems: CustomLineItem[];
    customerEmail?: string;
    customerGroup?: CustomerGroupReference;
    customerId?: string;
    directDiscounts?: DirectDiscount[];
    discountCodes?: DiscountCodeInfo[];
    discountOnTotalPrice?: DiscountOnTotalPrice;
    id: string;
    inventoryMode?: string;
    itemShippingAddresses?: Address[];
    lastMessageSequenceNumber?: number;
    lastModifiedAt: string;
    lastModifiedBy?: LastModifiedBy;
    lineItems: LineItem[];
    locale?: string;
    orderNumber?: string;
    orderState: string;
    origin: string;
    paymentInfo?: PaymentInfo;
    paymentState?: string;
    purchaseOrderNumber?: string;
    quote?: QuoteReference;
    refusedGifts: CartDiscountReference[];
    returnInfo?: ReturnInfo[];
    shipmentState?: string;
    shipping: Shipping[];
    shippingAddress?: Address;
    shippingCustomFields?: CustomFields;
    shippingInfo?: ShippingInfo;
    shippingKey?: string;
    shippingMode: string;
    shippingRateInput?: ShippingRateInput;
    state?: StateReference;
    store?: StoreKeyReference;
    syncInfo: SyncInfo[];
    taxCalculationMode?: string;
    taxMode?: string;
    taxRoundingMode?: string;
    taxedPrice?: TaxedPrice;
    taxedShippingPrice?: TaxedPrice;
    totalPrice: TypedMoney;
    version: number;
}

Hierarchy (view full)

Properties

anonymousId?: string

Anonymous session associated with the Order.

billingAddress?: Address

Billing address associated with the Order.

businessUnit?: BusinessUnitKeyReference

Reference to a Business Unit the Order belongs to.

cart?: CartReference

Reference to the Cart for an Order created from Cart. The referenced Cart will have the Ordered CartState.

completedAt?: string

User-defined date and time (UTC) of the Order. Present only on an Order created using Order Import.

country?: string
createdAt: string

Date and time (UTC) the Order was initially created.

createdBy?: CreatedBy

IDs and references that created the Order.

custom?: CustomFields

Custom Fields of the Order.

customLineItems: CustomLineItem[]

Custom Line Items that are part of the Order.

customerEmail?: string

Email address of the Customer that the Order belongs to.

customerGroup?: CustomerGroupReference

Reference to the Customer Group of the Customer that the Order belongs to. Used for Line Item price selection.

customerId?: string

id of the Customer that the Order belongs to.

directDiscounts?: DirectDiscount[]

Direct Discounts added to the Order. An Order that has discountCodes cannot have directDiscounts.

discountCodes?: DiscountCodeInfo[]

Discount Codes added to the Order. An Order that has directDiscounts cannot have discountCodes.

discountOnTotalPrice?: DiscountOnTotalPrice

Discounts that apply on the total price of the Order.

id: string

Unique identifier of the Order.

inventoryMode?: string

Indicates how stock quantities are tracked for Line Items in the Order.

itemShippingAddresses?: Address[]

Additional shipping addresses of the Order as specified by LineItems using the shippingDetails field. Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses.

lastMessageSequenceNumber?: number

Internal-only field.

Deprecated

lastModifiedAt: string

Date and time (UTC) the Order was last updated.

lastModifiedBy?: LastModifiedBy

IDs and references that last modified the Order.

lineItems: LineItem[]

Line Items that are part of the Order.

locale?: string

Languages of the Order. Can only contain languages supported by the Project.

orderNumber?: string

User-defined identifier of the Order that is unique across a Project.

orderState: string

Current status of the Order.

origin: string

Indicates the origin of the Cart from which the Order was created.

paymentInfo?: PaymentInfo

Payment information related to the Order.

paymentState?: string

Payment status of the Order.

purchaseOrderNumber?: string

User-defined identifier of a purchase Order.

It is typically set by the [Buyer](ctp:api:type:Buyer) and can be used with [Quotes](/quotes-overview) to track the purchase Order during the [quote and order flow](/../api/quotes-overview#intended-workflow).
quote?: QuoteReference

Reference to the Quote for an Order created from Quote.

refusedGifts: CartDiscountReference[]

Automatically set when a Line Item with GiftLineItem LineItemMode is removed from the Order.

returnInfo?: ReturnInfo[]

Contains information regarding the returns associated with the Order.

shipmentState?: string

Shipment status of the Order.

shipping: Shipping[]

Shipping-related information for Multiple ShippingMode. Updated automatically each time a new Shipping Method is added.

shippingAddress?: Address

Shipping address associated with the Order. Determines eligible ShippingMethod rates and Tax Rates of Line Items.

shippingCustomFields?: CustomFields

Custom Fields of the Shipping Method for Single ShippingMode.

shippingInfo?: ShippingInfo

Shipping-related information for Single ShippingMode. Automatically set when a Shipping Method is set.

shippingKey?: string

key of the ShippingMethod for Single ShippingMode.

shippingMode: string

Indicates whether there can be one or multiple Shipping Methods.

shippingRateInput?: ShippingRateInput

Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

- If `CartClassification`, it is [ClassificationShippingRateInput](ctp:api:type:ClassificationShippingRateInput).
- If `CartScore`, it is [ScoreShippingRateInput](ctp:api:type:ScoreShippingRateInput).
- If `CartValue`, it cannot be used.

State of the Order. This reference can point to a State in a custom workflow.

store?: StoreKeyReference

Reference to a Store the Order belongs to.

syncInfo: SyncInfo[]

Contains synchronization activity information of the Order (like export or import). Can only be set with Update SyncInfo update action.

taxCalculationMode?: string

Indicates how taxes are calculated when calculating taxes for taxedPrice.

taxMode?: string

Indicates how Tax Rates are set.

taxRoundingMode?: string

Indicates how monetary values are rounded when calculating taxes for taxedPrice.

taxedPrice?: TaxedPrice
  • For Platform TaxMode, it is automatically set when a shipping address is set.

    • For External TaxMode, it is automatically set when shippingAddress and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.

    If a discount applies on totalPrice, this field holds the discounted values.

taxedShippingPrice?: TaxedPrice

Sum of the taxedPrice field of ShippingInfo across all Shipping Methods.

totalPrice: TypedMoney

Sum of the totalPrice field of all LineItems and CustomLineItems, and if available, the price field of ShippingInfo. If a discount applies on totalPrice, this field holds the discounted value.

Taxes are included if [TaxRate](ctp:api:type:TaxRate) `includedInPrice` is `true` for each price.
version: number

Current version of the Order.