Translation
Catalog translation, review queue, glossary.
12 endpoints.
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)
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | null | no | Unique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$ |
Request body application/json BackfillRequest
| Name | Type | Required | Description |
|---|---|---|---|
target_locale | string | no | default "ar" · pattern ^[a-z]{2}$ |
fields | "name" | "description" | "category" | "attribute_name" | "attribute_value"[] | no | |
scope | "all" | "missing" | "stale" | no | default "missing" |
product_ids | string[] | null | no | |
review_top_n | integer | no | Also send the top N products to the review queue.default 0 · min 0 · max 5000 |
dry_run | boolean | no | Only estimate count and cost.default false |
Responses
- 202Successful Response
BackfillEstimate
GET
/v1/translate/statusTranslate Status
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
target_locale | query | string | no | A tenant locale, e.g. ar. · default "ar" · pattern ^[a-z]{2}$ |
Responses
- 200Successful Response
TranslationStatusOut
GET
/v1/translate/reviewReview queue (with source, translation and quality checks)
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | "pending" | "machine" | "review" | "approved" | "rejected" | "human_edited" | "stale" | no | default "review" |
cursor | query | string | null | no | max length 200 |
limit | query | integer | no | default 50 · min 1 · max 200 |
Responses
- 200Successful Response
Page_TranslationItem_
POST
/v1/translate/review/bulkTranslate Review Bulk
Needs a key or a dashboard session
Request body application/json BulkReview
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | yes | |
action | "approve" | "reject" | yes |
Responses
- 200Successful Response
BulkReviewResult
POST
/v1/translate/review/{translation_id}Approve, reject or edit one translation (edit = human_edited, never overwritten)
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
translation_id | path | string | yes |
Request body application/json ReviewDecision
| Name | Type | Required | Description |
|---|---|---|---|
action | "approve" | "reject" | "edit" | yes | |
text | string | null | no | Required for edit; marks it human_edited.max length 20000 |
Responses
- 200Successful Response
TranslationItem
GET
/v1/translate/exportExport approved translations as CSV or SQL (for stores without write-back)
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
format | query | "csv" | "sql_opencart" | "json" | no | default "csv" |
target_locale | query | string | no | A tenant locale, e.g. ar. · default "ar" · pattern ^[a-z]{2}$ |
Responses
- 200Successful Response
string
GET
/v1/translate/approvedApproved translations to write into the store (store modules poll this)
Needs a key or a dashboard session
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.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locale | query | string | yes | A tenant locale, e.g. ar. · pattern ^[a-z]{2}$ |
since | query | string | null | no | next_cursor from the last call · max length 200 |
limit | query | integer | no | default 200 · min 1 · max 500 |
Responses
- 200Successful Response
TranslationWritePage
POST
/v1/translate/ackMark translations as written into the store (sets written_back_at)
Needs a key or a dashboard session
Request body application/json TranslationAck
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | yes |
Responses
- 200Successful Response
TranslationAckResult
GET
/v1/translate/glossaryGlossary List
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string | null | no | max length 200 |
limit | query | integer | no | default 200 · min 1 · max 200 |
Responses
- 200Successful Response
Page_GlossaryTermOut_
POST
/v1/translate/glossaryGlossary Create
Needs a key or a dashboard session
Request body application/json GlossaryTermIn
| Name | Type | Required | Description |
|---|---|---|---|
source_locale | string | yes | pattern ^[a-z]{2}$ |
target_locale | string | yes | pattern ^[a-z]{2}$ |
source_term | string | yes | max length 300 |
target_term | string | null | no | max length 300 |
do_not_translate | boolean | no | default false |
case_sensitive | boolean | no | default false |
note | string | null | no | max length 1000 |
Responses
- 201Successful Response
GlossaryTermOut
PUT
/v1/translate/glossary/{term_id}Glossary Update
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
term_id | path | string | yes |
Request body application/json GlossaryTermIn
| Name | Type | Required | Description |
|---|---|---|---|
source_locale | string | yes | pattern ^[a-z]{2}$ |
target_locale | string | yes | pattern ^[a-z]{2}$ |
source_term | string | yes | max length 300 |
target_term | string | null | no | max length 300 |
do_not_translate | boolean | no | default false |
case_sensitive | boolean | no | default false |
note | string | null | no | max length 1000 |
Responses
- 200Successful Response
GlossaryTermOut
DELETE
/v1/translate/glossary/{term_id}Glossary Delete
Needs a key or a dashboard session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
term_id | path | string | yes |
Responses
- 200Successful Response
Deleted
Data shapes on this page
BackfillRequest
| Name | Type | Required | Description |
|---|---|---|---|
target_locale | string | no | default "ar" · pattern ^[a-z]{2}$ |
fields | "name" | "description" | "category" | "attribute_name" | "attribute_value"[] | no | |
scope | "all" | "missing" | "stale" | no | default "missing" |
product_ids | string[] | null | no | |
review_top_n | integer | no | Also send the top N products to the review queue.default 0 · min 0 · max 5000 |
dry_run | boolean | no | Only estimate count and cost.default false |
BackfillEstimate
| Name | Type | Required | Description |
|---|---|---|---|
products | integer | yes | |
fields | integer | yes | |
estimated_cost_usd | string | yes | |
job | Job | null | no |
Job
A row of the shared `jobs` table. Poll GET /v1/jobs/{id} until status is terminal.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
kind | "reindex" | "import" | "sync" | "translate_backfill" | "translate_writeback" | "export" | "data_export" | "data_delete" | "embed" | "synonym_mining" | yes | |
status | "queued" | "running" | "succeeded" | "failed" | "canceled" | yes | |
progress | number | no | default 0 · min 0 · max 1 |
created_at | string (date-time) | yes | |
started_at | string (date-time) | null | no | |
finished_at | string (date-time) | null | no | |
result | object | null | no | |
error | string | null | no |
TranslationStatusOut
| Name | Type | Required | Description |
|---|---|---|---|
target_locale | string | yes | |
total_fields | integer | yes | |
by_status | map<string, integer> | yes | |
human_edited | integer | yes | |
cost_month_usd | string | yes | |
watch_enabled | boolean | yes | |
running_job | Job | null | no |
Page_TranslationItem_
| Name | Type | Required | Description |
|---|---|---|---|
data | TranslationItem[] | yes | |
next_cursor | string | null | no | |
total | integer | null | no | Present when cheap to count. |
TranslationItem
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
product_id | string | yes | |
field | "name" | "description" | "category" | "attribute_name" | "attribute_value" | yes | |
field_key | string | no | |
source_locale | string | yes | |
target_locale | string | yes | |
source_text | string | yes | |
translated_text | string | null | yes | |
status | "pending" | "machine" | "review" | "approved" | "rejected" | "human_edited" | "stale" | yes | |
quality_score | number | null | no | |
quality_notes | object | no | e.g. brand/model/spec kept checks |
updated_at | string (date-time) | yes |
BulkReview
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | yes | |
action | "approve" | "reject" | yes |
BulkReviewResult
| Name | Type | Required | Description |
|---|---|---|---|
updated | integer | yes | |
skipped | integer | yes |
ReviewDecision
| Name | Type | Required | Description |
|---|---|---|---|
action | "approve" | "reject" | "edit" | yes | |
text | string | null | no | Required for edit; marks it human_edited.max length 20000 |
TranslationWritePage
| Name | Type | Required | Description |
|---|---|---|---|
data | TranslationWriteItem[] | yes | |
next_cursor | string | null | no | 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).
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Send it back in POST /v1/translate/ack after writing. |
product_id | string | yes | |
field | "name" | "description" | "category" | yes | |
field_key | string | no | Category id for field=category. |
locale | string | yes | |
text | string | yes | |
source_hash | string | yes | |
status | "approved" | "human_edited" | yes | |
updated_at | string (date-time) | yes |
TranslationAck
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | yes |
TranslationAckResult
| Name | Type | Required | Description |
|---|---|---|---|
updated | integer | yes |
Page_GlossaryTermOut_
| Name | Type | Required | Description |
|---|---|---|---|
data | GlossaryTermOut[] | yes | |
next_cursor | string | null | no | |
total | integer | null | no | Present when cheap to count. |
GlossaryTermOut
| Name | Type | Required | Description |
|---|---|---|---|
source_locale | string | yes | pattern ^[a-z]{2}$ |
target_locale | string | yes | pattern ^[a-z]{2}$ |
source_term | string | yes | max length 300 |
target_term | string | null | no | max length 300 |
do_not_translate | boolean | no | default false |
case_sensitive | boolean | no | default false |
note | string | null | no | max length 1000 |
id | string | yes | |
created_at | string (date-time) | yes |
GlossaryTermIn
| Name | Type | Required | Description |
|---|---|---|---|
source_locale | string | yes | pattern ^[a-z]{2}$ |
target_locale | string | yes | pattern ^[a-z]{2}$ |
source_term | string | yes | max length 300 |
target_term | string | null | no | max length 300 |
do_not_translate | boolean | no | default false |
case_sensitive | boolean | no | default false |
note | string | null | no | max length 1000 |
Deleted
| Name | Type | Required | Description |
|---|---|---|---|
deleted | boolean | no | default true |
id | string | yes |