번역 작업 API
번역문 수정
POST/v1/translation/updateTexts
작업 내 번역된 텍스트에 대한 수정 사항을 제출하며, 번역 재생성 옵션을 제공합니다.
- 전체 주소
- https://otranslator.com/api/v1/translation/updateTexts
- 인증
- Authorization 요청 헤더에 API Key를 전달해야 합니다
- Content-Type
- application/json
- 잘못된 형식
- { "error": "Invalid API key." }
주의사항
revisedTexts는 작업 번역 캐시에 기록되며, 사람이 수정한 번역문을 저장하는 데 사용됩니다.
startTranslation이 true일 때, 수정 저장 후 작업 처리가 다시 트리거됩니다.
예시
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}'요청 매개변수
| 매개변수 | 유형 | 기본값 | 설명 | 예시 |
|---|---|---|---|---|
| *taskId | String | - | 번역 작업 ID | - |
| *revisedTexts | JSON | - | 수정된 번역문 | - |
| startTranslation | Boolean | false | 번역문 재생성 여부 | - |
응답
| 매개변수 | 유형 | 기본값 | 설명 | 예시 |
|---|---|---|---|---|
| success | Boolean | - | 업데이트 성공 여부 | - |
일반적인 오류
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.