Directorul documentului

API Sarcină de Traducere

Obținerea traducerii

POST/v1/translation/queryTexts

Obțineți textul original și traducerea extrase de sistem, returnate în format JSON

Adresă completă
https://otranslator.com/api/v1/translation/queryTexts
Autentificare
Este necesar să transmiteți API Key în headerul de cerere Authorization
Content-Type
application/json
Format greșit
{ "error": "Invalid API key." }

Precauții

Această interfață returnează textul structurat din cache-ul de traducere, fiind potrivită pentru revizuirea traducerii, procesare secundară sau sincronizare cu sistemul de business.

Dacă task-ul nu a generat încă cache text, texts și revisedTexts vor returna obiecte goale.

Exemplu

curl
1curl -X POST 'https://otranslator.com/api/v1/translation/queryTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5  "taskId": "[string]"
6}'

Parametrii de Cerere

ParametriTipImplicitDescriereExemplu
*taskIdString-

ID-ul sarcinii de traducere

-

Răspuns

ParametriTipImplicitDescriereExemplu
taskIdString-

ID-ul sarcinii de traducere

-
textsJSON-

JSON corespunzător textului original și traducerii

-
revisedTextsJSON-

Textul original și traducerea revizuite

-

Erori frecvente

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.

API Sarcină de Traducere
Ștergere sarcină de traducere
API Sarcină de Traducere
Revizuire traducere