Blog Post Comments

Get blog post comments

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-guide and request body and detail via https://shopware.stoplight.io/docs/store-api/cf710bf73d0cd-search-queries. This document gives us store api basics. Ongrano Blog Pro is designed based on these basics.

Blog Post Comment List

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

return all blog post comment regarding your blogId and 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

Example getting blog post comments regarding blogId.

{
  "limit": 5,
  "page":1
}
{
    "elements": [
        {
            "translated": [],
            "createdAt": "2024-05-09T07:34:21.849+00:00",
            "updatedAt": null,
            "blogId": "018f5c23f8a873838f362efd0e054ddb",
            "salesChannelId": "018e8afb108071a4ac8b6fb0e2d299b5",
            "languageId": "2fbb5fe2e29a4d70aa5854ce7ce3e20b",
            "status": true,
            "comment": null,
            "content": "Test comment 1, Test comment 1, Test comment 1",
            "title": "Test comment",
            "id": "018f5c464b967368b868e65cd1032ada",
            "apiAlias": "ongrano_blog_comment"
        }
    ],
    "aggregations": [],
    "page": 1,
    "limit": 5,
    "entity": "ongrano_blog_comment",
    "total": 1,
    "states": [],
    "apiAlias": "dal_entity_search_result"
}

Send Blog Post Comment

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

Save the comment belong to {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

sw-context-token

string

Context Token

84266fdbd31d4c2c6d0665f7e8380fa3

Request Body

{
  "title": "Example Title",
  "content": "At least 40 character neeeded, example blog comment content"
}
{

}

Last updated