curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/posts{
"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"
}
}Returns a list of published Posts. This endpoint is only available in Spree 5.2 or later.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/posts{
"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"
}
}Fetch only resources with corresponding IDs
Filter Posts by title
Filter Posts by Post Category ID
Filter Posts by Post Category slug
Number of requested page when paginating collection
Number of requested records per page when paginating collection
Sort posts by attribute. Prefix with "-" for descending order. Available options: id, title, published_at, created_at, updated_at
id, -id, title, -title, published_at, -published_at, created_at, -created_at, updated_at, -updated_at Include related resources (available: post_category)
Was this page helpful?