Translation Task API
Revise translation
Submit revision for translated texts in a task, with option to regenerate translations.
- Complete Address
- https://deploy-demo.otranslator.com/api/v1/translation/updateTexts
- Authentication
- API Key needs to be passed in the Authorization request header
- Content-Type
- application/json
- Error Format
- { "error": "Invalid API key." }
Notes
revisedTexts will be written to the task translation cache, used to save manually revised translations.
When startTranslation is true, task processing will be retriggered after saving revisions.
Example
1curl -X POST 'https://deploy-demo.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}'Request Parameters
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| Required: taskId | String | - | Translation Task ID | - |
| Required: revisedTexts | JSON | - | Revised translation | - |
| startTranslation | Boolean | false | Whether to regenerate translations | - |
Response
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| success | Boolean | - | Whether update was successful | - |
Common Errors
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.