Adresár dokumentov

Translation Task API

Revidovať preklad

POST/v1/translation/updateTexts

Odoslať revíziu preložených textov v úlohe s možnosťou regenerovania prekladov.

Úplná adresa
https://otranslator.com/api/v1/translation/updateTexts
Autentifikácia
Je potrebné poskytnúť API Key v hlavičke požiadavky Authorization
Content-Type
application/json
Chybný formát
{ "error": "Invalid API key." }

Upozornenia

revisedTexts sa zapíšu do prekladovej vyrovnávacej pamäte úlohy, používajú sa na uloženie manuálne upravených prekladov.

Keď je startTranslation nastavené na true, po uložení revízie sa znovu spustí spracovanie úlohy.

Príklad

curl
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}'

Parametre požiadavky

ParametreTypPredvolenéPopisPríklad
*taskIdString-

ID prekladovej úlohy

-
*revisedTextsJSON-

Revidovaný preklad

-
startTranslationBooleanfalse

Znovu vygenerovať preklad

-

Odpoveď

ParametreTypPredvolenéPopisPríklad
successBoolean-

Či bola aktualizácia úspešná

-

Bežné chyby

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.

Translation Task API
Získať preklad