Blog

Store API

PremsBlog is fully headless-capable: anything you see in the shop is also available through the Shopware Store API. This page is the technical reference for your developer or integrator.

General

All endpoints live under the standard path /store-api/prems-blog/... and follow the exact Shopware conventions. Responses are returned as JSON.

Required headers

Header Required Meaning
sw-access-key yes Sales-channel access key (found in the administration under Sales channels → Detail).
sw-context-token only for POST reviews Customer context token of an active session.
sw-language-id no UUID of the desired language; without it the sales channel's default language is used. Translated fields automatically fall back to the default language when no translation exists.
Content-Type: application/json for POST for request bodies.

Sales-channel activation

If the plugin is not active in a sales channel (see Plugin configuration), every endpoint responds with 404 Not Found. Visibility stays consistent: whatever the shop hides, the API hides as well.


Article list

GET /store-api/prems-blog/articles

Login required: No

Returns a paginated list of active articles. Honours the activity window (activeFrom / activeTo) and the plan limits of the active licence.

Query parameters

Parameter Type Default Meaning
page int 1 Page number (1-based).
limit int 12 Articles per page. Clamped to the plan limit.
category string One or several category IDs, separated by `
tag string One or several tag IDs, separated by `
author string One or several author IDs, separated by `
sort string newest Sort: newest, oldest, title-asc, title-desc.

Example response

{
  "apiAlias": "prems_blog_article_list_response",
  "articles": {
    "elements": [
      {
        "id": "0190abc...",
        "title": "My first article",
        "displayDate": "2026-04-12T08:00:00+00:00",
        "author": { "firstName": "Max", "lastName": "Doe" },
        "categories": [ /* ... */ ],
        "tags": [ /* ... */ ],
        "previewMedia": { "url": "..." }
      }
    ],
    "total": 42,
    "page": 1,
    "limit": 12
  }
}

Article detail

GET /store-api/prems-blog/article/{articleId}

Login required: No

Returns a single article including author, categories, tags, previewMedia and all approved reviews. The translated content field carries the complete CMS layout for your app to hydrate.

Missing or inactive articles

  • 404 Not Found — the article doesn't exist, isn't active, falls outside its visibility window, or isn't assigned to the sales channel of the active access key.

Authors

List

GET /store-api/prems-blog/authors

Login required: No

Returns a list of active authors.

Query parameters

Parameter Type Default Meaning
letter string Optional A–Z bucket filter (AZ or # for non-alphabetic last names).
page int 1 Page number.
limit int 25 Authors per page.

Detail

GET /store-api/prems-blog/author/{authorId}

Login required: No

Returns the author including media (profile picture) and their active articles.


Categories

GET /store-api/prems-blog/category/{categoryId}

Login required: No

Returns the blog category including its active articles within the activity window. Supports page, limit and sort like the article list.


Tags

GET /store-api/prems-blog/tag/{tagId}

Login required: No

Same shape as categories — tag including active articles.


Submit a review (premium)

POST /store-api/prems-blog/review

Login required: Yes (sw-context-token of a logged-in customer)

Request body

{
  "articleId": "uuid",
  "points": 5,
  "title": "Great article",
  "content": "Very helpful, thanks!"
}

Behaviour

  • points is required (1–5). title and content are optional.
  • Successful responses contain the newly created review with status pending. The review only becomes public after you approve it in the administration (see Reviews).

Errors

  • 400 Bad Request — validation failed (e.g. points outside 1–5).
  • 401 Unauthorized — no valid customer context token in the header.
  • 404 Not Found — article doesn't exist or isn't active.

cURL examples

curl -X GET "https://shop.example/store-api/prems-blog/articles?page=1&limit=10&sort=newest" \
  -H "sw-access-key: SWSCBHFSNTVMAWNZDNFKSHLAYW" \
  -H "Accept: application/json"
curl -X POST "https://shop.example/store-api/prems-blog/review" \
  -H "sw-access-key: SWSCBHFSNTVMAWNZDNFKSHLAYW" \
  -H "sw-context-token: 1a2b3c4d..." \
  -H "Content-Type: application/json" \
  -d '{
    "articleId": "0190abc...",
    "points": 5,
    "title": "Great",
    "content": "Very helpful!"
  }'

OpenAPI schema

A complete endpoint specification including schema and response structures is exposed by the standard Shopware endpoint:

GET /store-api/_info/openapi3.json

The blog routes appear there under the prefix prems-blog.