Get Cart
Cart
Get Cart
Retrieve the current cart
GET
Get Cart
Get Cart
Returns the current cart for the visitor.The cart is a storefront surface, not part of the OAuth
/api/v1 app
API. It follows the Shopify-AJAX cart contract: requests are made against the
storefront origin (your store domain), identity is the cart cookie token
(not a Bearer access token), and the response is the flat Shopify cart
object — not wrapped in a { status, type, data } envelope.Request
GET /cart.js returns the current cart as JSON. The cart is identified by
the cart cookie that the storefront sets on the first write action; send it
with the request (browsers do this automatically).
Response
The response is the flat Shopify cart object. Money fields are integers in the store’s currency subunit (e.g. cents).Unique cart token (matches the
cart cookie)Array of line items
Total number of items
Cart total in the currency subunit
Currency code
Whether any items require shipping
Cart note
Cart attributes (key-value pairs)
Example Response
item_count: 0 with an empty items array.