> ## Documentation Index
> Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List active carts

> Returns all active (incomplete) carts for the authenticated user.



## OpenAPI

````yaml /api-reference/store.yaml get /api/v3/store/carts
openapi: 3.0.3
info:
  title: Store API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: >
    Spree Store API v3 - Customer-facing storefront API for building headless
    commerce experiences.


    ## Authentication


    The Store API uses two authentication methods:


    ### API Key (Required)

    All requests must include a publishable API key in the `x-spree-api-key`
    header.


    ### JWT Bearer Token (For authenticated customers)

    After login, include the JWT token in the `Authorization: Bearer <token>`
    header.


    ### Order Token (For guest checkout)

    When creating an order, a `token` is returned. Include this in the
    `x-spree-token` header

    for guest access to that specific order.


    ## Response Format


    All responses are JSON. List endpoints return paginated responses with
    `data` and `meta` keys.


    ## Error Handling


    Errors return a consistent format:

    ```json

    {
      "error": {
        "code": "record_not_found",
        "message": "Product not found"
      }
    }

    ```
  version: v3
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Authentication
    description: Customer authentication (login, logout, token refresh)
  - name: Product Catalog
    description: Products and categories
  - name: Carts
    description: Shopping cart management
  - name: Orders
    description: Order lookup
  - name: Customers
    description: Customer account, addresses, saved payment methods, and order history
  - name: Markets
    description: Markets, countries, currencies, and locales
  - name: Wishlists
    description: Customer wishlists
  - name: Newsletter Subscribers
    description: Guest and customer newsletter subscriptions (double opt-in)
  - name: Policies
    description: Store policies (return policy, privacy policy, terms of service)
  - name: Digitals
    description: Digital product downloads
paths:
  /api/v3/store/carts:
    get:
      tags:
        - Carts
      summary: List active carts
      description: Returns all active (incomplete) carts for the authenticated user.
      parameters:
        - name: x-spree-api-key
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: 'Page number (default: 1)'
          schema:
            type: integer
        - name: limit
          in: query
          required: false
          description: 'Number of results per page (default: 25, max: 100)'
          schema:
            type: integer
        - name: sort
          in: query
          required: false
          description: >-
            Sort order. Prefix with - for descending. Values: created_at,
            -created_at, updated_at, -updated_at
          schema:
            type: string
        - name: q[created_at_gt]
          in: query
          required: false
          description: Filter by created after date (ISO 8601)
          schema:
            type: string
        - name: q[updated_at_gt]
          in: query
          required: false
          description: Filter by updated after date (ISO 8601)
          schema:
            type: string
        - name: expand
          in: query
          required: false
          description: >-
            Comma-separated associations to expand (items, fulfillments,
            payments, discounts, billing_address, shipping_address, gift_card,
            payment_methods). Use "none" to skip associations.
          schema:
            type: string
        - name: fields
          in: query
          required: false
          description: >-
            Comma-separated list of fields to include (e.g.,
            total,amount_due,item_count). id is always included.
          schema:
            type: string
      responses:
        '200':
          description: carts listed
          content:
            application/json:
              example:
                data:
                  - id: cart_gbHJdmfrXB
                    market_id: mkt_UkLWZg9DAJ
                    channel_id: ch_UkLWZg9DAJ
                    preferred_stock_location_id: null
                    number: cart_gbHJdmfrXB
                    token: ZGwRfzzwTM1QZDmG1fCs2aJ5
                    email: null
                    customer_note: null
                    currency: USD
                    locale: en
                    total_quantity: 1
                    warnings: []
                    coupon_code: null
                    item_total: '10.0'
                    display_item_total: $10.00
                    adjustment_total: '0.0'
                    display_adjustment_total: $0.00
                    discount_total: '0.0'
                    display_discount_total: $0.00
                    tax_total: '0.0'
                    display_tax_total: $0.00
                    included_tax_total: '0.0'
                    display_included_tax_total: $0.00
                    additional_tax_total: '0.0'
                    display_additional_tax_total: $0.00
                    total: '10.0'
                    display_total: $10.00
                    gift_card_total: '0.0'
                    display_gift_card_total: $0.00
                    amount_due: '10.0'
                    display_amount_due: $10.00
                    delivery_total: '0.0'
                    display_delivery_total: $0.00
                    store_credit_total: '0.0'
                    display_store_credit_total: $0.00
                    covered_by_store_credit: false
                    current_step: address
                    completed_steps: []
                    requirements:
                      - code: email_required
                        step: address
                        field: email
                        message: Email address is required
                      - code: ship_address_required
                        step: address
                        field: ship_address
                        message: Shipping address is required
                      - code: delivery_method_required
                        step: delivery
                        field: delivery_method
                        message: Select a delivery method for all fulfillments
                      - code: payment_required
                        step: payment
                        field: payment
                        message: Add a payment method
                    shipping_eq_billing_address: true
                    discounts: []
                    items:
                      - id: li_gbHJdmfrXB
                        variant_id: variant_gbHJdmfrXB
                        preorder: false
                        preorder_ships_at: null
                        quantity: 1
                        currency: USD
                        name: Product 1048908
                        slug: product-1048908
                        options_text: ''
                        price: '10.0'
                        display_price: $10.00
                        total: '10.0'
                        display_total: $10.00
                        adjustment_total: '0.0'
                        display_adjustment_total: $0.00
                        additional_tax_total: '0.0'
                        display_additional_tax_total: $0.00
                        included_tax_total: '0.0'
                        display_included_tax_total: $0.00
                        discount_total: '0.0'
                        display_discount_total: $0.00
                        pre_tax_amount: '10.0'
                        display_pre_tax_amount: $10.00
                        discounted_amount: '10.0'
                        display_discounted_amount: $10.00
                        display_compare_at_amount: $0.00
                        compare_at_amount: null
                        thumbnail_url: null
                        option_values: []
                        digital_links: []
                    fulfillments: []
                    payments: []
                    billing_address: null
                    shipping_address: null
                    payment_methods: []
                    gift_card: null
                    market:
                      id: mkt_UkLWZg9DAJ
                      name: United States of America
                      currency: USD
                      default_locale: en
                      tax_inclusive: false
                      default: true
                      country_isos:
                        - US
                      supported_locales:
                        - en
                  - id: cart_UkLWZg9DAJ
                    market_id: mkt_UkLWZg9DAJ
                    channel_id: ch_UkLWZg9DAJ
                    preferred_stock_location_id: null
                    number: cart_UkLWZg9DAJ
                    token: rDJKdfw23YF2LXwEZjM8f7wJ
                    email: null
                    customer_note: null
                    currency: USD
                    locale: en
                    total_quantity: 1
                    warnings: []
                    coupon_code: null
                    item_total: '10.0'
                    display_item_total: $10.00
                    adjustment_total: '0.0'
                    display_adjustment_total: $0.00
                    discount_total: '0.0'
                    display_discount_total: $0.00
                    tax_total: '0.0'
                    display_tax_total: $0.00
                    included_tax_total: '0.0'
                    display_included_tax_total: $0.00
                    additional_tax_total: '0.0'
                    display_additional_tax_total: $0.00
                    total: '10.0'
                    display_total: $10.00
                    gift_card_total: '0.0'
                    display_gift_card_total: $0.00
                    amount_due: '10.0'
                    display_amount_due: $10.00
                    delivery_total: '0.0'
                    display_delivery_total: $0.00
                    store_credit_total: '0'
                    display_store_credit_total: $0.00
                    covered_by_store_credit: false
                    current_step: address
                    completed_steps: []
                    requirements:
                      - code: email_required
                        step: address
                        field: email
                        message: Email address is required
                      - code: ship_address_required
                        step: address
                        field: ship_address
                        message: Shipping address is required
                      - code: delivery_method_required
                        step: delivery
                        field: delivery_method
                        message: Select a delivery method for all fulfillments
                      - code: payment_required
                        step: payment
                        field: payment
                        message: Add a payment method
                    shipping_eq_billing_address: true
                    discounts: []
                    items:
                      - id: li_UkLWZg9DAJ
                        variant_id: variant_UkLWZg9DAJ
                        preorder: false
                        preorder_ships_at: null
                        quantity: 1
                        currency: USD
                        name: Product 1034202
                        slug: product-1034202
                        options_text: ''
                        price: '10.0'
                        display_price: $10.00
                        total: '10.0'
                        display_total: $10.00
                        adjustment_total: '0.0'
                        display_adjustment_total: $0.00
                        additional_tax_total: '0.0'
                        display_additional_tax_total: $0.00
                        included_tax_total: '0.0'
                        display_included_tax_total: $0.00
                        discount_total: '0.0'
                        display_discount_total: $0.00
                        pre_tax_amount: '10.0'
                        display_pre_tax_amount: $10.00
                        discounted_amount: '10.0'
                        display_discounted_amount: $10.00
                        display_compare_at_amount: $0.00
                        compare_at_amount: null
                        thumbnail_url: null
                        option_values: []
                        digital_links: []
                    fulfillments: []
                    payments: []
                    billing_address: null
                    shipping_address: null
                    payment_methods: []
                    gift_card: null
                    market:
                      id: mkt_UkLWZg9DAJ
                      name: United States of America
                      currency: USD
                      default_locale: en
                      tax_inclusive: false
                      default: true
                      country_isos:
                        - US
                      supported_locales:
                        - en
                meta:
                  page: 1
                  limit: 25
                  count: 2
                  pages: 1
                  from: 1
                  to: 2
                  in: 2
                  previous: null
                  next: null
        '401':
          description: unauthorized
          content:
            application/json:
              example:
                error:
                  code: authentication_required
                  message: Authentication required
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api_key: []
          bearer_auth: []
      x-codeSamples:
        - lang: javascript
          label: Spree SDK
          source: |-
            import { createClient } from '@spree/sdk'

            const client = createClient({
              baseUrl: 'https://your-store.com',
              publishableKey: '<api-key>',
            })

            const carts = await client.carts.list({
              token: '<token>',
            })
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: record_not_found
            message:
              type: string
              example: Record not found
            details:
              type: object
              description: Field-specific validation errors
              nullable: true
              example:
                name:
                  - is too short
                  - is required
                email:
                  - is invalid
          required:
            - code
            - message
      required:
        - error
      example:
        error:
          code: validation_error
          message: Validation failed
          details:
            name:
              - is too short
            email:
              - is invalid
  securitySchemes:
    api_key:
      type: apiKey
      name: x-spree-api-key
      in: header
      description: Publishable API key for store access
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for authenticated customers

````