# deepl_documents.upload_document: DeepL Translating documents with DeepL.
deepl_documents.upload_document: DeepL Translating documents with DeepL.
Uploads a document to be translated.
Documentation
Uploads a document to DeepL for translation and answers the document id and key. The translation runs at DeepL; its status and result are read with DocumentStatusesByDocumentId and DocumentResultsByDocumentId. docx, doc, pptx, xlsx and pdf are billed at least 50 000 characters.Parameters of Procedure
The following parameters can be used to control the behaviour of the procedure `deepl_documents.upload_document`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `begin package.procedure(value1, value2, value3); end` on a procedure with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `begin package.procedure(name1 => value1, name3 => value3); end` on the same procedure will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `file_contents` | `byte[]` | ☑ | | The document to translate. |
| `file_name` | `string` | ☑ | | The file name; its extension tells DeepL the format. |
| `target_lang` | `string` | ☑ | | The language to translate into. |
| `source_lang` | `string` | ☐ | | The language of the document; detected when absent. |
| `output_format` | `string` | ☐ | | The extension of the format of the result, such as docx. |
| `formality` | `string` | ☐ | | default, more, less, prefer_more or prefer_less. |
| `glossary_id` | `string` | ☐ | | The glossary to apply; requires source_lang. |
| `glossary_ids` | `string` | ☐ | | Comma-separated list of up to 5 glossaries. |
| `style_id` | `string` | ☐ | | The style rule list to apply. |
| `translation_memory_id` | `string` | ☐ | | The translation memory to apply. |
| `translation_memory_threshold` | `int32` | ☐ | | Minimum matching percentage of a translation memory segment. |
| `enable_watermark` | `boolean` | ☐ | | Whether a Translated by DeepL watermark is added; docx and pdf only. |
| `enable_quality_evaluation` | `boolean` | ☐ | | Whether a quality evaluation is made; a beta for select customers. |