The data representation for an Order to be imported that is persisted as an Order in the Project.

In commercetools, you can import an Order using the
[Create Order by Import](ctp:import:endpoint:/{projectKey}/orders/import:POST)
endpoint method instead of creating it from a Cart.

An OrderImport is a snapshot of an order at the time it was imported.
interface OrderImport {
    billingAddress?: Address;
    completedAt?: string;
    country?: string;
    custom?: Custom;
    customLineItems?: CustomLineItemDraft[];
    customer?: CustomerKeyReference;
    customerEmail?: string;
    customerGroup?: CustomerGroupKeyReference;
    inventoryMode?: string;
    itemShippingAddresses?: Address[];
    lineItems?: LineItemImportDraft[];
    orderNumber: string;
    orderState?: string;
    origin?: string;
    paymentState?: string;
    shipmentState?: string;
    shippingAddress?: Address;
    shippingInfo?: ShippingInfoImportDraft;
    state?: StateKeyReference;
    store?: StoreKeyReference;
    taxCalculationMode?: string;
    taxRoundingMode?: string;
    taxedPrice?: TaxedPrice;
    totalPrice: TypedMoney;
}

Properties

billingAddress?: Address

Maps to Order.billingAddress.

completedAt?: string

Maps to Order.completedAt.

country?: string

Maps to Order.country.

custom?: Custom

Maps to Order.custom.

customLineItems?: CustomLineItemDraft[]

Maps to Order.customLineItems

customerEmail?: string

Maps to Order.customerEmail.

Maps to Order.customerGroup.

inventoryMode?: string

Maps to Order.inventoryMode.

itemShippingAddresses?: Address[]

Maps to Order.itemShippingAddresses.

lineItems?: LineItemImportDraft[]

Maps to Order.lineItems.

orderNumber: string

Maps to Order.orderNumber, String that uniquely identifies an order. It should be unique across a project. Once it's set it cannot be changed.

orderState?: string

Maps to Order.orderState.

origin?: string

Maps to Order.origin.

paymentState?: string

Maps to Order.paymentState.

shipmentState?: string

Maps to Order.shipmentState.

shippingAddress?: Address

Maps to Order.shippingAddress.

Maps to Order.shippingInfo.

Reference to a State in a custom workflow.

Reference to the Store in which the Order is associated. If referenced Store does not exist, the state of the ImportOperation will be set to unresolved until the necessary Store exists.

taxCalculationMode?: string

Maps to Order.taxCalculationMode.

taxRoundingMode?: string

Maps to Order.taxRoundingMode.

taxedPrice?: TaxedPrice

Maps to Order.taxedPrice.

totalPrice: TypedMoney

Maps to Order.totalPrice.