API Tugas Terjemahan
Revisi Terjemahan
Kirim revisi untuk teks yang diterjemahkan dalam suatu tugas, dengan opsi untuk menghasilkan ulang terjemahan.
- Alamat lengkap
- https://otranslator.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
1curl -X POST 'https://otranslator.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
| Parameter | Jenis | Bawaan | Deskripsi | Contoh |
|---|---|---|---|---|
| *taskId | String | - | ID tugas penerjemahan | - |
| *revisedTexts | JSON | - | Terjemahan yang telah direvisi | - |
| startTranslation | Boolean | false | Apakah menghasilkan ulang terjemahan | - |
Respons
| Parameter | Jenis | Bawaan | Deskripsi | Contoh |
|---|---|---|---|---|
| success | Boolean | - | 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.