Spree Commerce Policies API

Store policies (return policy, privacy policy, terms of service)

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /api/v3/store/policies List store policies #
GET /api/v3/store/policies/{id} Get a policy #
GET /api/v2/storefront/policies List all Store Policies #
GET /api/v2/storefront/policies/{policy_slug} Retrieve a Policy #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/spree-commerce:spree-commerce-policies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

spree-commerce-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Spree Commerce Policies API
  version: '1.0'
  description: 'Operations tagged Policies across 2 of this provider''s published API definitions: spree-commerce-store-api-openapi.yml, spree-commerce-storefront-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://{defaultHost}
  variables:
    defaultHost:
      default: localhost:3000
- url: https://demo.spreecommerce.org
  description: demo
- url: http://localhost:3000
  description: localhost
tags:
- name: Policies
  description: Store policies (return policy, privacy policy, terms of service)
paths:
  /api/v3/store/policies:
    get:
      summary: List store policies
      tags:
      - Policies
      security:
      - api_key: []
      description: 'Returns all policies for the current store (e.g., return policy, privacy policy, terms of service).

        Policies are managed in Spree Admin and contain rich text content.'
      x-codeSamples:
      - lang: javascript
        label: Spree SDK
        source: "import { createClient } from '@spree/sdk'\n\nconst client = createClient({\n  baseUrl: 'https://your-store.com',\n  publishableKey: '<api-key>',\n})\n\nconst policies = await client.policies.list()"
      parameters:
      - name: x-spree-api-key
        in: header
        required: true
        schema:
          type: string
      - name: fields
        in: query
        required: false
        description: Comma-separated list of fields to include (e.g., name,slug). id is always included.
        schema:
          type: string
      responses:
        '200':
          description: policies listed
          content:
            application/json:
              example:
                data:
                - id: pol_gbHJdmfrXB
                  name: Privacy Policy
                  slug: privacy-policy
                  body: ''
                  body_html: ''
                - id: pol_OIJLhNcSbf
                  name: Privacy Policy
                  slug: privacy-policy-64c6fe11-a85d-4ac3-bcf3-2d7e2f51e471
                  body: We respect your privacy.
                  body_html: "<div class=\"trix-content\">\n  We respect your privacy.\n</div>\n"
                - id: pol_uw2YK1rnl0
                  name: Return Policy
                  slug: return-policy
                  body: You can return items within 30 days.
                  body_html: "<div class=\"trix-content\">\n  You can return items within 30 days.\n</div>\n"
                - id: pol_EfhxLZ9ck8
                  name: Returns Policy
                  slug: returns-policy
                  body: ''
                  body_html: ''
                - id: pol_VqXmZF31wY
                  name: Shipping Policy
                  slug: shipping-policy
                  body: ''
                  body_html: ''
                - id: pol_UkLWZg9DAJ
                  name: Terms of Service
                  slug: terms-of-service
                  body: ''
                  body_html: ''
                meta:
                  page: 1
                  limit: 25
                  count: 6
                  pages: 1
                  from: 1
                  to: 6
                  in: 6
                  previous: null
                  next: null
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Policy'
                required:
                - data
        '401':
          description: unauthorized
          content:
            application/json:
              example:
                error:
                  code: invalid_token
                  message: Valid API key required
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getApiV3StorePolicies
      x-operation-id-source: derived
    servers:
    - url: http://{defaultHost}
      variables:
        defaultHost:
          default: localhost:3000
  /api/v3/store/policies/{id}:
    get:
      summary: Get a policy
      tags:
      - Policies
      security:
      - api_key: []
      description: Returns a single policy by slug or prefixed ID. Includes the full rich text body.
      x-codeSamples:
      - lang: javascript
        label: Spree SDK
        source: "import { createClient } from '@spree/sdk'\n\nconst client = createClient({\n  baseUrl: 'https://your-store.com',\n  publishableKey: '<api-key>',\n})\n\nconst policy = await client.policies.get('return-policy')"
      parameters:
      - name: x-spree-api-key
        in: header
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        description: Policy slug (e.g., return-policy) or prefixed ID (e.g., pol_abc123)
        schema:
          type: string
      - name: fields
        in: query
        required: false
        description: Comma-separated list of fields to include. id is always included.
        schema:
          type: string
      responses:
        '200':
          description: policy found
          content:
            application/json:
              example:
                id: pol_uw2YK1rnl0
                name: Return Policy
                slug: return-policy
                body: You can return items within 30 days.
                body_html: "<div class=\"trix-content\">\n  You can return items within 30 days.\n</div>\n"
              schema:
                $ref: '#/components/schemas/Policy'
        '404':
          description: policy not found
          content:
            application/json:
              example:
                error:
                  code: record_not_found
                  message: Policy not found
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getApiV3StorePoliciesById
      x-operation-id-source: derived
    servers:
    - url: http://{defaultHost}
      variables:
        defaultHost:
          default: localhost:3000
  /api/v2/storefront/policies:
    get:
      summary: List all Store Policies
      description: Returns a list of Store Policies. This endpoint is only available in Spree 5.2 or later.
      tags:
      - Policies
      operationId: policies-list
      responses:
        '200':
          $ref: '#/components/responses/PolicyList'
    servers:
    - url: https://demo.spreecommerce.org
      description: demo
    - url: http://localhost:3000
      description: localhost
  /api/v2/storefront/policies/{policy_slug}:
    get:
      summary: Retrieve a Policy
      description: Returns the details of a specified Policy. This endpoint is only available in Spree 5.2 or later.
      tags:
      - Policies
      operationId: show-policy
      responses:
        '200':
          $ref: '#/components/responses/Policy'
        '404':
          $ref: '#/components/responses/404NotFound'
    servers:
    - url: https://demo.spreecommerce.org
      description: demo
    - url: http://localhost:3000
      description: localhost
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: record_not_found
            message:
              type: string
              example: Record not found
            details:
              type:
              - object
              - 'null'
              description: Field-specific validation errors
              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
    Policy:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        body:
          type:
          - string
          - 'null'
        body_html:
          type:
          - string
          - 'null'
      required:
      - id
      - name
      - slug
      - body
      - body_html
      x-typelizer: true
    Policy_2:
      type: object
      title: Policy
      description: Policy represents terms and conditions, privacy policies, and other legal documents that can be displayed on the storefront.
      properties:
        id:
          type: string
          example: '1'
        type:
          type: string
          default: policy
        attributes:
          type: object
          properties:
            name:
              type: string
              example: Terms and Conditions
              description: Display name of the policy
            slug:
              type: string
              example: terms-and-conditions
              description: URL-friendly identifier for the policy
            created_at:
              $ref: '#/components/schemas/Timestamp'
            updated_at:
              $ref: '#/components/schemas/Timestamp'
            body:
              type:
              - string
              - 'null'
              example: asdrdfas
              description: Raw text content of the policy
            body_html:
              type:
              - string
              - 'null'
              example: "<div class=\"trix-content\">\n  <div>asdrdfas</div>\n</div>\n"
              description: HTML formatted content of the policy
          required:
          - name
          - slug
          - created_at
          - updated_at
      required:
      - id
      - type
      - attributes
    Timestamp:
      type: string
      format: date-time
      example: '2020-02-16T07:14:54.617Z'
      x-internal: false
      title: Time Stamp
      x-examples:
        example-1: '2020-02-16T07:14:54.617Z'
  responses:
    404NotFound:
      description: 404 Not Found - Resource not found.
      content:
        application/vnd.api+json:
          schema:
            properties:
              error:
                type: string
                example: The resource you were looking for could not be found.
                default: The resource you were looking for could not be found.
          examples:
            404 Example:
              value:
                error: The resource you were looking for could not be found.
    Policy:
      description: 200 Success - Returns the `policy` object.
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/Policy_2'
            required:
            - data
          examples:
            Policy:
              value:
                data:
                  id: '1'
                  type: policy
                  attributes:
                    name: Terms and Conditions
                    slug: terms-and-conditions
                    created_at: '2025-08-12T12:13:09.183Z'
                    updated_at: '2025-08-12T13:27:59.470Z'
                    body: asdrdfas
                    body_html: "<div class=\"trix-content\">\n  <div>asdrdfas</div>\n</div>\n"
    PolicyList:
      description: 200 Success - Returns an array of `policy` objects.
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/Policy_2'
            required:
            - data
          examples:
            List of Policies:
              value:
                data:
                - id: '1'
                  type: policy
                  attributes:
                    name: Terms and Conditions
                    slug: terms-and-conditions
                    created_at: '2025-08-12T12:13:09.183Z'
                    updated_at: '2025-08-12T13:27:59.470Z'
                    body: asdrdfas
                    body_html: "<div class=\"trix-content\">\n  <div>asdrdfas</div>\n</div>\n"
                - id: '2'
                  type: policy
                  attributes:
                    name: Privacy Policy
                    slug: privacy-policy
                    created_at: '2025-08-12T10:00:00.000Z'
                    updated_at: '2025-08-12T10:00:00.000Z'
                    body: Privacy policy content
                    body_html: "<div class=\"trix-content\">\n  <div>Privacy policy content</div>\n</div>\n"
  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
    bearerAuth:
      type: http
      scheme: bearer
      description: 'User token to authorize Cart and Checkout requests.


        It is required to associate Cart with the User.'
    orderToken:
      type: apiKey
      in: header
      description: 'Order token to authorize Cart and Checkout requests.


        [How to obtain X-Spree-Order-Token](../authentication#for-guest-users)'
      name: X-Spree-Order-Token
x-refined-from:
- spree-commerce-store-api-openapi.yml
- spree-commerce-storefront-api-openapi.yml
x-tagGroups:
- name: Authentication
  tags:
  - Authentication
- name: Product Catalog
  tags:
  - Product Catalog
- name: Orders
  tags:
  - Orders
- name: Customers
  tags:
  - Customers
- name: Configuration
  tags:
  - Configuration