Spree Commerce Posts API

The Posts API from Spree Commerce — 2 operation(s) for posts.

Operations 2

GET /api/v2/storefront/posts List all Posts #
GET /api/v2/storefront/posts/{id} Retrieve a Post #

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-posts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

spree-commerce-posts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.0.0
  title: Storefront Posts API
  description: 'Storefront API is a modern REST API based on the JSON API spec which provides you with all the necessary endpoints to build amazing user interfaces either in JavaScript frameworks or native mobile libraries.


    Import to Postman'
  contact:
    name: Vendo Connect Inc.
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  license:
    name: BSD-3-Clause
    url: https://github.com/spree/spree/blob/main/LICENSE.md
servers:
- url: https://demo.spreecommerce.org
  description: demo
- url: http://localhost:3000
  description: localhost
tags:
- name: Posts
paths:
  /api/v2/storefront/posts:
    get:
      summary: List all Posts
      description: Returns a list of published Posts. This endpoint is only available in Spree 5.2 or later.
      tags:
      - Posts
      operationId: posts-list
      parameters:
      - $ref: '#/components/parameters/FilterByIds'
      - in: query
        name: filter[title]
        schema:
          type: string
        example: Hello World
        description: Filter Posts by title
      - in: query
        name: filter[post_category_id]
        schema:
          type: string
        example: '1'
        description: Filter Posts by Post Category ID
      - in: query
        name: filter[post_category_slug]
        schema:
          type: string
        example: news
        description: Filter Posts by Post Category slug
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PerPageParam'
      - in: query
        name: sort
        schema:
          type: string
          enum:
          - id
          - -id
          - title
          - -title
          - published_at
          - -published_at
          - created_at
          - -created_at
          - updated_at
          - -updated_at
        example: -published_at
        description: 'Sort posts by attribute. Prefix with "-" for descending order. Available options: id, title, published_at, created_at, updated_at'
      - in: query
        name: include
        schema:
          type: string
        example: post_category
        description: 'Include related resources (available: post_category)'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Post'
                  meta:
                    $ref: '#/components/schemas/ListMeta'
                  links:
                    $ref: '#/components/schemas/ListLinks'
              examples:
                success:
                  value:
                    data:
                    - id: '1'
                      type: post
                      attributes:
                        title: Hello World
                        slug: hello-world
                        published_at: '2025-08-11T21:03:00.000Z'
                        meta_title: ''
                        meta_description: ''
                        created_at: '2025-08-11T21:03:00.128Z'
                        updated_at: '2025-08-27T10:09:23.007Z'
                        excerpt: null
                        content: This is a test post
                        content_html: <div class="trix-content">\n  <div>This is a test post</div>\n</div>\n
                        description: This is a test post
                        shortened_description: This is a test post
                        author_name: Spree Admin
                        post_category_title: News
                        tags: []
                        image_url: null
                      relationships:
                        post_category:
                          data:
                            id: '3'
                            type: post_category
                    meta:
                      count: 1
                      total_count: 1
                      total_pages: 1
                    links:
                      self: http://localhost:3000/api/v2/storefront/posts
                      next: http://localhost:3000/api/v2/storefront/posts?page=1
                      prev: http://localhost:3000/api/v2/storefront/posts?page=1
                      last: http://localhost:3000/api/v2/storefront/posts?page=1
                      first: http://localhost:3000/api/v2/storefront/posts?page=1
  /api/v2/storefront/posts/{id}:
    get:
      summary: Retrieve a Post
      description: Returns the details of a specified Post. You can use either the post slug or ID. This endpoint is only available in Spree 5.2 or later.
      tags:
      - Posts
      operationId: show-post
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        example: hello-world
        description: Post slug or ID
      - in: query
        name: include
        schema:
          type: string
        example: post_category
        description: 'Include related resources (available: post_category)'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Post'
              examples:
                success:
                  value:
                    data:
                      id: '1'
                      type: post
                      attributes:
                        title: Hello World
                        slug: hello-world
                        published_at: '2025-08-11T21:03:00.000Z'
                        meta_title: ''
                        meta_description: ''
                        created_at: '2025-08-11T21:03:00.128Z'
                        updated_at: '2025-08-27T10:09:23.007Z'
                        excerpt: null
                        content: This is a test post
                        content_html: <div class="trix-content">\n  <div>This is a test post</div>\n</div>\n
                        description: This is a test post
                        shortened_description: This is a test post
                        author_name: Spree Admin
                        post_category_title: News
                        tags: []
                        image_url: null
                      relationships:
                        post_category:
                          data:
                            id: '3'
                            type: post_category
        '404':
          $ref: '#/components/responses/404NotFound'
components:
  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.
  schemas:
    Post:
      type: object
      title: Post
      description: Post represents a blog post or news article that can be displayed on the storefront.
      properties:
        id:
          type: string
          example: '1'
        type:
          type: string
          default: post
        attributes:
          type: object
          properties:
            title:
              type: string
              example: Hello World
              description: Title of the post
            slug:
              type: string
              example: hello-world
              description: URL-friendly identifier for the post
            published_at:
              type:
              - string
              - 'null'
              format: date-time
              example: '2025-08-11T21:03:00.000Z'
              description: Date and time when the post was published
            meta_title:
              type:
              - string
              - 'null'
              example: ''
              description: SEO meta title
            meta_description:
              type:
              - string
              - 'null'
              example: ''
              description: SEO meta description
            created_at:
              $ref: '#/components/schemas/Timestamp'
            updated_at:
              $ref: '#/components/schemas/Timestamp'
            excerpt:
              type:
              - string
              - 'null'
              example: null
              description: Short excerpt of the post content
            content:
              type:
              - string
              - 'null'
              example: This is a test post
              description: Plain text content of the post
            content_html:
              type:
              - string
              - 'null'
              example: "<div class=\"trix-content\">\n  <div>This is a test post</div>\n</div>\n"
              description: HTML formatted content of the post
            description:
              type:
              - string
              - 'null'
              example: This is a test post
              description: Description of the post
            shortened_description:
              type:
              - string
              - 'null'
              example: This is a test post
              description: Shortened description of the post
            author_name:
              type:
              - string
              - 'null'
              example: Spree Admin
              description: Name of the post author
            post_category_title:
              type:
              - string
              - 'null'
              example: News
              description: Title of the associated post category
            tags:
              type: array
              items:
                type: string
              example: []
              description: List of tags associated with the post
            image_url:
              type:
              - string
              - 'null'
              example: null
              description: URL of the post's featured image
        relationships:
          type: object
          properties:
            post_category:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    id:
                      type: string
                      example: '3'
                    type:
                      type: string
                      example: post_category
          required:
          - title
          - slug
          - created_at
          - updated_at
      required:
      - id
      - type
      - attributes
    ListLinks:
      x-internal: false
      type: object
      title: Pagination Links
      properties:
        self:
          type: string
          description: URL to the current page of the listing
        next:
          type: string
          description: URL to the next page of the listing
        prev:
          type: string
          description: URL to the previous page of the listing
        last:
          type: string
          description: URL to the last page of the listing
        first:
          type: string
          description: URL to the first page of the listing
    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'
    ListMeta:
      type: object
      x-internal: false
      title: Pagination Meta
      properties:
        count:
          type: number
          example: 7
          description: Number of items on the current listing
        total_count:
          type: number
          example: 145
          description: Number of all items matching the criteria
        total_pages:
          type: number
          example: 10
          description: Number of all pages containing items matching the criteria
  parameters:
    PerPageParam:
      name: per_page
      in: query
      description: Number of requested records per page when paginating collection
      schema:
        type: integer
      example: 25
    FilterByIds:
      in: query
      name: filter[ids]
      schema:
        type: string
      example: 1,2,3
      description: Fetch only resources with corresponding IDs
    PageParam:
      name: page
      in: query
      description: Number of requested page when paginating collection
      schema:
        type: integer
      example: 1
  securitySchemes:
    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