API Zadania Tłumaczenia
Popraw tłumaczenie
Prześlij rewizję przetłumaczonych tekstów w zadaniu z opcją regeneracji tłumaczeń.
- Pełny adres
- https://otranslator.com/api/v1/translation/updateTexts
- Uwierzytelnienie
- Należy przekazać API Key w nagłówku żądania Authorization
- Content-Type
- application/json
- Nieprawidłowy format
- { "error": "Invalid API key." }
Uwagi
revisedTexts zostanie zapisany w pamięci podręcznej tłumaczeń zadania, służącej do przechowywania ręcznie poprawionych tłumaczeń.
Gdy startTranslation ma wartość true, po zapisaniu rewizji ponownie uruchomi się przetwarzanie zadania.
Przykład
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}'Parametry żądania
| Parametry | Typ | Domyślny | Opis | Przykład |
|---|---|---|---|---|
| *taskId | String | - | ID zadania tłumaczenia | - |
| *revisedTexts | JSON | - | Poprawione tłumaczenie | - |
| startTranslation | Boolean | false | Czy ponownie wygenerować tłumaczenie | - |
Odpowiedź
| Parametry | Typ | Domyślny | Opis | Przykład |
|---|---|---|---|---|
| success | Boolean | - | Czy aktualizacja powiodła się | - |
Typowe błędy
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.