Translation
Catalog translation, review queue, glossary.
12 نقطة وصول. أسماء نقاط الوصول وأوصافها مأخوذة من ملف OpenAPI، لذلك تظهر بالإنجليزية.
POST /v1/translate/backfillGET /v1/translate/statusGET /v1/translate/reviewPOST /v1/translate/review/bulkPOST /v1/translate/review/{translation_id}GET /v1/translate/exportGET /v1/translate/approvedPOST /v1/translate/ackGET /v1/translate/glossaryPOST /v1/translate/glossaryPUT /v1/translate/glossary/{term_id}DELETE /v1/translate/glossary/{term_id}
POST
/v1/translate/backfillTranslate the catalog (or estimate cost with dry_run)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
Idempotency-Key | header | string | null | لا | Unique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$ |
جسم الطلب application/json BackfillRequest
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
target_locale | string | لا | default "ar" · pattern ^[a-z]{2}$ |
fields | "name" | "description" | "category" | "attribute_name" | "attribute_value"[] | لا | |
scope | "all" | "missing" | "stale" | لا | default "missing" |
product_ids | string[] | null | لا | |
review_top_n | integer | لا | Also send the top N products to the review queue.default 0 · min 0 · max 5000 |
dry_run | boolean | لا | Only estimate count and cost.default false |
الردود
- 202Successful Response
BackfillEstimate
GET
/v1/translate/statusTranslate Status
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
target_locale | query | string | لا | A tenant locale, e.g. ar. · default "ar" · pattern ^[a-z]{2}$ |
الردود
- 200Successful Response
TranslationStatusOut
GET
/v1/translate/reviewReview queue (with source, translation and quality checks)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
status | query | "pending" | "machine" | "review" | "approved" | "rejected" | "human_edited" | "stale" | لا | default "review" |
cursor | query | string | null | لا | max length 200 |
limit | query | integer | لا | default 50 · min 1 · max 200 |
الردود
- 200Successful Response
Page_TranslationItem_
POST
/v1/translate/review/bulkTranslate Review Bulk
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
جسم الطلب application/json BulkReview
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
ids | string[] | نعم | |
action | "approve" | "reject" | نعم |
الردود
- 200Successful Response
BulkReviewResult
POST
/v1/translate/review/{translation_id}Approve, reject or edit one translation (edit = human_edited, never overwritten)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
translation_id | path | string | نعم |
جسم الطلب application/json ReviewDecision
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
action | "approve" | "reject" | "edit" | نعم | |
text | string | null | لا | Required for edit; marks it human_edited.max length 20000 |
الردود
- 200Successful Response
TranslationItem
GET
/v1/translate/exportExport approved translations as CSV or SQL (for stores without write-back)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
format | query | "csv" | "sql_opencart" | "json" | لا | default "csv" |
target_locale | query | string | لا | A tenant locale, e.g. ar. · default "ar" · pattern ^[a-z]{2}$ |
الردود
- 200Successful Response
string
GET
/v1/translate/approvedApproved translations to write into the store (store modules poll this)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
For modules without a pull API (OpenCart, WooCommerce, Magento). Secret key. Returns rows approved or human-edited since the cursor, oldest first. After writing them, call POST /v1/translate/ack.
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
locale | query | string | نعم | A tenant locale, e.g. ar. · pattern ^[a-z]{2}$ |
since | query | string | null | لا | next_cursor from the last call · max length 200 |
limit | query | integer | لا | default 200 · min 1 · max 500 |
الردود
- 200Successful Response
TranslationWritePage
POST
/v1/translate/ackMark translations as written into the store (sets written_back_at)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
جسم الطلب application/json TranslationAck
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
ids | string[] | نعم |
الردود
- 200Successful Response
TranslationAckResult
GET
/v1/translate/glossaryGlossary List
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
cursor | query | string | null | لا | max length 200 |
limit | query | integer | لا | default 200 · min 1 · max 200 |
الردود
- 200Successful Response
Page_GlossaryTermOut_
POST
/v1/translate/glossaryGlossary Create
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
جسم الطلب application/json GlossaryTermIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
source_locale | string | نعم | pattern ^[a-z]{2}$ |
target_locale | string | نعم | pattern ^[a-z]{2}$ |
source_term | string | نعم | max length 300 |
target_term | string | null | لا | max length 300 |
do_not_translate | boolean | لا | default false |
case_sensitive | boolean | لا | default false |
note | string | null | لا | max length 1000 |
الردود
- 201Successful Response
GlossaryTermOut
PUT
/v1/translate/glossary/{term_id}Glossary Update
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
term_id | path | string | نعم |
جسم الطلب application/json GlossaryTermIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
source_locale | string | نعم | pattern ^[a-z]{2}$ |
target_locale | string | نعم | pattern ^[a-z]{2}$ |
source_term | string | نعم | max length 300 |
target_term | string | null | لا | max length 300 |
do_not_translate | boolean | لا | default false |
case_sensitive | boolean | لا | default false |
note | string | null | لا | max length 1000 |
الردود
- 200Successful Response
GlossaryTermOut
DELETE
/v1/translate/glossary/{term_id}Glossary Delete
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
term_id | path | string | نعم |
الردود
- 200Successful Response
Deleted
أشكال البيانات في هذه الصفحة
BackfillRequest
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
target_locale | string | لا | default "ar" · pattern ^[a-z]{2}$ |
fields | "name" | "description" | "category" | "attribute_name" | "attribute_value"[] | لا | |
scope | "all" | "missing" | "stale" | لا | default "missing" |
product_ids | string[] | null | لا | |
review_top_n | integer | لا | Also send the top N products to the review queue.default 0 · min 0 · max 5000 |
dry_run | boolean | لا | Only estimate count and cost.default false |
BackfillEstimate
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
products | integer | نعم | |
fields | integer | نعم | |
estimated_cost_usd | string | نعم | |
job | Job | null | لا |
Job
A row of the shared `jobs` table. Poll GET /v1/jobs/{id} until status is terminal.
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | |
kind | "reindex" | "import" | "sync" | "translate_backfill" | "translate_writeback" | "export" | "data_export" | "data_delete" | "embed" | "synonym_mining" | نعم | |
status | "queued" | "running" | "succeeded" | "failed" | "canceled" | نعم | |
progress | number | لا | default 0 · min 0 · max 1 |
created_at | string (date-time) | نعم | |
started_at | string (date-time) | null | لا | |
finished_at | string (date-time) | null | لا | |
result | object | null | لا | |
error | string | null | لا |
TranslationStatusOut
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
target_locale | string | نعم | |
total_fields | integer | نعم | |
by_status | map<string, integer> | نعم | |
human_edited | integer | نعم | |
cost_month_usd | string | نعم | |
watch_enabled | boolean | نعم | |
running_job | Job | null | لا |
Page_TranslationItem_
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
data | TranslationItem[] | نعم | |
next_cursor | string | null | لا | |
total | integer | null | لا | Present when cheap to count. |
TranslationItem
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | |
product_id | string | نعم | |
field | "name" | "description" | "category" | "attribute_name" | "attribute_value" | نعم | |
field_key | string | لا | |
source_locale | string | نعم | |
target_locale | string | نعم | |
source_text | string | نعم | |
translated_text | string | null | نعم | |
ai_translated | boolean | نعم | |
status | "pending" | "machine" | "review" | "approved" | "rejected" | "human_edited" | "stale" | نعم | |
quality_score | number | null | لا | |
quality_notes | object | لا | e.g. brand/model/spec kept checks |
updated_at | string (date-time) | نعم |
BulkReview
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
ids | string[] | نعم | |
action | "approve" | "reject" | نعم |
BulkReviewResult
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
updated | integer | نعم | |
skipped | integer | نعم |
ReviewDecision
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
action | "approve" | "reject" | "edit" | نعم | |
text | string | null | لا | Required for edit; marks it human_edited.max length 20000 |
TranslationWritePage
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
data | TranslationWriteItem[] | نعم | |
next_cursor | string | null | لا | Pass back as ?since= next time (store it). |
TranslationWriteItem
An approved translation for a store module to write into the store (ADR 0012, write-back).
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | Send it back in POST /v1/translate/ack after writing. |
product_id | string | نعم | |
field | "name" | "description" | "category" | نعم | |
field_key | string | لا | Category id for field=category. |
locale | string | نعم | |
text | string | نعم | |
source_hash | string | نعم | |
status | "approved" | "human_edited" | نعم | |
updated_at | string (date-time) | نعم |
TranslationAck
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
ids | string[] | نعم |
TranslationAckResult
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
updated | integer | نعم |
Page_GlossaryTermOut_
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
data | GlossaryTermOut[] | نعم | |
next_cursor | string | null | لا | |
total | integer | null | لا | Present when cheap to count. |
GlossaryTermOut
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
source_locale | string | نعم | pattern ^[a-z]{2}$ |
target_locale | string | نعم | pattern ^[a-z]{2}$ |
source_term | string | نعم | max length 300 |
target_term | string | null | لا | max length 300 |
do_not_translate | boolean | لا | default false |
case_sensitive | boolean | لا | default false |
note | string | null | لا | max length 1000 |
id | string | نعم | |
created_at | string (date-time) | نعم |
GlossaryTermIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
source_locale | string | نعم | pattern ^[a-z]{2}$ |
target_locale | string | نعم | pattern ^[a-z]{2}$ |
source_term | string | نعم | max length 300 |
target_term | string | null | لا | max length 300 |
do_not_translate | boolean | لا | default false |
case_sensitive | boolean | لا | default false |
note | string | null | لا | max length 1000 |
Deleted
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
deleted | boolean | لا | default true |
id | string | نعم |