Docs
Dashboard

Cart

Object

Represents a cart in Thor, encapsulating all information required to display and manage items across storefronts and sales channels.

Each cart includes details such as the total price, line items, shipping address, and available shipping methods. Carts can be used to track items before purchase, allowing customers to review and modify their selections.

#

Fields


billingAddress
CartAddress

Gets the billing address associated with the cart. This may be the same as the shipping address.

currency
String!

Gets the currency of the cart.

customerEmail
String

Gets the customer email associated with the cart, if any.

customerId
ID

Gets the customer ID associated with the cart, if any.

discountApplications
DiscountApplicationConnection!

Retrieves a paginated list of discount applications for the order

discountCodes
[DiscountCode!]!

Gets the discount codes applied to the cart.

id
ID!

The unique identifier of the cart

lineItems
CartLineItemConnection!

Retrieves a paginated list of line items for a specific cart.

lineItemsQuantity
Long!

Sum of all LineItem quantities.

marketingConsent
Boolean

Gets whether marketing consent was set on the cart, if any.

metadata
[MetadataItem!]!

Gets the metadata associated with the cart. Once the cart is ordered, this metadata is transferred to the order.

priceChannel
Channel

Gets the price channel associated with the cart.

shippingAddress
CartAddress

Gets the shipping address associated with the cart.

shippingLines
[CartShippingLine!]!

Gets the shipping lines applied to the cart.

state
CartState!

Gets the current state of the cart.

Possible enum values
  • ACTIVE

    The default state where a Cart can be updated and ordered.

  • ORDERED

    A Cart was ordered, and no further operations are allowed on the Cart.

subtotal
Money!

Gets the total price of the cart before discounts and taxes.

taxedPrice
TaxedPrice

Gets the taxed price of the cart. This may be null if the cart does not yet have a taxed price.

total
Money!

Gets the total price of the cart after discounts and taxes.

#

Mutations


Adds a custom line item to an existing cart.

Deprecated: Use the Storefront Cart API. This Admin mutation will be removed after external consumers migrate.

Sets custom shipping lines for a cart, replacing any existing shipping lines.

Deprecated: Use the Storefront Cart API. This Admin mutation will be removed after external consumers migrate.

Updates one or more line items in an existing cart.

Deprecated: Use the Storefront Cart API. This Admin mutation will be removed after external consumers migrate.