Cart
Represents a cart in the store, exposing totals, items, discounts, shipping, and payment information for GraphQL APIs.
Type Definition
type Cart {
id: String
createdAt: String
confirmedAt: String
fulfilledAt: String
customer: Customer
discounts: [CartDiscount]
tags: [String]
subtotalPrice: Float
totalPrice: Float
currency: String
totalNetPrice: Float
totalTax: Float
taxLines: [CartTaxLine]
customerNote: String
paymentMethods: [CartPaymentMethod]
paymentFee: Float
shippingMethods: [CartShippingMethod]
shippingPrice: Float
lines: [CartLineItem]
physicalLines: [CartLineItem]
lineCount: Int
shippingAddress: Address
billingAddress: Address
checkoutUrl: String
metafields: [Metafield]!
metafield: Metafield
}Fields
Relationships
The Cart type represents a collection of items a customer intends to purchase. It relates to multiple types across the system: it references a Customer who owns the cart, contains CartLineItem entries for each product, applies CartDiscount entries for promotional pricing, includes CartTaxLine entries for tax calculations, tracks CartPaymentMethod and CartShippingMethod options, stores shipping and billing Address information, and maintains custom metadata through Metafield entries. This type serves as a central hub connecting customer identity, product selection, pricing, and fulfillment details.
Example
{
cart(id: "eyJhbGciOiJIUzI1NiJ9...") {
id
createdAt
confirmedAt
totalPrice
currency
subtotalPrice
totalTax
shippingPrice
lineCount
customer {
id
}
lines {
id
}
discounts {
id
}
shippingAddress {
id
}
billingAddress {
id
}
checkoutUrl
}
}Implements
None