Direktori dokumen

API Tugas Terjemahan

Revisi Terjemahan

POST/v1/translation/updateTexts

Kirim revisi untuk teks yang diterjemahkan dalam suatu tugas, dengan opsi untuk menghasilkan ulang terjemahan.

Alamat lengkap
https://dltranslator.com/api/v1/translation/updateTexts
Autentikasi
Perlu menyertakan API Key di header permintaan Authorization
Content-Type
application/json
Format error
{ "error": "Invalid API key." }

Hal-hal yang Perlu Diperhatikan

revisedTexts akan ditulis ke dalam cache terjemahan tugas, digunakan untuk menyimpan terjemahan yang direvisi secara manual.

Ketika startTranslation bernilai true, akan memicu ulang pemrosesan tugas setelah menyimpan revisi.

Contoh

curl
1curl -X POST 'https://dltranslator.com/api/v1/translation/updateTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5  "taskId": "[string]",
6  "revisedTexts": {
7    "key": "value"
8  }
9}'

Parameter Permintaan

ParameterJenisBawaanDeskripsiContoh
*taskIdString-

ID tugas penerjemahan

-
*revisedTextsJSON-

Terjemahan yang telah direvisi

-
startTranslationBooleanfalse

Apakah menghasilkan ulang terjemahan

-

Respons

ParameterJenisBawaanDeskripsiContoh
successBoolean-

Apakah pembaruan berhasil

-

Kesalahan Umum

401 Missing API key.

The Authorization request header is required.

401 Invalid API key.

The API key does not exist, has been deleted, or is no longer valid.

400 Missing required parameter: taskId.

Provide the taskId returned by the create translation task API.

404 Task not found.

The task does not exist, has been deleted, does not belong to the current API account, or was not created through the API.

409 Task is processing. Try again after it finishes.

revisedTexts cannot be updated while the task is processing.

API Tugas Terjemahan
Mengambil hasil terjemahan
API Tugas Terjemahan
Memulai ulang tugas terjemahan