localization

POST /v1/i18n/sources

Register translatable source fields (batch).

ចំណុចបញ្ចប់ localization ទាំងអស់

ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ

ផ្ញើគ្រាប់ចុច API ជាតូកែន bearer ។ ចំណុចបញ្ចប់នេះមិនបញ្ជាក់ពីសិទ្ធិជាក់លាក់ណាមួយនៅក្នុងការបញ្ជាក់នោះទេ ដូច្នេះសូមផ្ដល់សិទ្ធិអប្បបរមាដែលគ្រាប់ចុចរបស់អ្នកត្រូវការ ហើយពិនិត្យមើលការឆ្លើយតបជំនួសឱ្យការសន្មត់។

ចំនុចបញ្ចប់នេះមិនត្រូវការលេខសម្គាល់ស្ថាប័នទេ។ ពស័្ដកូនរបស់អ្នករួចហើយកំណត់អត្តសញ្ញាណស្ថាប័នដែលវាជាកម្មសិទ្ធិ ហើយការឆ្លើយតបគឺត្រូវបានកំណត់វិសាលភាពទៅតាមនោះ។

សាកល្បង

ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។

curl -X POST https://api.zinndigital.com/v1/i18n/sources \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API

ព័ត៌មានលម្អិត

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.

ប៉ារ៉ាម៉ែត្រ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
Idempotency-Key (header)stringទេClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

សំណើរបស់រាងកាយ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
itemsTranslationSourceItem[]ទេ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: t…
pruneTranslationPruneScopeទេ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_namespaceTranslationNamespacePruneទេRetire every registered DOCUMENT under `ref_prefix` that is not named in `expected_refs`. `TranslationPruneScope` retires fields inside one document; this retires documents that…

ផ្អាកដំណើរការ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
resultsTranslationSourceResult[]បាទ/ចាសOne result per submitted item, in the order submitted.
retiredTranslationField[]ទេ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 indis…
retired_refsObjectRef[]ទេ`object_ref`s 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 FIEL…

កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ

401 · 403 · 422 · 429