> ## 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 the current store

> Updates the current store configuration.

**Required scope:** `write_settings` (for API-key authentication).



## OpenAPI

````yaml /api-reference/admin.yaml patch /api/v3/admin/store
openapi: 3.0.3
info:
  title: Admin API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: >
    Spree Admin API v3 - Administrative API for managing products, orders, and
    store settings.


    ## Authentication


    The Admin API requires a secret API key passed in the `x-spree-api-key`
    header.

    Secret API keys can be generated in the Spree admin dashboard.


    ## Response Format


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

    Single resource endpoints return a flat JSON object.


    ## Resource IDs


    Every resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,

    `variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,

    request bodies, and Ransack filters all accept them directly.


    ## Error Handling


    Errors return a consistent format:

    ```json

    {
      "error": {
        "code": "validation_error",
        "message": "Validation failed",
        "details": { "name": ["can't be blank"] }
      }
    }

    ```
  version: v3
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Authentication
    description: Admin user login, logout, token refresh, and current user profile
  - name: Allowed Origins
    description: CORS allowlist for storefront and admin client origins
  - name: API Keys
    description: Secret and publishable API keys
  - name: Categories
    description: >-
      Hierarchical product categories — tree management, repositioning, and
      product assignments
  - name: Channels
    description: >-
      Sales channels, product publication across channels, and per-channel order
      routing rules
  - name: Custom Fields
    description: >-
      Custom field definitions for products, variants, customers, and other
      resources
  - name: Customer Groups
    description: >-
      Customer groups for segmenting customers (e.g. wholesale, VIP) used by
      pricing and promotions
  - name: Customers
    description: Customer profiles, addresses, credit cards, and store credits
  - name: Exports
    description: Async CSV exports of admin resources
  - name: Fulfillments
    description: Order fulfillments — shipments, fulfill, cancel, resume, split
  - name: Gift Cards
    description: Gift cards and gift card batches
  - name: Imports
    description: >-
      Async CSV imports of admin resources, with per-row status and failed-row
      retry
  - name: Markets
    description: >-
      Markets — geographic groupings of countries used for pricing, tax, and
      fulfillment rules
  - name: Option Types
    description: >-
      Option types and option values used to build product variants (e.g. Size,
      Color)
  - name: Orders
    description: Orders, order items, applied gift cards, and applied store credits
  - name: Payment Methods
    description: Configured payment providers and their available types
  - name: Payments
    description: Order payments — list, capture, void
  - name: Pricing
    description: >-
      Prices and price lists for currency-, market-, and customer-group-specific
      pricing
  - name: Products
    description: >-
      Products, taxons/categories, product custom field values, and bulk product
      operations
  - name: Promotions
    description: Promotions, promotion rules, promotion actions, and coupon codes
  - name: Refunds
    description: Order refunds
  - name: Settings
    description: Store-level settings — store profile, tags, store credit categories
  - name: Staff
    description: Admin users, roles, and invitations to the store
  - name: Stock Locations
    description: Warehouses and physical fulfillment locations
  - name: Variants
    description: >-
      Product variants — the individual SKUs (size/color combinations) sold
      under a product
  - name: Webhooks
    description: Webhook endpoints and webhook delivery history
paths:
  /api/v3/admin/store:
    patch:
      tags:
        - Settings
      summary: Update the current store
      description: |-
        Updates the current store configuration.

        **Required scope:** `write_settings` (for API-key authentication).
      parameters:
        - name: x-spree-api-key
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          description: Bearer token for admin authentication
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: My Store
                preferred_admin_locale:
                  type: string
                  example: en
                preferred_timezone:
                  type: string
                  example: UTC
                preferred_weight_unit:
                  type: string
                  example: kg
                preferred_unit_system:
                  type: string
                  example: metric
      responses:
        '200':
          description: store updated
          content:
            application/json:
              example:
                id: store_UkLWZg9DAJ
                metadata: {}
                name: Renamed Store
                code: spree_1
                preferred_storefront_url: null
                default_currency: USD
                default_locale: en
                mail_from_address: no-reply@example.com
                customer_support_email: support@example.com
                new_order_notifications_email: store-owner@example.com
                preferred_send_consumer_transactional_emails: true
                preferred_admin_locale: null
                preferred_timezone: UTC
                preferred_weight_unit: lb
                preferred_unit_system: imperial
                preferred_storefront_access: public
                preferred_guest_checkout: true
                preferred_order_routing_strategy: Spree::OrderRouting::Strategy::Rules
                created_at: '2026-07-26T14:24:05.236Z'
                updated_at: '2026-07-26T14:25:53.256Z'
                url: http://www.example.com:3000
                api_url: http://www.example.com:3000
                setup_tasks:
                  - name: setup_payment_method
                    done: false
                  - name: add_products
                    done: false
                  - name: set_customer_support_email
                    done: true
                  - name: setup_taxes_collection
                    done: false
                  - name: setup_storefront
                    done: false
                supported_currencies:
                  - USD
                supported_locales:
                  - en
                available_locales:
                  - aa
                  - ab
                  - ae
                  - af
                  - ak
                  - am
                  - an
                  - ar
                  - as
                  - av
                  - ay
                  - az
                  - ba
                  - be
                  - bg
                  - bh
                  - bi
                  - bm
                  - bn
                  - bo
                  - br
                  - bs
                  - ca
                  - ce
                  - ch
                  - co
                  - cr
                  - cs
                  - cu
                  - cv
                  - cy
                  - da
                  - de
                  - de-AT
                  - de-CH
                  - dv
                  - dz
                  - ee
                  - el
                  - en
                  - en-AU
                  - en-CA
                  - en-GB
                  - en-IN
                  - en-NZ
                  - eo
                  - es
                  - es-419
                  - es-MX
                  - et
                  - eu
                  - fa
                  - ff
                  - fi
                  - fj
                  - fo
                  - fr
                  - fr-CA
                  - fy
                  - ga
                  - gd
                  - gl
                  - gn
                  - gu
                  - gv
                  - ha
                  - he
                  - hi
                  - ho
                  - hr
                  - ht
                  - hu
                  - hy
                  - hz
                  - ia
                  - id
                  - ie
                  - ig
                  - ii
                  - ik
                  - io
                  - is
                  - it
                  - iu
                  - ja
                  - jv
                  - ka
                  - kg
                  - ki
                  - kj
                  - kk
                  - kl
                  - km
                  - kn
                  - ko
                  - kr
                  - ks
                  - ku
                  - kv
                  - kw
                  - ky
                  - la
                  - lb
                  - lg
                  - li
                  - ln
                  - lo
                  - lt
                  - lu
                  - lv
                  - mg
                  - mh
                  - mi
                  - mk
                  - ml
                  - mn
                  - mr
                  - ms
                  - mt
                  - my
                  - na
                  - nb
                  - nd
                  - ne
                  - ng
                  - nl
                  - nn
                  - 'no'
                  - nr
                  - nv
                  - ny
                  - oc
                  - oj
                  - om
                  - or
                  - os
                  - pa
                  - pi
                  - pl
                  - ps
                  - pt
                  - pt-BR
                  - pt-PT
                  - qu
                  - rm
                  - rn
                  - ro
                  - ru
                  - rw
                  - sa
                  - sc
                  - sd
                  - se
                  - sg
                  - si
                  - sk
                  - sl
                  - sm
                  - sn
                  - so
                  - sq
                  - sr
                  - ss
                  - st
                  - su
                  - sv
                  - sw
                  - ta
                  - te
                  - tg
                  - th
                  - ti
                  - tk
                  - tl
                  - tn
                  - to
                  - tr
                  - ts
                  - tt
                  - tw
                  - ty
                  - ug
                  - uk
                  - ur
                  - uz
                  - ve
                  - vi
                  - vo
                  - wa
                  - wo
                  - xh
                  - yi
                  - yo
                  - za
                  - zh-CN
                  - zh-HK
                  - zh-TW
                  - zu
                logo_url: null
                mailer_logo_url: null
              schema:
                $ref: '#/components/schemas/Store'
        '422':
          description: validation error
          content:
            application/json:
              example:
                error:
                  code: validation_error
                  message: Site Name can't be blank
                  details:
                    name:
                      - can't be blank
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api_key: []
          bearer_auth: []
      x-codeSamples:
        - lang: javascript
          label: Spree Admin SDK
          source: |-
            import { createAdminClient } from '@spree/admin-sdk'

            const client = createAdminClient({
              baseUrl: 'https://your-store.com',
              secretKey: 'sk_xxx',
            })

            const store = await client.store.update({
              name: 'My Store'
            })
        - lang: bash
          label: Spree CLI
          source: spree api patch /store -d '{"name":"My Store"}'
components:
  schemas:
    Store:
      type: object
      properties:
        id:
          type: string
        metadata:
          type: object
        name:
          type: string
        code:
          type: string
        preferred_storefront_url:
          type: string
          nullable: true
        default_currency:
          type: string
        default_locale:
          type: string
        mail_from_address:
          type: string
          nullable: true
        customer_support_email:
          type: string
          nullable: true
        new_order_notifications_email:
          type: string
          nullable: true
        preferred_send_consumer_transactional_emails:
          type: boolean
        preferred_admin_locale:
          type: string
          nullable: true
        preferred_timezone:
          type: string
        preferred_weight_unit:
          type: string
        preferred_unit_system:
          type: string
        preferred_storefront_access:
          type: string
        preferred_guest_checkout:
          type: boolean
        preferred_order_routing_strategy:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        url:
          type: string
        api_url:
          type: string
        setup_tasks:
          type: array
          items:
            $ref: '#/components/schemas/SetupTask'
        supported_currencies:
          type: array
          items:
            type: string
        supported_locales:
          type: array
          items:
            type: string
        available_locales:
          type: array
          items:
            type: string
        logo_url:
          type: string
          nullable: true
        mailer_logo_url:
          type: string
          nullable: true
      required:
        - id
        - metadata
        - name
        - code
        - preferred_storefront_url
        - default_currency
        - default_locale
        - mail_from_address
        - customer_support_email
        - new_order_notifications_email
        - preferred_send_consumer_transactional_emails
        - preferred_admin_locale
        - preferred_timezone
        - preferred_weight_unit
        - preferred_unit_system
        - preferred_storefront_access
        - preferred_guest_checkout
        - preferred_order_routing_strategy
        - created_at
        - updated_at
        - url
        - api_url
        - setup_tasks
        - supported_currencies
        - supported_locales
        - available_locales
        - logo_url
        - mailer_logo_url
      x-typelizer: true
    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
    SetupTask:
      type: object
      properties:
        name:
          type: string
        done:
          type: boolean
      required:
        - name
        - done
      x-typelizer: true
  securitySchemes:
    api_key:
      type: apiKey
      name: x-spree-api-key
      in: header
      description: Secret API key for admin access
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for admin user authentication

````