Cart
ObjectRepresents 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
- CartAddress
billingAddress Gets the billing address associated with the cart. This may be the same as the shipping address.
- String!
currency Gets the currency of the cart.
- String
customerEmail Gets the customer email associated with the cart, if any.
- ID
customerId Gets the customer ID associated with the cart, if any.
- DiscountApplicationConnection!
discountApplications Retrieves a paginated list of discount applications for the order
- [DiscountCode!]!
discountCodes Gets the discount codes applied to the cart.
- ID!
id The unique identifier of the cart
- CartLineItemConnection!
lineItems Retrieves a paginated list of line items for a specific cart.
- Long!
lineItemsQuantity Sum of all LineItem quantities.
- Boolean
marketingConsent Gets whether marketing consent was set on the cart, if any.
- [MetadataItem!]!
metadata Gets the metadata associated with the cart. Once the cart is ordered, this metadata is transferred to the order.
- Channel
priceChannel Gets the price channel associated with the cart.
- CartAddress
shippingAddress Gets the shipping address associated with the cart.
- [CartShippingLine!]!
shippingLines Gets the shipping lines applied to the cart.
- CartState!
state Gets the current state of the cart.
Possible enum valuesACTIVEThe default state where a Cart can be updated and ordered.
ORDEREDA Cart was ordered, and no further operations are allowed on the Cart.
- Money!
subtotal 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.
- Money!
total Gets the total price of the cart after discounts and taxes.
Mutations
cartCustomLineItemsAddDeprecatedAdds a custom line item to an existing cart.
Deprecated: Use the Storefront Cart API. This Admin mutation will be removed after external consumers migrate.cartCustomShippingLinesSetDeprecatedSets 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.cartLineItemsUpdateDeprecatedUpdates 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.