interface Cart {
    anonymousId?: string;
    billingAddress?: Address;
    businessUnit?: BusinessUnitKeyReference;
    cartState: string;
    country?: string;
    createdAt: string;
    createdBy?: CreatedBy;
    custom?: CustomFields;
    customLineItems: CustomLineItem[];
    customerEmail?: string;
    customerGroup?: CustomerGroupReference;
    customerId?: string;
    deleteDaysAfterLastModification?: number;
    directDiscounts: DirectDiscount[];
    discountCodes: DiscountCodeInfo[];
    id: string;
    inventoryMode: string;
    itemShippingAddresses: Address[];
    key?: string;
    lastModifiedAt: string;
    lastModifiedBy?: LastModifiedBy;
    lineItems: LineItem[];
    locale?: string;
    origin: string;
    paymentInfo?: PaymentInfo;
    refusedGifts: CartDiscountReference[];
    shipping: Shipping[];
    shippingAddress?: Address;
    shippingCustomFields?: CustomFields;
    shippingInfo?: ShippingInfo;
    shippingKey?: string;
    shippingMode: string;
    shippingRateInput?: ShippingRateInput;
    store?: StoreKeyReference;
    taxCalculationMode: string;
    taxMode: string;
    taxRoundingMode: string;
    taxedPrice?: TaxedPrice;
    taxedShippingPrice?: TaxedPrice;
    totalLineItemQuantity?: number;
    totalPrice: CentPrecisionMoney;
    version: number;
}

Hierarchy

Properties

anonymousId?: string

Anonymous session associated with the Cart.

billingAddress?: Address

Billing address associated with the Cart.

Reference to a Business Unit the Cart belongs to.

cartState: string

Current status of the Cart.

country?: string
createdAt: string

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

createdBy?: CreatedBy

Present on resources created after 1 February 2019 except for events not tracked.

custom?: CustomFields

Custom Fields of the Cart.

customLineItems: CustomLineItem[]

Custom Line Items added to the Cart.

customerEmail?: string

Email address of the Customer that the Cart belongs to.

customerGroup?: CustomerGroupReference

Reference to the Customer Group of the Customer that the Cart belongs to. Used for LineItem Price selection.

customerId?: string

id of the Customer that the Cart belongs to.

deleteDaysAfterLastModification?: number

Number of days after which an active Cart is deleted since its last modification. Configured in Project settings.

directDiscounts: DirectDiscount[]

Direct Discounts added to the Cart. A Cart that has discountCodes cannot have directDiscounts.

discountCodes: DiscountCodeInfo[]

Discount Codes applied to the Cart. A Cart that has directDiscounts cannot have discountCodes.

id: string

Unique identifier of the Cart.

inventoryMode: string

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

itemShippingAddresses: Address[]

Additional shipping addresses of the Cart 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`.
key?: string

User-defined unique identifier of the Cart.

lastModifiedAt: string

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

lastModifiedBy?: LastModifiedBy

Present on resources updated after 1 February 2019 except for events not tracked.

lineItems: LineItem[]

Line Items added to the Cart.

locale?: string

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

origin: string

Indicates how the Cart was created.

paymentInfo?: PaymentInfo

Payment information related to the Cart.

refusedGifts: CartDiscountReference[]

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

shipping: Shipping[]

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

shippingAddress?: Address

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

shippingCustomFields?: CustomFields

Custom Fields of the Shipping Method in a Cart with Single ShippingMode.

shippingInfo?: ShippingInfo

Shipping-related information of a Cart with Single ShippingMode. Automatically set when a Shipping Method is set.

shippingKey?: string

User-defined unique identifier of the Shipping Method in a Cart with Single ShippingMode.

shippingMode: string

Indicates whether the Cart has 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.

Reference to a Store the Cart belongs to.

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 a Cart with Platform TaxMode, it is automatically set when a shipping address is set.
    • For a Cart with External TaxMode, it is automatically set when the external Tax Rate for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.
taxedShippingPrice?: TaxedPrice

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

totalLineItemQuantity?: number

Sum of all LineItem quantities, excluding CustomLineItems. Only present when the Cart has at least one LineItem.

totalPrice: CentPrecisionMoney

Sum of the totalPrice field of all LineItems and CustomLineItems, and if available, the price field of ShippingInfo.

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

Current version of the Cart.

Generated using TypeDoc