Blog Posts

Get blog posts and blog detail via store-api.

circle-info

Good to know: This API document based on Shopware 6 default store-api. You can reach base introduction document via https://shopware.stoplight.io/docs/store-api/38777d33d92dc-quick-start-guidearrow-up-right and request body and detail via https://shopware.stoplight.io/docs/store-api/cf710bf73d0cd-search-queriesarrow-up-right. This document gives us store api basics. Ongrano Blog Pro is designed based on these basics.

Blog Post List

POST https://your-site.com/store-api/blog

return all blog posts regarding your criteria.

Request Header

Name
Type
Description
Value

Accept*

string

Response type

application/json

Content-Type*

string

Request type

application/json

sw-access-key*

string

Headless Access Key

SWSCQ1V1QJHHSKV0TFLYZ0LSD1

Request Body - Example Criteria 1

Example getting blog posts regarding Category Id and sorting them with name ascending.

{
    "limit": 4,
    "page": 1,
    "filter": [
        { "type": "equals", "field": "blogCategoryId", "value": "018f5760eca0726e878366b96fa244bb" }
    ],
    "sort": [
        { "field": "name", "order": "ASC" }    
    ]
}

Request Body - Example Criteria 2

Example getting blog posts regarding active true and get only id, name, subheader and media.

Blog Post Detail

POST https://your-site.com/store-api/blog/{blogId}

return blog post regarding {blogId}

Request Header

Name
Type
Description
Value

Accept*

string

Response type

application/json

Content-Type*

string

Request type

application/json

sw-access-key*

string

Headless Access Key

SWSCQ1V1QJHHSKV0TFLYZ0LSD1

Request Body - Example Criteria

Last updated