Spree Commerce website screenshot

Spree Commerce

Spree Commerce is an open-source headless eCommerce platform originally released in 2007 and built on Ruby on Rails. The Spree server exposes a modern Store API (v3), an Admin API (v3), a Platform API (v2) used by internal/back-office integrations, and a Storefront API (v2) based on the JSON:API spec - all described with OpenAPI 3 - plus an OAuth 2.0 token endpoint for authentication. Developer surface includes the TypeScript Store and Admin SDKs (@spree/sdk and @spree/admin-sdk), the @spree/cli for managing Spree projects, the create-spree-app scaffolder, the open-source Next.js storefront, the spree-starter application template, the spree_extension generator for building Rails extensions, the deface view-customization plugin, official payments integrations (Stripe, Adyen, PayPal), marketing integrations (Klaviyo, Google Analytics), an Avalara/AvaTax extension, the spree_multi_vendor marketplace extension, and a Webhook event system for reacting to store events.

25 APIs 0 Features
CommerceHeadlesseCommerceOpen SourceRuby on RailsRubyTypeScript

APIs

Spree Store API

Public Spree Store API v3 - the modern customer-facing REST API used by headless storefronts, mobile apps, and integrations. Covers products, variants, collections, taxonomies, ...

Spree Admin API

Spree Admin API v3 - administrative REST API for managing products, orders, customers, payments, shipping, and store configuration. Authenticated via a secret API key passed in ...

Spree Platform API

Spree Platform API v2 - the broad REST API that backs the legacy admin and platform-level integrations. Provides full CRUD coverage of the Spree data model including addresses, ...

Spree Storefront API (JSON:API)

Spree Storefront API v2 - the JSON:API-compliant REST API used by Spree's reference Next.js and Rails storefronts. Includes account, addresses, cart, checkout, products, taxons,...

Spree OAuth API

OAuth 2.0 token endpoint used to create and refresh short-lived bearer tokens for the Spree Storefront, Platform, and Admin APIs. Supports password, client_credentials, and refr...

Spree Webhooks

Outbound webhook event system - the Spree server emits signed JSON payloads for order, product, customer, payment, and shipment lifecycle events. The webhook envelope carries an...

@spree/sdk (TypeScript Store API SDK)

Official TypeScript SDK for the Spree Store API - typed clients, auth helpers, and resource methods. Distributed via npm as @spree/sdk and consumed by the Next.js storefront, cu...

@spree/admin-sdk (TypeScript Admin API SDK)

Official TypeScript SDK for the Spree Admin API. Provides a typed client for managing products, orders, customers, and store configuration from Node.js services and admin tools.

@spree/cli

Command-line tool for managing Spree Commerce projects - scaffolding new apps, running the dev server, managing Docker, and orchestrating common project tasks. Installed via npm...

create-spree-app

One-line project generator for new Spree Commerce installations - mirrors create-next-app and create-medusa-app patterns. Bootstraps a working Rails-based Spree project from the...

Spree Next.js Storefront

Open-source Next.js storefront talking to the Spree Storefront API - cart, checkout, account, multi-region, one-page checkout, and Stripe, Adyen, and PayPal payments. MIT licensed.

Spree Rails Storefront

Spree 5 storefront built with Ruby on Rails and a visual page builder. Reference implementation for teams that want a Rails-monolith storefront on top of Spree rather than a sep...

spree-starter (Application Template)

Reference Spree application template used to bootstrap new Spree installations - includes Docker Compose, the recommended gem set, and a sensible default configuration for self-...

Spree Multi-Vendor Marketplace Extension

Open-source marketplace extension that turns a Spree store into a multi-vendor marketplace - vendor accounts, vendor-specific catalogs, orders, payouts, and admin scoping.

spree-multi-store

Extension for running and administering multiple stores from a single Spree installation - per-store products, taxonomies, domains, and configuration.

Spree Stripe Integration

Official Stripe payments integration for Spree, including support for Stripe Connect. Wires Spree's payment lifecycle to Stripe Payment Intents and Webhooks.

Spree Adyen Integration

Official Adyen payments platform integration for Spree Commerce - payment methods, capture, refund, and webhook handling against the Adyen API.

Spree PayPal Checkout Integration

Official PayPal Checkout integration extension for Spree - PayPal buttons, order flow, capture, and refund.

Spree Avalara AvaTax Integration

Officially certified Avalara AvaTax tax-calculation integration for Spree - real-time tax calculation, address validation, and document filing against AvaTax.

Spree Klaviyo Integration

Official Klaviyo marketing-platform integration for Spree - syncs customers, orders, and product events to Klaviyo for email and SMS lifecycle marketing.

Spree Google Analytics 4 Integration

Official Google Analytics 4 integration for Spree - ecommerce event tracking and measurement on top of the Spree storefronts.

spree_extension (Extension Generator CLI)

CLI tool for generating and managing Spree Commerce extensions - scaffolds the gemspec, engine, migrations, and conventions used by the Spree extension ecosystem.

Spree Dev Tools

Internal developer tooling for working on Spree itself - debuggers, profilers, dummy data generators, and helpers used by Spree's core contributors and extension authors.

deface (Rails View Customization)

Rails plugin maintained under the Spree organization that lets Spree stores customize ERB views without forking the underlying templates. Core extension primitive in the Spree e...

Spree Core Repository (spree/spree)

Monorepo with the Spree Rails engine, Admin, Store/Admin/Platform/ Storefront APIs, OpenAPI specs, TypeScript SDKs, CLI, and Next.js storefront. Released since 2007; latest stab...

Collections

Admin API

OPEN

Store API

OPEN

Pricing Plans

Rate Limits

Spree Commerce Rate Limits

2 limits

RATE LIMITS

FinOps

Resources

🔗
Website
Website
🔗
Documentation
Documentation
🔗
APIReference
APIReference
👥
GitHub
GitHub
💰
Pricing
Pricing
🔗
Demo
Demo
📄
ReleaseNotes
ReleaseNotes
🔗
LinkedIn
LinkedIn

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Storefront API
  version: 2.0.0
items:
- info:
    name: Account
    type: folder
  items:
  - info:
      name: Retrieve an Account
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/account
      params:
      - name: include
        value: default_billing_address,default_shipping_address
        type: query
        description: Pass `default_billing_address` and/or `default_shipping_address` as value to include selected addresses
          information
      - name: fields[user]
        value: email,completed_orders
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Returns the current user details.
  - info:
      name: Create an Account
      type: http
    http:
      method: POST
      url: https://demo.spreecommerce.org/api/v2/storefront/account
      body:
        type: json
        data: '{}'
    docs: Creates a new account
  - info:
      name: Update an Account
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/account
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Updates the users account details
- info:
    name: Account / Address
    type: folder
  items:
  - info:
      name: List all Addresses
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/account/addresses
      params:
      - name: fields[address]
        value: firstname,lastname,country_name
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      - name: filter[exclude_quick_checkout]
        value: 'true'
        type: query
        description: Exclude addresses that were created during quick checkout
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Returns a list of addresses for the current user.
  - info:
      name: Create an Address
      type: http
    http:
      method: POST
      url: https://demo.spreecommerce.org/api/v2/storefront/account/addresses
      params:
      - name: fields[address]
        value: firstname,lastname,country_name
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Creates a new address for the current user.
  - info:
      name: Update an Address
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/account/addresses/:id
      params:
      - name: id
        value: ''
        type: path
        description: The ID of the specified `address`.
      - name: fields[address]
        value: firstname,lastname,country_name
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Updates the specified address for the current user.
  - info:
      name: Remove an Address
      type: http
    http:
      method: DELETE
      url: https://demo.spreecommerce.org/api/v2/storefront/account/addresses/:id
      params:
      - name: id
        value: ''
        type: path
        description: The ID of the specified `address`.
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: This endpoint removes the specified address for the current user. It uses a soft delete to retain address information
      for pre-existing orders.
- info:
    name: Account / Credit Cards
    type: folder
  items:
  - info:
      name: List all Credit Cards
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/account/credit_cards
      params:
      - name: filter[payment_method_id]
        value: '2'
        type: query
        description: Filter based on payment method ID
      - name: include
        value: payment_method
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[credit_card]
        value: cc_type,last_digits,month,year,name,default
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Returns a list of credit cards for the current user.
  - info:
      name: Remove a Credit Card
      type: http
    http:
      method: DELETE
      url: https://demo.spreecommerce.org/api/v2/storefront/account/credit_cards/:id
      params:
      - name: id
        value: ''
        type: path
        description: The ID of the `credit_card` you wish to remove.
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Removes a specified credit card for the current user with a soft delete to retain payment information for any pre-existing
      orders.
  - info:
      name: Retrieve the default Credit Card
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/account/credit_cards/default
      params:
      - name: include
        value: payment_method
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[credit_card]
        value: cc_type,last_digits,month,year,name,default
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Returns the current user's default credit card.
- info:
    name: Account / Orders
    type: folder
  items:
  - info:
      name: List all Orders
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/account/orders
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      - name: page
        value: '1'
        type: query
        description: Number of requested page when paginating collection
      - name: per_page
        value: '25'
        type: query
        description: Number of requested records per page when paginating collection
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Returns all completed orders placed by the current user in the current store.
  - info:
      name: Retrieve an Order
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/account/orders/:order_number
      params:
      - name: order_number
        value: R653163382
        type: path
        description: The required **{order_number}** value can be found in the cart response body, identified as the `number`
          attribute.
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Returns a completed order for the current user within the scope of the current store.
- info:
    name: Order Status
    type: folder
  items:
  - info:
      name: Retrieve an Order Status
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/order_status/:order_number
      params:
      - name: order_number
        value: R653163382
        type: path
        description: The required **{order_number}** value can be found in the cart response body, identified as the `number`
          attribute.
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Returns completed order information.


      This endpoint is useful when fetching orders placed by a guest user, allowing customers without an account to check
      the status of their order: (shipment/payment/processing) etc.


      Pass the cart `token` value as the `X-Spree-Order-Token` for authorization, and the corresponding cart `number` in the
      URI **{order_number}** to successfully retrieve an order.'
- info:
    name: Cart
    type: folder
  items:
  - info:
      name: Retrieve a Cart
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/cart
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      - name: currency
        value: USD
        type: query
        description: Must be specified when is different than current store default currency.
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Returns the cart for the current user.
  - info:
      name: Create a Cart
      type: http
    http:
      method: POST
      url: https://demo.spreecommerce.org/api/v2/storefront/cart
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
    docs: 'Creates a new cart.


      **Please be aware**; The `token` value found in the response body is used to authorize all future operations on this
      cart through the Auth API Key `X-Spree-Order-Token`.'
  - info:
      name: Delete a Cart
      type: http
    http:
      method: DELETE
      url: https://demo.spreecommerce.org/api/v2/storefront/cart
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Deletes a specified cart.


      When this endpoint is successfully executed, all shipments are cancelled, payments are voided, then line items, shipments
      & payments are all deleted.'
- info:
    name: Cart / Line Items
    type: folder
  items:
  - info:
      name: Add an Item to Cart
      type: http
    http:
      method: POST
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/add_item
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Adds a variant to the current cart by creating a line item. Each line item represents a specified variant and the
      desired quantity.
  - info:
      name: Set Line Item Quantity
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/set_quantity
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Sets the quantity of a specified line item.
  - info:
      name: Remove a Line Item
      type: http
    http:
      method: DELETE
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/remove_line_item/:id
      params:
      - name: id
        value: ''
        type: path
        description: The ID of the `line_item` you wish to remove.
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Removes a line item from the cart by deleting the line item.


      After deleting the line item, the system will re-calculate taxes, promotions, shipments etc.'
- info:
    name: Cart / Other
    type: folder
  items:
  - info:
      name: Empty the Cart
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/empty
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: This endpoint removed all line items from the cart. Inventory that was previously taken by this order will be re-stocked.
  - info:
      name: List Estimated Shipping Rates
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/estimate_shipping_rates
      params:
      - name: country_iso
        value: USA
        type: query
        description: Pass country ISO or ISO3 symbol to get estimations for this destination. If no code is passed we'll try
          to use Cart shipping address country or the default Country for the current Store.
      - name: fields[shipping_rate]
        value: name,selected,final_price,display_final_price,cost,display_cost,tax_amount,display_tax_amount,shipping_method_id
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Returns a list of shipping rates for the current cart. The rates given are only estimates and can vary from the
      final shipping rates.
  - info:
      name: Associate a Cart with a User
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/associate
      params:
      - name: guest_order_token
        value: ''
        type: query
        description: Token of the guest cart to be associated with user.
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Associates a guest cart with the currently signed in user.
  - info:
      name: Change Cart Currency
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/change_currency
      params:
      - name: new_currency
        value: ''
        type: query
        description: The currency to change the cart to.
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Changes the cart currency and recalculates the cart values.
- info:
    name: Cart / Coupons
    type: folder
  items:
  - info:
      name: Apply a Coupon Code / Gift Card
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/apply_coupon_code
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Applies a coupon code or gift card code to the current cart.
  - info:
      name: Remove a Coupon / Gift Card
      type: http
    http:
      method: DELETE
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/remove_coupon_code/:coupon_code
      params:
      - name: coupon_code
        value: DISCOUNT10
        type: path
        description: Specify the coupon code or gift card code for removal.
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Removes a specified coupon code or gift card code from the current cart.
  - info:
      name: Remove all Coupons
      type: http
    http:
      method: DELETE
      url: https://demo.spreecommerce.org/api/v2/storefront/cart/remove_coupon_code
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Removes all coupons that have been applied to the current cart.
- info:
    name: Checkout
    type: folder
  items:
  - info:
      name: Update Checkout
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      body:
        type: json
        data: '{}'
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: The Update Checkout endpoint allows you to manage the typical stages of an e-commerce checkout system.
  - info:
      name: Validate order payment
      type: http
    http:
      method: POST
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/validate_order_for_payment
      params:
      - name: skip_state
        value: ''
        type: query
        description: Set to `true` if the check for cart changes should be skipped
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Validate an order before placing it. It will respond with an error when:

      - cart was changed

      - any order item is out of stock

      - any order item is discontinued'
- info:
    name: Checkout / State
    type: folder
  items:
  - info:
      name: Next Checkout Step
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/next
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Goes to the next checkout step.
  - info:
      name: Advance Checkout
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/advance
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: Advances the checkout to the furthest checkout step validation allows, up until the **completed** step.
  - info:
      name: Complete Checkout
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/complete
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Completes the checkout by marking the order as complete.


      **Please be aware**; Once a checkout is marked as `complete` it is considered a completed order, the Cart and Checkout
      endpoints will no longer access a completed order, and a new cart will need to be created.


      If you want to access a completed order you will need to use the **Account / Orders** or **Order Status** endpoints.'
- info:
    name: Checkout / Shipments
    type: folder
  items:
  - info:
      name: Selects shipping method for shipment(s)
      type: http
    http:
      method: PATCH
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/select_shipping_method
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Selects shipping method for Shipment(s).


      To generate shipments you first need to fetch shipping rates via


      [Get Shipping Rates](/api-reference/storefront/checkout-shipments/list-shipping-rates) endpoint'
  - info:
      name: List Shipping Rates
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/shipping_rates
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Returns a list of available shipping rates for the checkout.


      Shipping rates are grouped against shipments. Each checkout can have multiple shipments. Some products are in stock
      and will be shipped immediately, while others might be back-ordered and sent later.'
- info:
    name: Checkout / Payments
    type: folder
  items:
  - info:
      name: Create new Payment
      type: http
    http:
      method: POST
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/create_payment
      params:
      - name: include
        value: line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions,gift_card
        type: query
        description: Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes).
      - name: fields[cart]
        value: token,currency,number
        type: query
        description: Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets).
      body:
        type: json
        data: '{}'
      auth:
        type: apikey
        key: X-Spree-Order-Token
        value: '{{X-Spree-Order-Token}}'
        placement: header
    docs: 'Creates new Payment for the current checkout.


      You can either create new payment source (eg. a Credit Card) or use an existing (for signed in users only).


      Newly created payment source will be associated to the current signed in user.


      System will automatically invalidate previous (non-finalized) payments (excluding store credit / gift card payments).


      [More details on payment system](/developer/core-concepts/payments)'
  - info:
      name: List Payment Methods
      type: http
    http:
      method: GET
      url: https://demo.spreecommerce.org/api/v2/storefront/checkout/payment_methods
      auth:
        type: apikey
        key: X-S

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/spree-commerce/refs/heads/main/apis.yml