cart
Get a cart by its ID (Cart.id).
Example:
query GetCart($id: ID!) { cart(id: $id) { id } }query GetCart($id: ID!) { cart(id: $id) { id } }
To create a new cart, use one of the following mutations:
Mutation.addSeatToCartMutation.applyCodeToNewCartMutation.setCartItemQuantityMutation.setCartVolumeQuantities
Resolves to null if no cart with the given ID exists.
If a cart is expired, it is still returned. However, the cart's Cart.expires field will be in the
past.
Arguments
| Argument | Description | Type |
|---|---|---|
| id | ID! |
Type
This field resolves to Cart, which has the following fields:
| Field | Description | Type |
|---|---|---|
appliedCodes | The discount codes that have been applied to the cart. | [ String! ] |
customerData | CustomerData | |
customerDataIsValid | Boolean! | |
events | [ Event! ]! | |
expires | Date! | |
grandTotal | Money! | |
hasDiscounts | Boolean! | |
id | ID! | |
isEmpty | Boolean! | |
itemGroups | The cart items grouped by context, such as the event they belong to. | [ CartItemGroup! ]! |
items | A flat list of all items in the cart. | [ CartItem! ]! |
numberOfEvents | Int! | |
numberOfItems | The number of items the customer has added to their cart. Does *not* include items that were added automatically, like free giveaways or fees. | Int! |
paymentMethods | The payment methods that are available for the cart. | [ PaymentMethod ] |
ticketHolderForms | [ TicketHolderForm! ]! | |
ticketHolders | [ CartTicketHolder! ]! | |
checkoutOptionsFormElements | Get checkout options form elements for cart. | [ FormElement! ]! |
checkoutOptions | Get checkout options data for the cart. | [ KeyValuePair! ]! |