API Attività di Traduzione
Ottieni traduzione
Ottieni il testo originale e la traduzione corrispondente estratti dal sistema, restituiti in formato JSON
- Indirizzo completo
- https://dltranslator.com/api/v1/translation/queryTexts
- Autenticazione
- È necessario passare la API Key nell'intestazione della richiesta Authorization
- Content-Type
- application/json
- Formato errato
- { "error": "Invalid API key." }
Note importanti
Questa interfaccia restituisce il testo strutturato nella cache di traduzione, adatta per revisioni delle traduzioni, elaborazioni secondarie o sincronizzazione con sistemi aziendali.
Se il task non ha ancora generato la cache di testo, texts e revisedTexts restituiranno oggetti vuoti.
Esempio
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}'Parametri della Richiesta
| Parametri | Tipo | Predefinito | Descrizione | Esempio |
|---|---|---|---|---|
| *taskId | String | - | ID dell'attività di traduzione | - |
Risposta
| Parametri | Tipo | Predefinito | Descrizione | Esempio |
|---|---|---|---|---|
| taskId | String | - | ID dell'attività di traduzione | - |
| texts | JSON | - | JSON corrispondente al testo originale e alla traduzione | - |
| revisedTexts | JSON | - | Testo originale e traduzione revisionati | - |
Errori comuni
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.