> ## 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.

# Update a cart

> Updates cart info (email, addresses, customer note). When addresses change, the order state is reverted to address to ensure shipments are recalculated.



## OpenAPI

````yaml /api-reference/store.yaml patch /api/v3/store/carts/{id}
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: Policies
    description: Store policies (return policy, privacy policy, terms of service)
  - name: Digitals
    description: Digital product downloads
paths:
  /api/v3/store/carts/{id}:
    patch:
      tags:
        - Carts
      summary: Update a cart
      description: >-
        Updates cart info (email, addresses, customer note). When addresses
        change, the order state is reverted to address to ensure shipments are
        recalculated.
      parameters:
        - name: x-spree-api-key
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
        - name: x-spree-token
          in: header
          required: false
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: Cart prefixed ID
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: customer@example.com
                customer_note:
                  type: string
                  example: Leave at door
                metadata:
                  type: object
                  additionalProperties: true
                shipping_address_id:
                  type: string
                  description: Existing address ID to use as shipping address
                  example: addr_abc123
                billing_address_id:
                  type: string
                  description: Existing address ID to use as billing address
                  example: addr_def456
                billing_address:
                  type: object
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    address1:
                      type: string
                    address2:
                      type: string
                    city:
                      type: string
                    postal_code:
                      type: string
                    phone:
                      type: string
                    company:
                      type: string
                    country_iso:
                      type: string
                    state_abbr:
                      type: string
                shipping_address:
                  type: object
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    address1:
                      type: string
                    address2:
                      type: string
                    city:
                      type: string
                    postal_code:
                      type: string
                    phone:
                      type: string
                    company:
                      type: string
                    country_iso:
                      type: string
                    state_abbr:
                      type: string
      responses:
        '200':
          description: cart updated
          content:
            application/json:
              example:
                id: cart_UkLWZg9DAJ
                market_id: null
                number: R906855847
                token: YXZMcqYT6ywxEpj9S5GPjFRnUPpJrqVLaCn
                email: marylee@huelklocko.ca
                customer_note: Leave at door
                currency: USD
                locale: en
                total_quantity: 1
                item_total: '19.99'
                display_item_total: $19.99
                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: '29.99'
                display_total: $29.99
                gift_card_total: '0.0'
                display_gift_card_total: $0.00
                amount_due: '29.99'
                display_amount_due: $29.99
                delivery_total: '10.0'
                display_delivery_total: $10.00
                warnings: []
                store_credit_total: '0.0'
                display_store_credit_total: $0.00
                covered_by_store_credit: false
                current_step: payment
                completed_steps:
                  - address
                  - delivery
                requirements:
                  - step: payment
                    field: payment
                    message: Add a payment method
                shipping_eq_billing_address: false
                discounts: []
                items:
                  - id: li_UkLWZg9DAJ
                    variant_id: variant_UkLWZg9DAJ
                    quantity: 1
                    currency: USD
                    name: Product 613243
                    slug: product-613243
                    options_text: ''
                    price: '19.99'
                    display_price: $19.99
                    total: '19.99'
                    display_total: $19.99
                    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: '19.99'
                    display_pre_tax_amount: $19.99
                    discounted_amount: '19.99'
                    display_discounted_amount: $19.99
                    display_compare_at_amount: $0.00
                    compare_at_amount: null
                    thumbnail_url: null
                    option_values: []
                    digital_links: []
                fulfillments:
                  - id: ful_gbHJdmfrXB
                    number: H78556410272
                    tracking: null
                    tracking_url: null
                    cost: '10.0'
                    display_cost: $10.00
                    total: '10.0'
                    display_total: $10.00
                    discount_total: '0.0'
                    display_discount_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
                    tax_total: '0.0'
                    display_tax_total: $0.00
                    status: pending
                    fulfillment_type: shipping
                    fulfilled_at: null
                    items:
                      - item_id: li_UkLWZg9DAJ
                        variant_id: variant_UkLWZg9DAJ
                        quantity: 1
                    delivery_method:
                      id: dm_UkLWZg9DAJ
                      name: UPS Ground
                      code: UPS_GROUND
                    stock_location:
                      id: sloc_UkLWZg9DAJ
                      state_abbr: NY
                      name: Angla Cassin
                      address1: 1600 Pennsylvania Ave NW
                      city: Washington
                      zipcode: '20500'
                      country_iso: US
                      country_name: United States of America
                      state_text: NY
                    delivery_rates:
                      - id: dr_gbHJdmfrXB
                        delivery_method_id: dm_UkLWZg9DAJ
                        name: UPS Ground
                        selected: true
                        cost: '10.0'
                        total: '10.0'
                        additional_tax_total: '0.0'
                        included_tax_total: '0.0'
                        tax_total: '0.0'
                        display_cost: $10.00
                        display_total: $10.00
                        display_additional_tax_total: $0.00
                        display_included_tax_total: $0.00
                        display_tax_total: $0.00
                        delivery_method:
                          id: dm_UkLWZg9DAJ
                          name: UPS Ground
                          code: UPS_GROUND
                payments: []
                billing_address:
                  id: addr_EfhxLZ9ck8
                  first_name: John
                  last_name: Doe
                  full_name: John Doe
                  address1: 116 Lovely Street
                  address2: Northwest
                  postal_code: '10118'
                  city: New York
                  phone: 555-555-0199
                  company: Company
                  country_name: United States of America
                  country_iso: US
                  state_text: NY
                  state_abbr: NY
                  quick_checkout: false
                  is_default_billing: false
                  is_default_shipping: false
                  state_name: New York
                shipping_address:
                  id: addr_VqXmZF31wY
                  first_name: John
                  last_name: Doe
                  full_name: John Doe
                  address1: 117 Lovely Street
                  address2: Northwest
                  postal_code: '10118'
                  city: New York
                  phone: 555-555-0199
                  company: Company
                  country_name: United States of America
                  country_iso: US
                  state_text: NY
                  state_abbr: NY
                  quick_checkout: false
                  is_default_billing: false
                  is_default_shipping: false
                  state_name: New York
                payment_methods: []
                gift_card: null
                market: null
              schema:
                $ref: '#/components/schemas/Cart'
      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 cart = await client.carts.update('cart_abc123', {
              email: 'customer@example.com',
              shipping_address: {
                first_name: 'John',
                last_name: 'Doe',
                address1: '123 Main St',
                city: 'New York',
                postal_code: '10001',
                country_iso: 'US',
                state_abbr: 'NY',
              },
            }, {
              bearerToken: '<token>',
            })
components:
  schemas:
    Cart:
      type: object
      properties:
        id:
          type: string
        market_id:
          type: string
          nullable: true
        number:
          type: string
        token:
          type: string
        email:
          type: string
          nullable: true
        customer_note:
          type: string
          nullable: true
        currency:
          type: string
        locale:
          type: string
          nullable: true
        total_quantity:
          type: number
        item_total:
          type: string
        display_item_total:
          type: string
        adjustment_total:
          type: string
        display_adjustment_total:
          type: string
        discount_total:
          type: string
        display_discount_total:
          type: string
        tax_total:
          type: string
        display_tax_total:
          type: string
        included_tax_total:
          type: string
        display_included_tax_total:
          type: string
        additional_tax_total:
          type: string
        display_additional_tax_total:
          type: string
        total:
          type: string
        display_total:
          type: string
        gift_card_total:
          type: string
        display_gift_card_total:
          type: string
        amount_due:
          type: string
        display_amount_due:
          type: string
        delivery_total:
          type: string
        display_delivery_total:
          type: string
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/CartWarning'
        store_credit_total:
          type: string
        display_store_credit_total:
          type: string
        covered_by_store_credit:
          type: boolean
        current_step:
          type: string
        completed_steps:
          type: array
          items:
            type: string
        requirements:
          type: array
          items:
            $ref: '#/components/schemas/CheckoutRequirement'
        shipping_eq_billing_address:
          type: boolean
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/Discount'
        items:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        fulfillments:
          type: array
          items:
            $ref: '#/components/schemas/Fulfillment'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        billing_address:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
        shipping_address:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
        payment_methods:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMethod'
        gift_card:
          allOf:
            - $ref: '#/components/schemas/GiftCard'
          nullable: true
        market:
          allOf:
            - $ref: '#/components/schemas/Market'
          nullable: true
      required:
        - id
        - market_id
        - number
        - token
        - email
        - customer_note
        - currency
        - locale
        - total_quantity
        - item_total
        - display_item_total
        - adjustment_total
        - display_adjustment_total
        - discount_total
        - display_discount_total
        - tax_total
        - display_tax_total
        - included_tax_total
        - display_included_tax_total
        - additional_tax_total
        - display_additional_tax_total
        - total
        - display_total
        - gift_card_total
        - display_gift_card_total
        - amount_due
        - display_amount_due
        - delivery_total
        - display_delivery_total
        - warnings
        - store_credit_total
        - display_store_credit_total
        - covered_by_store_credit
        - current_step
        - completed_steps
        - requirements
        - shipping_eq_billing_address
        - discounts
        - items
        - fulfillments
        - payments
        - billing_address
        - shipping_address
        - payment_methods
        - gift_card
        - market
      x-typelizer: true
    CartWarning:
      type: object
      description: A warning about a cart issue (e.g., item removed due to stock change)
      properties:
        code:
          type: string
          description: Machine-readable warning code
          example: line_item_removed
        message:
          type: string
          description: Human-readable warning message
          example: Blue T-Shirt was removed because it was sold out
        line_item_id:
          type: string
          nullable: true
          description: Prefixed line item ID (when applicable)
          example: li_abc123
        variant_id:
          type: string
          nullable: true
          description: Prefixed variant ID (when applicable)
          example: variant_abc123
      required:
        - code
        - message
    CheckoutRequirement:
      type: object
      properties:
        step:
          type: string
          description: Checkout step this requirement belongs to
          example: payment
        field:
          type: string
          description: Field that needs to be satisfied
          example: payment
        message:
          type: string
          description: Human-readable requirement message
          example: Add a payment method
      required:
        - step
        - field
        - message
    Discount:
      type: object
      properties:
        id:
          type: string
        promotion_id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        code:
          type: string
          nullable: true
        amount:
          type: string
        display_amount:
          type: string
      required:
        - id
        - promotion_id
        - name
        - description
        - code
        - amount
        - display_amount
      x-typelizer: true
    LineItem:
      type: object
      properties:
        id:
          type: string
        variant_id:
          type: string
        quantity:
          type: number
        currency:
          type: string
        name:
          type: string
        slug:
          type: string
        options_text:
          type: string
        price:
          type: string
        display_price:
          type: string
        total:
          type: string
        display_total:
          type: string
        adjustment_total:
          type: string
        display_adjustment_total:
          type: string
        additional_tax_total:
          type: string
        display_additional_tax_total:
          type: string
        included_tax_total:
          type: string
        display_included_tax_total:
          type: string
        discount_total:
          type: string
        display_discount_total:
          type: string
        pre_tax_amount:
          type: string
        display_pre_tax_amount:
          type: string
        discounted_amount:
          type: string
        display_discounted_amount:
          type: string
        display_compare_at_amount:
          type: string
          nullable: true
        compare_at_amount:
          type: string
          nullable: true
        thumbnail_url:
          type: string
          nullable: true
        option_values:
          type: array
          items:
            $ref: '#/components/schemas/OptionValue'
        digital_links:
          type: array
          items:
            $ref: '#/components/schemas/DigitalLink'
      required:
        - id
        - variant_id
        - quantity
        - currency
        - name
        - slug
        - options_text
        - price
        - display_price
        - total
        - display_total
        - adjustment_total
        - display_adjustment_total
        - additional_tax_total
        - display_additional_tax_total
        - included_tax_total
        - display_included_tax_total
        - discount_total
        - display_discount_total
        - pre_tax_amount
        - display_pre_tax_amount
        - discounted_amount
        - display_discounted_amount
        - display_compare_at_amount
        - compare_at_amount
        - thumbnail_url
        - option_values
        - digital_links
      x-typelizer: true
    Fulfillment:
      type: object
      properties:
        id:
          type: string
        number:
          type: string
        tracking:
          type: string
          nullable: true
        tracking_url:
          type: string
          nullable: true
        cost:
          type: string
        display_cost:
          type: string
        total:
          type: string
        display_total:
          type: string
        discount_total:
          type: string
        display_discount_total:
          type: string
        additional_tax_total:
          type: string
        display_additional_tax_total:
          type: string
        included_tax_total:
          type: string
        display_included_tax_total:
          type: string
        tax_total:
          type: string
        display_tax_total:
          type: string
        status:
          type: string
        fulfillment_type:
          type: string
        fulfilled_at:
          type: string
          nullable: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/FulfillmentManifestItem'
        delivery_method:
          $ref: '#/components/schemas/DeliveryMethod'
        stock_location:
          $ref: '#/components/schemas/StockLocation'
        delivery_rates:
          type: array
          items:
            $ref: '#/components/schemas/DeliveryRate'
      required:
        - id
        - number
        - tracking
        - tracking_url
        - cost
        - display_cost
        - total
        - display_total
        - discount_total
        - display_discount_total
        - additional_tax_total
        - display_additional_tax_total
        - included_tax_total
        - display_included_tax_total
        - tax_total
        - display_tax_total
        - status
        - fulfillment_type
        - fulfilled_at
        - items
        - delivery_method
        - stock_location
        - delivery_rates
      x-typelizer: true
    Payment:
      type: object
      properties:
        id:
          type: string
        payment_method_id:
          type: string
        response_code:
          type: string
          nullable: true
        number:
          type: string
        amount:
          type: string
        display_amount:
          type: string
        status:
          type: string
        source_type:
          type: string
          nullable: true
          enum:
            - credit_card
            - store_credit
            - payment_source
        source_id:
          type: string
          nullable: true
        source:
          anyOf:
            - $ref: '#/components/schemas/CreditCard'
            - $ref: '#/components/schemas/StoreCredit'
            - $ref: '#/components/schemas/PaymentSource'
          nullable: true
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
      required:
        - id
        - payment_method_id
        - response_code
        - number
        - amount
        - display_amount
        - status
        - source_type
        - source_id
        - source
        - payment_method
      x-typelizer: true
    Address:
      type: object
      properties:
        id:
          type: string
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        full_name:
          type: string
        address1:
          type: string
          nullable: true
        address2:
          type: string
          nullable: true
        postal_code:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        country_name:
          type: string
        country_iso:
          type: string
        state_text:
          type: string
          nullable: true
        state_abbr:
          type: string
          nullable: true
        quick_checkout:
          type: boolean
        is_default_billing:
          type: boolean
        is_default_shipping:
          type: boolean
        state_name:
          type: string
          nullable: true
      required:
        - id
        - first_name
        - last_name
        - full_name
        - address1
        - address2
        - postal_code
        - city
        - phone
        - company
        - country_name
        - country_iso
        - state_text
        - state_abbr
        - quick_checkout
        - is_default_billing
        - is_default_shipping
        - state_name
      x-typelizer: true
    PaymentMethod:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        type:
          type: string
        session_required:
          type: boolean
        source_required:
          type: boolean
      required:
        - id
        - name
        - description
        - type
        - session_required
        - source_required
      x-typelizer: true
    GiftCard:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        status:
          type: string
        currency:
          type: string
        amount:
          type: string
        amount_used:
          type: string
        amount_authorized:
          type: string
        amount_remaining:
          type: string
        display_amount:
          type: string
        display_amount_used:
          type: string
        display_amount_remaining:
          type: string
        expires_at:
          type: string
          nullable: true
        redeemed_at:
          type: string
          nullable: true
        expired:
          type: boolean
        active:
          type: boolean
      required:
        - id
        - code
        - status
        - currency
        - amount
        - amount_used
        - amount_authorized
        - amount_remaining
        - display_amount
        - display_amount_used
        - display_amount_remaining
        - expires_at
        - redeemed_at
        - expired
        - active
      x-typelizer: true
    Market:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        currency:
          type: string
        default_locale:
          type: string
        tax_inclusive:
          type: boolean
        default:
          type: boolean
        supported_locales:
          type: array
          items:
            type: string
        countries:
          type: array
          items:
            $ref: '#/components/schemas/Country'
      required:
        - id
        - name
        - currency
        - default_locale
        - tax_inclusive
        - default
        - supported_locales
      x-typelizer: true
    OptionValue:
      type: object
      properties:
        id:
          type: string
        option_type_id:
          type: string
        name:
          type: string
        label:
          type: string
        position:
          type: number
        color_code:
          type: string
          nullable: true
        option_type_name:
          type: string
        option_type_label:
          type: string
        image_url:
          type: string
          nullable: true
      required:
        - id
        - option_type_id
        - name
        - label
        - position
        - color_code
        - option_type_name
        - option_type_label
        - image_url
      x-typelizer: true
    DigitalLink:
      type: object
      properties:
        id:
          type: string
        access_counter:
          type: number
        filename:
          type: string
        content_type:
          type: string
        download_url:
          type: string
        authorizable:
          type: boolean
        expired:
          type: boolean
        access_limit_exceeded:
          type: boolean
      required:
        - id
        - access_counter
        - filename
        - content_type
        - download_url
        - authorizable
        - expired
        - access_limit_exceeded
      x-typelizer: true
    FulfillmentManifestItem:
      type: object
      description: >-
        An item within a fulfillment — which line item and how many units are in
        this fulfillment
      properties:
        item_id:
          type: string
          description: Line item ID
          example: li_abc123
        variant_id:
          type: string
          description: Variant ID
          example: variant_abc123
        quantity:
          type: integer
          description: Quantity in this fulfillment
          example: 2
      required:
        - item_id
        - variant_id
        - quantity
    DeliveryMethod:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        code:
          type: string
          nullable: true
      required:
        - id
        - name
        - code
      x-typelizer: true
    StockLocation:
      type: object
      properties:
        id:
          type: string
        state_abbr:
          type: string
          nullable: true
        name:
          type: string
        address1:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        zipcode:
          type: string
          nullable: true
        country_iso:
          type: string
          nullable: true
        country_name:
          type: string
          nullable: true
        state_text:
          type: string
          nullable: true
      required:
        - id
        - state_abbr
        - name
        - address1
        - city
        - zipcode
        - country_iso
        - country_name
        - state_text
      x-typelizer: true
    DeliveryRate:
      type: object
      properties:
        id:
          type: string
        delivery_method_id:
          type: string
        name:
          type: string
        selected:
          type: boolean
        cost:
          type: string
        total:
          type: string
        additional_tax_total:
          type: string
        included_tax_total:
          type: string
        tax_total:
          type: string
        display_cost:
          type: string
        display_total:
          type: string
        display_additional_tax_total:
          type: string
        display_included_tax_total:
          type: string
        display_tax_total:
          type: string
        delivery_method:
          $ref: '#/components/schemas/DeliveryMethod'
      required:
        - id
        - delivery_method_id
        - name
        - selected
        - cost
        - total
        - additional_tax_total
        - included_tax_total
        - tax_total
        - display_cost
        - display_total
        - display_additional_tax_total
        - display_included_tax_total
        - display_tax_total
        - delivery_method
      x-typelizer: true
    CreditCard:
      type: object
      properties:
        id:
          type: string
        brand:
          type: string
        last4:
          type: string
        month:
          type: number
        year:
          type: number
        name:
          type: string
          nullable: true
        default:
          type: boolean
        gateway_payment_profile_id:
          type: string
          nullable: true
      required:
        - id
        - brand
        - last4
        - month
        - year
        - name
        - default
        - gateway_payment_profile_id
      x-typelizer: true
    StoreCredit:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        amount_used:
          type: string
        amount_remaining:
          type: string
        display_amount:
          type: string
        display_amount_used:
          type: string
        display_amount_remaining:
          type: string
        currency:
          type: string
      required:
        - id
        - amount
        - amount_used
        - amount_remaining
        - display_amount
        - display_amount_used
        - display_amount_remaining
        - currency
      x-typelizer: true
    PaymentSource:
      type: object
      properties:
        id:
          type: string
        gateway_payment_profile_id:
          type: string
          nullable: true
      required:
        - id
        - gateway_payment_profile_id
      x-typelizer: true
    Country:
      type: object
      properties:
        iso:
          type: string
        iso3:
          type: string
        name:
          type: string
        states_required:
          type: boolean
        zipcode_required:
          type: boolean
        states:
          type: array
          items:
            $ref: '#/components/schemas/State'
        market:
          allOf:
            - $ref: '#/components/schemas/Market'
          nullable: true
      required:
        - iso
        - iso3
        - name
        - states_required
        - zipcode_required
      x-typelizer: true
    State:
      type: object
      properties:
        abbr:
          type: string
        name:
          type: string
      required:
        - abbr
        - name
      x-typelizer: true
  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

````