hosting
GET /v1/sites/{site_id}/translation/bundle/{locale}
One locale of a site's translated content, for the site itself to render.
認証
ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。
このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X GET https://api.zinndigital.com/v1/sites/{site_id}/translation/bundle/{locale} \
-H "Authorization: Bearer zdk_live_…"ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
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`.
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
site_id (path) | Uuid | はい | — |
locale (path) | LocaleCode | はい | The locale to fetch (docs/28 registry code). |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
locale | LocaleCode | はい | BCP-47 / ISO locale code from the language registry (docs/28). |
documents | SiteTranslationDocument[] | はい | — |
ready | integer | はい | — |
total | integer | はい | — |
このエンドポイントが返すエラー
401 · 403 · 404 · 422