Skip to content
Coursey CreativeSign in

GET /gallery

/api/store/[slug]/gallery

Lists the store's approved, currently-published gallery items (images and social video embeds) with public URLs, optionally filtered by tag or collection.

Public - no auth neededRate limit 120/min anonymous, 600/min with a keyHow authentication works

Path parameters

slugstringrequired

Business store slug

Query parameters

tagstringoptional

Filter by gallery tag name (exact match for this business, trimmed). Unknown tag returns { images: [] }.

collectionstringoptional

Filter by gallery collection name (exact match for this business, trimmed). Combined with tag as an intersection. Unknown collection returns { images: [] }.

limitnumberoptional

Max items to return (page size). Integer >= 1, capped at 100. Invalid or missing means no limit.

offsetnumberoptional

Number of items to skip before the page starts. Integer >= 0; invalid or negative values become 0. Counted over the published, filtered list. Setting it also returns the pagination block.

Default 0

include_totalbooleanoptional

Set to true to add the pagination block (total, limit, offset, has_more) to the response. Use limit=1&include_total=true to read how many images the gallery has without downloading them all.

Default false

Responses

200

The request succeeded.

304

Nothing has changed since the validator you sent. Reuse your copy.

404

No such store, or no such record inside it.

429

Too many requests. Back off and retry after the window in the response.

What comes back

200 JSON: { images: [...] }, plus { pagination: { total, limit, offset, has_more } } when include_total=true or offset is set. total counts every approved, currently-published item matching the filters; limit is null when no page size was requested. Each item has id, url (Supabase public URL, or embed URL for embed-only items), created_at, plus optional media_type (present when not "image") and embed_url (present for videos). Empty array when the gallery addon is disabled. 404 { error: 'Business not found' } for an unknown slug. Sends ETag covering the page window and total, and honors If-None-Match with 304, for server-side callers only; the validator is withheld from any request carrying an Origin header. Cached 60s at the browser with stale-while-revalidate; not shared-cacheable. CORS open, OPTIONS supported.