API Zadania Tłumaczenia
Pobierz tłumaczenie
Uzyskaj odpowiadające sobie teksty źródłowe i tłumaczenia wyodrębnione przez system, zwracane w formacie JSON
- Pełny adres
- https://dltranslator.com/api/v1/translation/queryTexts
- Uwierzytelnienie
- Należy przekazać API Key w nagłówku żądania Authorization
- Content-Type
- application/json
- Nieprawidłowy format
- { "error": "Invalid API key." }
Uwagi
Ten interfejs zwraca ustrukturyzowany tekst z pamięci podręcznej tłumaczeń, nadaje się do rewizji tłumaczeń, wtórnego przetwarzania lub synchronizacji z systemem biznesowym.
Jeśli zadanie nie wygenerowało jeszcze cache tekstu, texts i revisedTexts zwrócą puste obiekty.
Przykład
1curl -X POST 'https://dltranslator.com/api/v1/translation/queryTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "taskId": "[string]"
6}'Parametry żądania
| Parametry | Typ | Domyślny | Opis | Przykład |
|---|---|---|---|---|
| *taskId | String | - | ID zadania tłumaczenia | - |
Odpowiedź
| Parametry | Typ | Domyślny | Opis | Przykład |
|---|---|---|---|---|
| taskId | String | - | ID zadania tłumaczenia | - |
| texts | JSON | - | JSON odpowiadający tekstowi oryginalnemu i tłumaczeniu | - |
| revisedTexts | JSON | - | Poprawiony tekst oryginalny i tłumaczenie | - |
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.