# cart - storefront - QUERY Version: 2024-10 ## Description Retrieve a cart by its ID. For more information, refer to [Manage a cart with the Storefront API](https://shopify.dev/custom-storefronts/cart/manage). ### Access Scopes ## Arguments * [id](/docs/api/storefront/2024-10/scalars/ID): ID! - The ID of the cart. ## Returns * [appliedGiftCards](/docs/api/storefront/2024-10/objects/AppliedGiftCard): AppliedGiftCard! The gift cards that have been applied to the cart. * [attribute](/docs/api/storefront/2024-10/objects/Attribute): Attribute An attribute associated with the cart. * [attributes](/docs/api/storefront/2024-10/objects/Attribute): Attribute! The attributes associated with the cart. Attributes are represented as key-value pairs. * [buyerIdentity](/docs/api/storefront/2024-10/objects/CartBuyerIdentity): CartBuyerIdentity! Information about the buyer that's interacting with the cart. * [checkoutUrl](/docs/api/storefront/2024-10/scalars/URL): URL! The URL of the checkout for the cart. * [cost](/docs/api/storefront/2024-10/objects/CartCost): CartCost! The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). * [createdAt](/docs/api/storefront/2024-10/scalars/DateTime): DateTime! The date and time when the cart was created. * [discountAllocations](/docs/api/storefront/2024-10/interfaces/CartDiscountAllocation): CartDiscountAllocation! The discounts that have been applied to the entire cart. * [discountCodes](/docs/api/storefront/2024-10/objects/CartDiscountCode): CartDiscountCode! The case-insensitive discount codes that the customer added at checkout. * [estimatedCost](/docs/api/storefront/2024-10/objects/CartEstimatedCost): CartEstimatedCost! The estimated costs that the buyer will pay at checkout. The estimated costs are subject to change and changes will be reflected at checkout. The `estimatedCost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). * [id](/docs/api/storefront/2024-10/scalars/ID): ID! A globally-unique ID. * [metafield](/docs/api/storefront/2024-10/objects/Metafield): Metafield A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. * [metafields](/docs/api/storefront/2024-10/objects/Metafield): Metafield! A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. * [note](/docs/api/storefront/2024-10/scalars/String): String A note that's associated with the cart. For example, the note can be a personalized message to the buyer. * [totalQuantity](/docs/api/storefront/2024-10/scalars/Int): Int! The total number of items in the cart. * [updatedAt](/docs/api/storefront/2024-10/scalars/DateTime): DateTime! The date and time when the cart was updated. ## Examples