localization
POST /v1/i18n/sources
Register translatable source fields (batch).
Ìfàṣẹ́pọ̀
Fi bọ́kì kọ́kọ́ (bearer token) ránṣẹ́ gẹ́gẹ́ bí àmì ìdánimọ̀ API. Ibùdó yìí kò sọ àṣẹ pàtó kan nínú àlàyé rẹ̀, nítorí náà fún kọ́kọ́ rẹ̀ ní ohun tó kéré jù lọ tí ó nílò kí o sì ṣàyẹ̀wò ìdáhùn náà dípò kí o kàn rò ó.
Ojú abánisọ̀rọ̀ yìí kò gba id ajọ kankan. Kọ́kọ́rọ́ rẹ ti mọ ajọ ti o jẹ ti e, a o si fèsì nipa rẹ̀.
Gbiyanju rẹ
Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.
curl -X POST https://api.zinndigital.com/v1/i18n/sources \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API
Àwọn kúlẹ̀kúlẹ̀
Registers (or updates) source fields for auto-translation into every enabled locale (CLAUDE.md §2.19, docs/28). Each item is keyed by (surface, object_ref, field) within the calling organization; the org is taken from the credential and can never be set from the body. Batched by design. One CMS page save touches on the order of 150 translatable fields (body blocks, meta title/description, OpenGraph, JSON-LD text, alt text, breadcrumb labels, the slug). A per-field request would turn a single editorial save into 150 round-trips, so the endpoint takes up to 200 items per call; more than that is a 422 asking the caller to split the batch. Intrinsically idempotent — an Idempotency-Key is accepted but not needed. Registration is keyed on a SHA-256 of the source text: when the content hash is unchanged the call is a complete no-op (nothing is marked stale, no re-translation event is emitted, changed comes back false). Replaying the same batch therefore costs nothing and changes nothing, so unlike every other unsafe endpoint here this one needs no replay protection to be safe. The header is still accepted so that clients and generated SDKs can send it uniformly across all writes. Translation runs asynchronously afterwards — a successful response means the source is recorded and (if it changed) queued, never that any locale is translated yet. Poll GET /v1/i18n/bundles/{locale} or watch the translation.completed events.
Àwọn ìpìlẹ̀
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
Idempotency-Key (header) | string | Bẹẹkọ | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Akoonu ibeere naa
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
items | TranslationSourceItem[] | Bẹẹkọ | The source fields to register. Capped at 200 per request — a larger batch is a 422 telling the caller to split it. Optional so that a RETIREMENT-ONLY request is expressible: the… |
prune | TranslationPruneScope | Bẹẹkọ | Retire every registered source inside this scope that is NOT named in items — the de-registration path (#735). Without it, a key deleted from the caller's catalogue leaves its… |
prune_namespace | TranslationNamespacePrune | Bẹẹkọ | Retire every registered DOCUMENT under ref_prefix that is not named in expected_refs. TranslationPruneScope retires fields inside one document; this retires documents that… |
Idahun
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
results | TranslationSourceResult[] | Bẹẹni | One result per submitted item, in the order submitted. |
retired | TranslationField[] | Bẹẹkọ | Field names deleted by prune, sorted. Empty when prune was absent or nothing was stale. Reported rather than assumed: a destructive operation that returns no number is… |
retired_refs | ObjectRef[] | Bẹẹkọ | object_refs deleted by prune_namespace, sorted. Empty when prune_namespace was absent or nothing was dead. Kept separate from retired on purpose: a count of retired FIELDS… |
Awọn aṣiṣe ti ibudo ipari yii le da pada
401 · 403 · 422 · 429