hosting
GET /v1/sites/{site_id}/translation/bundle/{locale}
One locale of a site's translated content, for the site itself to render.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Dieser Endpunkt gibt in der Spezifikation keine spezifische Berechtigung an. Versehen Sie Ihren Schlüssel daher mit den minimal erforderlichen Rechten und prüfen Sie die Antwort, anstatt Annahmen zu treffen.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X GET https://api.zinndigital.com/v1/sites/{site_id}/translation/bundle/{locale} \
-H "Authorization: Bearer zdk_live_…"Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
Every translated string this site has in `locale`, keyed by document. **This is the consumer end of the product**: the Zinn® Translate plugin on the customer's own WordPress site calls it, caches the payload, and swaps titles, bodies, excerpts and slugs at render time. **Last-good-while-stale, per string.** An entry is returned whenever its text is non-empty, whatever its status: a re-translation in flight must not blank a paragraph that is already live on someone's site. A string with no translation yet is **absent from the payload** rather than present and empty — the plugin then renders the customer's own words, and those two cases mean different things. Readable without good standing, deliberately: taking a live site's translated pages down over an unpaid invoice is a worse outcome than the invoice, and the customer never agreed to it. It does require a live subscription — a site that never bought this gets a `403`.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
site_id (path) | Uuid | Ja | — |
locale (path) | LocaleCode | Ja | The locale to fetch (docs/28 registry code). |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
locale | LocaleCode | Ja | BCP-47 / ISO locale code from the language registry (docs/28). |
documents | SiteTranslationDocument[] | Ja | — |
ready | integer | Ja | — |
total | integer | Ja | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 422