Create a Document from a file in any of the formats documented in our knowledge base.
Request parameters should be passed as JSON object with the header field LILT-API
.
File names in the header can only contain US-ASCII characters. File names with characters outside of US-ASCII should be URI encoded or transliterated to US-ASCII strings.
Example CURL command:
curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \
--header "LILT-API: {\"name\": \"introduction.xliff\",\"pretranslate\": \"tm+mt\",\"project_id\": 9}" \
--header "Content-Type: application/octet-stream" \
--data-binary @Introduction.xliff
A file name.
A unique Project identifier.
An optional parameter indicating if and how the document will be
pretranslated upon being uploaded.
The accepted values are TM
, or TM+MT
An optional parameter to auto-accept segments with 100% translation
memory matches when the pretranslate
option is also set, or to
auto-accept any target data that is present when the uploaded file
is XLIFF. If omitted it will default to your organization settings for Accept and lock exact matches
,
if set to false
, no segments will be auto-accepted.
An optional parameter to use case sensitive translation memory matching when the pretranslate
option is also enabled. Matches must have identical character-by-character case to qualify as matches.
Default value matches your organization settings for Use case sensitive translation memory matching
setting
An optional parameter to attribute translation authorship of exact matches to the author of the file
when the pretranslate
option is also enabled. Default value matches your organization settings for Translation authorship
setting
An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file.
The file contents to be uploaded. The entire POST body will be treated as the file.
The body is of type file
.
A Document object.
A Document is a collection of zero or more Segments.