Storefront GraphQL APIQueries
cart
Query for cart
Arguments
id·ID!non-nullscalarThe ID of the object
Returns
CartNodeobjectabandoned·Boolean!non-nullscalarattribution·AttributionNodeobjectdateCreated·DateTime!non-nullscalarlines·[CartLineNode!]!non-nulllistobjectid·ID!non-nullscalarThe ID of the object
pk·Intscalaruser·UserNodeobjectcheckoutUrl·Stringscalarcurrency·StringscalartotalInclTax·StringscalartotalExclTax·StringscalartotalInclTaxExclDiscounts·StringscalartotalExclTaxExclDiscounts·StringscalartotalDiscount·StringscalarnumItems·IntscalarnumLines·IntscalarofferDiscounts·[OfferDiscountNode]listobjectvoucherDiscounts·[VoucherDiscountNode]listobjectmetadata·GenericScalarscalarsubscriptionPreview·SubscriptionPreviewNodeobjectquery Cart($id: ID!) {
cart(id: $id) {
abandoned
dateCreated
id
pk
checkoutUrl
currency
totalInclTax
totalExclTax
totalInclTaxExclDiscounts
totalExclTaxExclDiscounts
}
}{
"id": "<id>"
}{
"data": {
"cart": {
"abandoned": true,
"attribution": {
"id": "<id>",
"utmSource": "<your-value>",
"utmMedium": "<your-value>",
"utmCampaign": "<your-value>",
"utmTerm": "<your-value>",
"utmContent": "<your-value>",
"gclid": "<your-value>",
"campaign": "<your-value>",
"metadata": {},
"affiliate": "<your-value>",
"subaffiliate1": "<your-value>",
"subaffiliate2": "<your-value>",
"subaffiliate3": "<your-value>",
"subaffiliate4": "<your-value>",
"subaffiliate5": "<your-value>"
},
"dateCreated": "2026-01-01T00:00:00Z",
"lines": [
{
"product": {
"isPublic": true,
"parent": null,
"slug": "<your-value>",
"description": "<your-value>",
"metaTitle": "<your-value>",
"metaDescription": "<your-value>",
"recommendedProducts": {
"pageInfo": "...",
"edges": "..."
},
"rating": 1,
"dateCreated": "2026-01-01T00:00:00Z",
"dateUpdated": "2026-01-01T00:00:00Z",
"isDiscountable": true,
"title": "<your-value>",
"excerpt": "<your-value>",
"upc": "<your-value>",
"structure": "<your-value>",
"ranking": 1,
"attributes": [
{
"name": "...",
"code": "...",
"pk": "...",
"type": "...",
"values": "..."
}
],
"variantAttributes": [
{
"name": "...",
"code": "...",
"values": "..."
}
],
"images": [
{
"id": "...",
"url": "..."
}
],
"children": [
{
"isPublic": "...",
"parent": "...",
"slug": "...",
"description": "...",
"metaTitle": "...",
"metaDescription": "...",
"recommendedProducts": "...",
"rating": "...",
"dateCreated": "...",
"dateUpdated": "...",
"isDiscountable": "...",
"title": "...",
"excerpt": "...",
"upc": "...",
"structure": "...",
"ranking": "...",
"id": "...",
"pk": "...",
"requiresShipping": "...",
"purchaseInfo": "...",
"images": "...",
"primaryImage": "...",
"subscriptionInfo": "...",
"url": "...",
"metadata": "...",
"variantAttributeValues": "..."
}
],
"id": "<id>",
"pk": 1,
"requiresShipping": true,
"purchaseInfo": {
"availableForSale": "...",
"availability": "...",
"price": "...",
"priceRetail": "...",
"priceSubscription": "...",
"sku": "..."
},
"primaryImage": {
"id": "...",
"url": "..."
},
"subscriptionInfo": {
"interval": "...",
"intervalCount": "..."
},
"url": "<your-value>",
"metadata": {}
},
"quantity": 1,
"priceCurrency": "<your-value>",
"dateCreated": "2026-01-01T00:00:00Z",
"dateUpdated": "2026-01-01T00:00:00Z",
"isUpsell": true,
"interval": "<your-value>",
"intervalCount": 1,
"attributes": [
{
"value": "<your-value>",
"option": "<your-value>"
}
],
"pk": 1,
"unitPriceExclTax": "<your-value>",
"unitPriceInclTax": "<your-value>",
"linePriceExclTax": "<your-value>",
"linePriceInclTax": "<your-value>",
"linePriceExclTaxInclDiscounts": "<your-value>",
"linePriceInclTaxInclDiscounts": "<your-value>",
"discountValue": "<your-value>"
}
],
"id": "<id>",
"pk": 1,
"user": {
"id": "<id>",
"lastLogin": "2026-01-01T00:00:00Z",
"isActive": true,
"email": "<your-value>",
"phoneNumber": "<your-value>",
"firstName": "<your-value>",
"lastName": "<your-value>",
"ip": "<your-value>",
"language": "<your-value>",
"isBlocked": true,
"userType": "LEAD",
"acceptsMarketing": true,
"metadata": {},
"userAgent": "<your-value>",
"firstPurchaseDate": "2026-01-01T00:00:00Z",
"lastPurchaseDate": "2026-01-01T00:00:00Z",
"dateJoined": "2026-01-01T00:00:00Z",
"agentMarketingAttributions": [
{
"id": "<id>",
"utmSource": "<your-value>",
"utmMedium": "<your-value>",
"utmCampaign": "<your-value>",
"utmTerm": "<your-value>",
"utmContent": "<your-value>",
"gclid": "<your-value>",
"campaign": "<your-value>",
"metadata": {},
"affiliate": "<your-value>",
"subaffiliate1": "<your-value>",
"subaffiliate2": "<your-value>",
"subaffiliate3": "<your-value>",
"subaffiliate4": "<your-value>",
"subaffiliate5": "<your-value>"
}
],
"pk": 1
},
"checkoutUrl": "<your-value>",
"currency": "<your-value>",
"totalInclTax": "<your-value>",
"totalExclTax": "<your-value>",
"totalInclTaxExclDiscounts": "<your-value>",
"totalExclTaxExclDiscounts": "<your-value>",
"totalDiscount": "<your-value>",
"numItems": 1,
"numLines": 1,
"offerDiscounts": [
{
"name": "<your-value>",
"description": "<your-value>",
"amount": "<your-value>"
}
],
"voucherDiscounts": [
{
"name": "<your-value>",
"description": "<your-value>",
"amount": "<your-value>",
"voucher": {
"name": "<your-value>",
"code": "<your-value>",
"startDatetime": "2026-01-01T00:00:00Z",
"endDatetime": "2026-01-01T00:00:00Z"
}
}
],
"metadata": {},
"subscriptionPreview": {
"totalGroupsInclTax": "10.00",
"totalGroupsExclTax": "10.00",
"subscriptionRebills": [
{
"currency": "<your-value>",
"displayTaxes": "<your-value>",
"frequency": "<your-value>",
"interval": "<your-value>",
"intervalCount": 1,
"lines": [
{
"product": "...",
"quantity": "...",
"priceCurrency": "...",
"dateCreated": "...",
"dateUpdated": "...",
"isUpsell": "...",
"attributes": "...",
"pk": "...",
"unitPriceExclTax": "...",
"unitPriceInclTax": "...",
"linePriceExclTax": "...",
"linePriceInclTax": "...",
"linePriceExclTaxInclDiscounts": "...",
"linePriceInclTaxInclDiscounts": "...",
"discountValue": "...",
"discountPercentage": "..."
}
],
"totalExclTax": "10.00",
"totalInclTax": "10.00",
"totalTax": "10.00",
"shippingPrice": "10.00"
}
]
}
}
}
}