hosting
GET /v1/sites/{site_id}/translation/bundle/{locale}
One locale of a site's translated content, for the site itself to render.
Autentikasi
Kirimkan kunci API sebagai token bearer. Titik akhir ini tidak menyatakan izin tertentu dalam spesifikasi, jadi berikan kunci Anda izin minimum yang diperlukan dan periksa responsnya alih-alih berasumsi.
Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
curl -X GET https://api.zinndigital.com/v1/sites/{site_id}/translation/bundle/{locale} \
-H "Authorization: Bearer zdk_live_…"Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
site_id (path) | Uuid | Ya | — |
locale (path) | LocaleCode | Ya | The locale to fetch (docs/28 registry code). |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
locale | LocaleCode | Ya | BCP-47 / ISO locale code from the language registry (docs/28). |
documents | SiteTranslationDocument[] | Ya | — |
ready | integer | Ya | — |
total | integer | Ya | — |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422