List all published blog posts
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/blog/posts/all';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/stores/example/blog/posts/all \ --header 'x-api-key: <x-api-key>'Returns every published post in one response, with categories and tags, without pagination. Intended for exports and syncing; use the paginated list for large blogs.
Required scopes: read:blog
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
Post body as HTML, or null when empty.
Table of contents generated from the headings in content.
object
Anchor ID of the heading.
Heading level, from 1 to 6.
Text of the heading.
Position of the heading in the post content.
Short summary shown in listings, or null.
URL of the featured image, or null.
SEO title and description. Present only when requested with include_seo_metadata.
object
Page title for search engines, or null.
Page description for search engines, or null.
Publication status. Only published posts are visible on the storefront list; unlisted posts are reachable by their link.
Categories of the post.
object
ID.
Display name.
URL slug, unique within the store.
Description. Present on categories only; null when none is set.
Hex colour such as #ff6600. Present on categories only; null when none is set.
Manual position in the category list. Present on categories only.
When it was created, as an ISO 8601 timestamp.
When it was last updated, as an ISO 8601 timestamp. Present on categories only.
Tags of the post.
object
ID.
Display name.
URL slug, unique within the store.
Description. Present on categories only; null when none is set.
Hex colour such as #ff6600. Present on categories only; null when none is set.
Manual position in the category list. Present on categories only.
When it was created, as an ISO 8601 timestamp.
When it was last updated, as an ISO 8601 timestamp. Present on categories only.
IDs of the products recommended in the post, in display order. Present on single-post responses.
Post ID.
Title.
URL slug, unique within the store.
Whether the post is marked as featured.
When a scheduled post will be published, as an ISO 8601 timestamp, or null.
When the post was published, as an ISO 8601 timestamp, or null while unpublished.
ID of the user who created the post, or null (for example when created with an API key).
Name or email of the author. Present when the author is known and, on lists, when include_author is set.
Number of storefront views.
Estimated reading time in minutes.
When the post was created, as an ISO 8601 timestamp.
When the post was last updated, as an ISO 8601 timestamp.
When the post was deleted, or null. Deleted posts are not returned.
Example
[ { "status": "draft" }]The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}