Skip to content

Commit a30470e

Browse files
author
Maxim Brunnmeier
committed
docs(openapi): document style_id, translation_memory_id, and translation_memory_threshold on POST /v2/document
Bring document translation in line with text translation by documenting the new style_id, translation_memory_id, and translation_memory_threshold parameters on POST /v2/document, regenerating openapi.json, and adding a changelog entry.
1 parent 9de77dd commit a30470e

3 files changed

Lines changed: 63 additions & 0 deletions

File tree

api-reference/openapi.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,25 @@
10501050
"file": "@document.docx",
10511051
"glossary_id": "[yourGlossaryId]"
10521052
}
1053+
},
1054+
"StyleRule": {
1055+
"summary": "Using a Style Rule List",
1056+
"value": {
1057+
"source_lang": "EN",
1058+
"target_lang": "DE",
1059+
"file": "@document.docx",
1060+
"style_id": "[yourStyleId]"
1061+
}
1062+
},
1063+
"TranslationMemory": {
1064+
"summary": "Using a Translation Memory",
1065+
"value": {
1066+
"source_lang": "EN",
1067+
"target_lang": "DE",
1068+
"file": "@document.docx",
1069+
"translation_memory_id": "[yourTranslationMemoryId]",
1070+
"translation_memory_threshold": 75
1071+
}
10531072
}
10541073
},
10551074
"schema": {
@@ -1084,6 +1103,17 @@
10841103
"glossary_id": {
10851104
"$ref": "#/components/schemas/GlossaryId"
10861105
},
1106+
"style_id": {
1107+
"description": "Specify the [style rule list](/api-reference/style-rules) to use for the translation.\n\n**Important:** The target language has to match the language of the style rule list.",
1108+
"type": "string",
1109+
"example": "7ff9bfd6-cd85-4190-8503-d6215a321519"
1110+
},
1111+
"translation_memory_id": {
1112+
"$ref": "#/components/schemas/TranslationMemoryId"
1113+
},
1114+
"translation_memory_threshold": {
1115+
"$ref": "#/components/schemas/TranslationMemoryThreshold"
1116+
},
10871117
"enable_beta_languages": {
10881118
"description": "This parameter is maintained for backward compatibility and has no effect.",
10891119
"type": "boolean",

api-reference/openapi.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,21 @@ paths:
787787
target_lang: DE
788788
file: '@document.docx'
789789
glossary_id: '[yourGlossaryId]'
790+
StyleRule:
791+
summary: Using a Style Rule List
792+
value:
793+
source_lang: EN
794+
target_lang: DE
795+
file: '@document.docx'
796+
style_id: '[yourStyleId]'
797+
TranslationMemory:
798+
summary: Using a Translation Memory
799+
value:
800+
source_lang: EN
801+
target_lang: DE
802+
file: '@document.docx'
803+
translation_memory_id: '[yourTranslationMemoryId]'
804+
translation_memory_threshold: 75
790805
schema:
791806
type: object
792807
required:
@@ -823,6 +838,17 @@ paths:
823838
$ref: '#/components/schemas/Formality'
824839
glossary_id:
825840
$ref: '#/components/schemas/GlossaryId'
841+
style_id:
842+
description: |-
843+
Specify the [style rule list](/api-reference/style-rules) to use for the translation.
844+
845+
**Important:** The target language has to match the language of the style rule list.
846+
type: string
847+
example: 7ff9bfd6-cd85-4190-8503-d6215a321519
848+
translation_memory_id:
849+
$ref: '#/components/schemas/TranslationMemoryId'
850+
translation_memory_threshold:
851+
$ref: '#/components/schemas/TranslationMemoryThreshold'
826852
enable_beta_languages:
827853
description: |-
828854
This parameter is maintained for backward compatibility and has no effect.

docs/resources/roadmap-and-release-notes.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ rss: true
1010
- Usage reporting by language pair
1111
</Update>
1212

13+
<Update label="June 2026">
14+
## June 3 - Style Rules and Translation Memories for Document Translation
15+
- [`POST /v2/document`](/api-reference/document/upload-and-translate-a-document) now accepts `style_id`, `translation_memory_id`, and `translation_memory_threshold`, bringing document translation in line with the parameters already available on text translation.
16+
- `style_id` applies a configured [style rule list](/api-reference/style-rules) to the document translation.
17+
- `translation_memory_id` and `translation_memory_threshold` work as on text translation: pass a translation memory ID to apply stored translations, and set a threshold (0-100) to control how closely source text must match a stored segment. See the [translation memories guide](/docs/learning-how-tos/examples-and-guides/how-to-use-translation-memories).
18+
</Update>
19+
1320
<Update label="May 2026">
1421
## May 27 - Custom Reporting Tags in deepl-rb
1522
- The Ruby client library [`deepl-rb`](https://github.com/DeepLcom/deepl-rb) v3.8.0 now accepts an `additional_headers` argument on `translate` calls, so you can send `X-DeepL-Reporting-Tag` for usage reporting.

0 commit comments

Comments
 (0)