Get Page
Returns the full page content including all component items. This is the primary endpoint for rendering Weaverse pages in external applications.
Authentication
Path parameters
Custom page handles can include path separators. If the list endpoint returns type: "CUSTOM" and handle: "pages/gift-shop", fetch it at /projects/:projectId/pages/CUSTOM/pages/gift-shop.
Query parameters
The format can also be requested via the Accept header (application/portable-text+json). The query parameter takes precedence when both are present.
Always pass locale for localized projects. Page content is stored per
locale. If you edit and publish a page while a specific market/locale is
selected in the editor (for example en-us), that content is saved on the
en-us assignment — not on the base locale ("").Because locale defaults to "", calling
…/pages/PRODUCT/default without ?locale returns the base-locale
page, which on a localized project is often a different — and possibly
empty or un-edited — assignment. This is the most common reason a published
change appears in the storefront/editor but seems “missing” from the API.Fix: include the market locale, e.g.
…/pages/PRODUCT/default?locale=en-us.To find which locale a product/page actually uses, open it in Studio — the
template dropdown shows the active template and “Assigned to N products”,
and the market/locale selector sits next to it. The pair
(type, handle, locale) is exactly what you pass to this endpoint. You can
also confirm the available locales for each page with
List Pages, which returns a locale field per
assignment.
Locale fallback
When a page is not found for the requested locale, the API falls back in order:
- Requested locale (e.g.,
fr-fr)
- Project’s default locale
- English default
If no assignment is found after all fallbacks, a 404 is returned.
Response
Response fields
Item structure
Each item in the items array represents a page section or component:
The items array is a flat list. Use the children field on each item to reconstruct the component tree. The item with type: "root" is the tree’s entry point.
Portable Text format
Pass ?format=portable-text (or Accept: application/portable-text+json) to receive the page as a Portable Text array. This format is designed for multi-channel rendering (web, native, email, PDF) and AI consumption — rich-text fields are converted from opaque HTML strings into structured blocks that any official PT renderer can render.
Envelope difference
The items field becomes content, and the response carries Content-Type: application/portable-text+json. All other envelope fields are unchanged.
Mapping rules
Each Weaverse item becomes a custom Portable Text block:
Field types other than richtext (text, image URL, color, range, switch, product/collection refs, etc.) pass through unchanged.
Example
Note how the text-section’s content field — originally an HTML string — is now a queryable array of PT blocks with explicit marks and link annotations.
Rendering with @portabletext/react
Official renderers exist for React, Vue, Svelte, Astro, React Native and more.
Errors
Examples