> ## Documentation Index
> Fetch the complete documentation index at: https://weaverse.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Weaverse component configuration uses `settings`. `inspector` is deprecated; never generate it.
> Weaverse Hydrogen themes use React Router v7: import from `react-router`, never `react-router-dom` or `@remix-run/*`.
> Before using any code sample, read `@weaverse/hydrogen` in the project's `package.json`: 6.x and 5.x import from different entries and use different type names, so code for one does not build on the other.
> `@weaverse/hydrogen` 6 (Shopify Hydrogen 2026.10 and later, the version these docs show) imports from `@weaverse/hydrogen/react-router` and uses `Weaverse*` types such as `WeaverseComponentProps`, `WeaverseComponentLoaderArgs` and `WeaverseComponentSchema`; the root `@weaverse/hydrogen` entry only exports `createSchema()`, data helpers and types.
> `@weaverse/hydrogen` 5.x (Hydrogen 2026.4 and earlier) imports everything from `@weaverse/hydrogen` and uses `HydrogenComponentProps`, `ComponentLoaderArgs` and `HydrogenComponentSchema`. On a 5.x project, convert samples to these names. Upgrade to 6 only when asked (`npx @weaverse/cli@latest migrate v6`, plus the Hydrogen 2026.10 upgrade). Do not mix major versions.
> Next.js themes use `@weaverse/hydrogen` 6.2.0 or later: import client and shared code from `@weaverse/hydrogen/next` and server-only code from `@weaverse/hydrogen/next/server`. `@weaverse/next` is deprecated; never install or import it.
> For live project data (pages, theme settings, translations), use the Weaverse MCP server: https://weaverse.io/docs/developer-tools/weaverse-mcp

# Read a page's translations for one locale

> Returns every translatable text key of an owned page for one configured target locale: the source text the runtime translates from, the current target text, and the `targetGeneration` a writeback must replay.

- Sources are resolved server-side from the item value, its component-schema default, or the project default language overlay (whichever the runtime actually translates from). Client-supplied schemas or bare item ids are never trusted.
- `translation: null` means no row exists, or the stored one answers a source the merchant has since changed. `""` is a deliberate clear.
- `targetGeneration` is the raw stored target value at read time (`null` = no row, `""` = cleared). Replay it verbatim on `POST`.
- `language.isDefault` is `true` when the locale is the project default language; `POST` refuses to write it.
- Not cached: a cached generation would guarantee a stale write.
- Text only. Image translations are not exposed here; use `GET /projects/{projectId}/translation-units?kind=image`.

Workflow: `GET` this page and locale, change `translation` on the entries you want to write, `POST` them back unchanged otherwise, then `GET` again to confirm.

Required scope: `content:read`



## OpenAPI

````yaml https://studio.weaverse.io/api/v1/content/openapi.json get /projects/{projectId}/page-translations/{pageId}
openapi: 3.1.0
info:
  title: Weaverse Content API
  version: 1.0.0
  description: >-
    Authenticated REST API for reading and editing Weaverse-managed content
    (projects, pages, drafts, global sections, theme settings, languages) and
    for reading and writing per-locale translations.


    ## Authentication


    Send a bearer token in the `Authorization` header: a shop API key
    (`WEAVERSE_API_KEY`), a scoped API key or a delegated MCP OAuth token.
    Translation-unit routes also accept a project-bound translation agent token.
    Each operation's description ends with the scope it requires.


    ## Scopes


    | Scope | Grants |

    |---|---|

    | `content:read` | Read projects, pages, theme settings, versions, drafts
    and translation units |

    | `content:write` | Save drafts and make non-destructive edits (page items,
    metadata, SEO, assignments, languages, glossary). Never publishes or deletes
    |

    | `content:publish` | Publish drafts, schedule, reschedule or cancel
    publications, restore versions, publish global sections |

    | `content:delete` | Delete pages, global sections, languages and static
    keys, and revert overrides. Project deletion also needs `project:manage` |

    | `project:manage` | Create, copy and delete projects; settings, variants,
    hierarchy, backups, restore as new, previews and hostname policy |

    | `translations:read` | Read translation units only, with no general content
    access |

    | `translations:write` | Apply translation units only; never changes page
    content |


    A legacy API key without scopes keeps read, write and translation access and
    every endpoint that existed before scopes, but never gains publish, delete
    or project management.
servers:
  - url: https://studio.weaverse.io/api/v1/content
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: List, read, rename, create, copy and delete projects.
  - name: Pages
    description: List, read, create, update and delete the pages of a project.
  - name: Drafts and publishing
    description: >-
      Edit page drafts, then publish, schedule, restore and manage page
      versions.
  - name: Global sections
    description: Read, edit and publish sections shared across pages.
  - name: Page settings
    description: Read and edit page-level settings such as SEO metadata.
  - name: Assignments
    description: Map Shopify resources and routes to Weaverse pages and templates.
  - name: Theme settings
    description: Read and update a project's theme settings.
  - name: Languages and localization
    description: List project languages and manage locales, static text and glossary.
  - name: Translations
    description: >-
      Read and write per-locale translations, built for external translation
      agents.
  - name: Project structure
    description: Manage project variants and the project hierarchy.
  - name: Backups and portability
    description: Back up, restore, export and import project content.
  - name: Previews and hostnames
    description: Create preview links and manage the hostnames a project accepts.
  - name: Specification
    description: This OpenAPI document.
paths:
  /projects/{projectId}/page-translations/{pageId}:
    get:
      tags:
        - Translations
      summary: Read a page's translations for one locale
      description: >-
        Returns every translatable text key of an owned page for one configured
        target locale: the source text the runtime translates from, the current
        target text, and the `targetGeneration` a writeback must replay.


        - Sources are resolved server-side from the item value, its
        component-schema default, or the project default language overlay
        (whichever the runtime actually translates from). Client-supplied
        schemas or bare item ids are never trusted.

        - `translation: null` means no row exists, or the stored one answers a
        source the merchant has since changed. `""` is a deliberate clear.

        - `targetGeneration` is the raw stored target value at read time (`null`
        = no row, `""` = cleared). Replay it verbatim on `POST`.

        - `language.isDefault` is `true` when the locale is the project default
        language; `POST` refuses to write it.

        - Not cached: a cached generation would guarantee a stale write.

        - Text only. Image translations are not exposed here; use `GET
        /projects/{projectId}/translation-units?kind=image`.


        Workflow: `GET` this page and locale, change `translation` on the
        entries you want to write, `POST` them back unchanged otherwise, then
        `GET` again to confirm.


        Required scope: `content:read`
      operationId: getPageTranslations
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
        - name: pageId
          in: path
          required: true
          schema:
            type: string
          description: The page id (from `GET /projects/{projectId}/pages`).
        - name: locale
          in: query
          required: true
          schema:
            type: string
          description: >-
            A configured target locale, e.g. `en-us` (see `GET
            /projects/{projectId}/languages`).
      responses:
        '200':
          description: Translatable keys with current targets and their generations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageTranslationsResponse'
              example:
                object: page_translations
                projectId: clz8k2m4n0001qwer7tyu8iop
                pageId: clz8k3a1b0004asdf5ghj6klz
                language:
                  id: clz8k2x7y0003lkjh4gfd3sap
                  code: fr-fr
                  name: French
                  isDefault: false
                data:
                  - itemId: clz8k3c9d0007zxcv8bnm1qwe
                    key: data.heading
                    source: Summer collection
                    translation: Collection été
                    targetGeneration: Collection été
                  - itemId: clz8k3d2e0008poiu7ytr6ewq
                    key: data.buttonText
                    source: Shop now
                    translation: null
                    targetGeneration: null
        '400':
          description: Missing `locale`, or a locale this project has not configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Project not found, or the page is not owned by this project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PageTranslationsResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - page_translations
        projectId:
          type: string
        pageId:
          type: string
        language:
          type: object
          description: The resolved target language row, not the requested string.
          properties:
            id:
              type: string
            code:
              type: string
            name:
              type: string
            isDefault:
              type: boolean
              description: >-
                True when this locale is the project default — the source other
                locales translate from, which POST refuses to write. Derived
                from the project configuration, the same authority the write
                path rejects on.
        data:
          type: array
          items:
            $ref: '#/components/schemas/PageTranslationEntry'
    Error:
      type: object
      required:
        - object
        - code
        - message
        - status
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - UNAUTHORIZED
            - FORBIDDEN
            - INSUFFICIENT_SCOPE
            - PROJECT_NOT_FOUND
            - PAGE_NOT_FOUND
            - STALE_PAGE
            - STALE_PROJECT
            - STALE_TRANSLATION
            - TRANSLATION_UNIT_NOT_FOUND
            - SERVICE_UNAVAILABLE
            - CONFLICT
            - PRECONDITION_REQUIRED
            - INVALID_PARAMS
            - INTERNAL_ERROR
        message:
          type: string
        status:
          type: integer
        details:
          description: >-
            Optional machine-readable context, for example the clashing handles
            of a 409 CONFLICT.
    PageTranslationEntry:
      type: object
      required:
        - itemId
        - key
        - source
        - translation
        - targetGeneration
      properties:
        itemId:
          type: string
          description: The item the key belongs to.
        key:
          type: string
          description: >-
            The extraction path of the translatable field, rooted at the item
            data column (e.g. `data.title`). Use it verbatim; it is the stored
            translation key.
        source:
          type: string
          description: >-
            The text the translation answers for, resolved server-side from the
            item value, its component-schema default, or the project default
            language overlay — whichever the runtime actually translates FROM.
        translation:
          type:
            - string
            - 'null'
          description: >-
            The current target text. `""` is a deliberate clear; `null` means no
            row exists, or the stored one answers a source the merchant has
            since changed.
        targetGeneration:
          type:
            - string
            - 'null'
          description: >-
            The raw stored target value at read time, independent of freshness:
            `null` = no row, `""` = cleared. Replay it verbatim on write; it is
            the compare-and-set token that stops a delayed agent overwriting a
            newer translation.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: WEAVERSE_API_KEY
      description: >-
        Bearer token: a shop API key (`WEAVERSE_API_KEY`), a scoped API key or a
        delegated MCP OAuth token; translation-unit routes also accept a
        project-bound translation agent token. Each operation lists the scope it
        requires; the scope table is in the API description.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.