Skip to Content

cart

Get the current shopping cart

Authentication

Public Access: Accessible with the public API key

Query Structure

{ cart(id: String!) { id createdAt customer discounts tags subtotalPrice totalPrice currency totalNetPrice totalTax taxLines customerNote paymentMethods paymentFee shippingMethods shippingPrice lines physicalLines lineCount shippingAddress billingAddress checkoutUrl } }

Arguments

ArgumentTypeRequiredDescription
idStringYesThe ID of the cart to retrieve.

Return Type

Cart - Represents a cart in the store, exposing totals, items, discounts, shipping, and payment information for GraphQL APIs.

Example

query { cart(id: "eyJhbGciOiJIUzI1NiJ9...") { id createdAt currency subtotalPrice totalPrice totalTax lineCount lines { id quantity } shippingAddress { country city } billingAddress { country city } checkoutUrl } }