翻訳タスクAPI
翻訳文の修正
POST/v1/translation/updateTexts
タスク内の翻訳テキストの修正を提出し、翻訳を再生成するオプション付き。
- 完全な住所
- https://dltranslator.com/api/v1/translation/updateTexts
- 認証
- Authorizationリクエストヘッダーに API Key を渡す必要があります
- Content-Type
- application/json
- 誤った形式
- { "error": "Invalid API key." }
注意事項
revisedTexts はタスク翻訳キャッシュに書き込まれ、手動で修正された訳文を保存するために使用されます。
startTranslation が true の場合、リビジョンの保存後にタスクの処理を再実行します。
例
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}'リクエストパラメータ
| パラメータ | タイプ | デフォルト | 説明 | 例 |
|---|---|---|---|---|
| *taskId | String | - | 翻訳タスクID | - |
| *revisedTexts | JSON | - | 修正済みの翻訳文 | - |
| startTranslation | Boolean | false | 翻訳文を再生成するかどうか | - |
レスポンス
| パラメータ | タイプ | デフォルト | 説明 | 例 |
|---|---|---|---|---|
| success | Boolean | - | 更新が成功したかどうか | - |
よくあるエラー
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.