localization

GET /v1/i18n/documents/{locale}

Get one marketing document's finished translations.

تمام localization اینڈ پوائنٹس

توثيقِ شناخت

یہ اینڈ پوائنٹ عوامی ہے۔ یہ کوئی اسناد اور کوئی تنظیم نہیں لیتا — یہ وہ ہے جسے ہماری اپنی مارکیٹنگ سائٹ اور AI کے جواب دینے والے انجن پڑھتے ہیں۔

یہ اینڈ پوائنٹ کوئی آرگنائزیشن آئی ڈی نہیں لیتا۔ آپ کی کلید پہلے ہی اس آرگنائزیشن کی شناخت کرتی ہے جس سے یہ تعلق رکھتی ہے، اور اس کا جواب اسی کے مطابق محدود ہوتا ہے۔

آزمائیں

کوئی بھی چیز جو زاویہ دار قوسین میں ہو اسے اپنی اقدار سے بدلیں، اور کلیدی پلیس ہولڈر کو اپنے ڈیش بورڈ کی کسی کلید سے بدلیں۔

curl -X GET https://api.zinndigital.com/v1/i18n/documents/{locale}?object_ref=<object_ref>

لاگ ان ہیں؟ آپ کے ڈیش بورڈ میں موجود API کنسول آپ کی حقیقی تنظیم کی آئی ڈی اور آپ کی اپنی کلید خود بخود پُر کر دیتا ہے، اور لائیو API پر درخواست چلاتا ہے تاکہ آپ اصل ردعمل دیکھ سکیں۔ اس اینڈ پوائنٹ کو API کنسول میں کھولیں

تفصیلات

Returns the finished translations for a **single** document, as `field -> text` across the surfaces a rendered page is built from (`page`, `meta_title`, `meta_description`, `alt_text`) — the read the public site performs on the server, per page, at render time. **Why a second public endpoint next to `getPublicMessageCatalogue`.** They are cached on different keys and answer different questions. The catalogue is one response per locale covering the shell (nav, footer, meta) and is read on every page; this is one response per document per locale, read only by the page it belongs to. Folding them together would churn the shell's cache entry whenever any of 60 marketing pages was retranslated. **⛔ `object_ref` is required.** One locale's whole `page` surface is ~7,879 entries — the read `scripts/i18n-pages.mjs` batches at build time, and the one that OOM-killed the engine on 2026-08-05. Making the parameter optional would re-create that on a public, unauthenticated URL. A single document is ~131 leaves, which is what makes this safe on a render path behind an edge cache. **Public and non-tenant**, for the same reasons as the catalogue: the text is already in the page's HTML, and an `Authorization` header suppresses shared caching. **`up_to_date` only** — the site applies this *over* the document the current deploy already serves, so stale text could only replace a good translation with an older one. **An untranslated document is a `200` with an empty `fields` object, never a `404`** — the caller treats any failure as "use the build-time document", so a `404` would be indistinguishable from an outage. Cacheable: strong `ETag` plus `Cache-Control: public, max-age=300, stale-while-revalidate=86400`.

پیرامیٹرز

نامقسملازمییہ کیا ہے
locale (path)LocaleCodeہاںThe target locale (docs/28 registry code).
object_ref (query)stringہاںThe document, e.g. `page:hosting`. Required — see the description.
If-None-Match (header)stringنہیںA previously returned `ETag`; a match responds `304`.

جواب

نامقسملازمییہ کیا ہے
localeLocaleCodeہاںBCP-47 / ISO locale code from the language registry (docs/28).
object_refstringہاںThe document these fields belong to, echoed back.
fieldsobjectہاں`field -> translated text`, flat. The field names are the ones the CMS walker (`cms/src/lib/snapshotKeys.ts`) assigns when it collects a document's translatable leaves, so the c…

وہ خرابیان جو یہ اینڈ پوائنٹ واپس کر سکتا ہے

422 · 429