List a shop’s blog posts
GET
/storefront/sites/{host}/posts
const url = 'https://example.com/storefront/sites/northgate.shop.getbottle.app/posts?tag=barbecues';const options = {method: 'GET'};
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://example.com/storefront/sites/northgate.shop.getbottle.app/posts?tag=barbecues'Deliberately unauthenticated: the posts a business published on its blog, dated today or before, newest first, a page at a time, without their bodies. With tag, a tag’s address, only the posts with that tag. With preview, a token from POST /storefront/preview, drafts and posts dated ahead too, never cached. A shop closed for now is 404 with an empty body.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”host
required
string
Example
northgate.shop.getbottle.appQuery Parameters
Section titled “Query Parameters”page
From 1.
string
From 1.
tag
string
Example
barbecuesperPage
1 to 100; 12 unless given.
string
1 to 100; 12 unless given.
preview
string
Responses
Section titled “Responses”One page of posts
Media typeapplication/json
object
posts
required
Array<object>
object
id
required
UUID v7
string format: uuid
slug
required
string
title
required
string
excerpt
required
string
cover
required
object
alt
required
string | null
width
required
integer
height
required
integer
thumb
required
string
card
required
string
large
required
string
authorName
required
string
publishedOn
required
string format: date
tags
required
Array<object>
object
name
required
string
slug
required
string
updatedAt
required
string format: date-time
page
required
integer
pages
required
integer
total
required
integer
tag
required
object
name
required
string
slug
required
string
Example
{ "posts": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ]}Not changed since the ETag sent
Not a shop, or closed. No body.
Too many requests from one address