Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

files

An array with one or more records, each describing a file to be uploaded. The records include the token referencing an uploaded a file. Example:

Code Block
[
    {
        "token": "77ca3562-ff01f5882dd1",
        "name": "myfolder/myfile.docx"
    }
]

See detailed description further down.

object[], Mandatory

src

The source language code. This must be a valid project language.

string, Mandatory

trgs

The languages to translate to. These must be valid project languages. Example:

Code Block
"trgs": [ "es-ES", "fr-FR" ]

string[], Mandatory

deadline

Optional deadline for completion of work. Deadlines are assigned to the jobs that are created with the workflow. Example:

Code Block
"deadline": "2024-04-03T06:00:00Z"

datetime?, Optional

workflow

Optional, selects "Default" if not specified. Fine-tune how workflows are created:

  • Default : Create jobs according to the project’s Workflow & Suppliers configuration. Recommended value.

  • None : Do not create any jobs.

string, Optional

allowUpdates

Optional. Default is true.

  • true: You are allowed to replace existing files with new versions. In such cases, the file is replaced, a new set of jobs will be created and the new jobs will be assigned to the same workers as before.

  • false: Any attempt to replace an existing file will return an error.

bool?, Optional

jobsCfs

Optional custom fields to assign to all jobs created for a file’s workflow. See Custom Field Collection Record for details. Note: You reference a CF by either its “id” or its “name”.

Example:

Code Block
"fields": [
    {
        "title": "Activity",         "value": "Fulltime"
    },
    {         "id": 4,         "value": "A-221" }    }
  ]

The files array contains one record per file. Properties are:

token

Use API media/upload to upload a file. It returns the token to be included here. Note: The upload of your file or files must be done prior to calling the present method.

string, Mandatory

name

The file name, with or without folders. The file will be stored with this name & folders in the project. Some valid filenames:

Code Block
my-file.docx
marketing/section1/presentation.ppt
]
marketing\\section1\\presentation.ppt
strings.product.json

Note: When using “\” make sure to escape with “\\”. This is not necessary when using the forward “/” as folder separator.

string, Mandatory

Optional parameters

formatId

Optional document format configuration to be used for extracting content from the file. See Document formats to enumerate all existing file formats.

Normally, you do not need to override the defaults: By default, the system selects the filter from the project’s File Filter configuration.

int?, Optional

disableMt

Optional, default is false. If you explicitly want to prevent machine translation when preparing the file, set this property to true. Machine translation is enabled or disabled in the project’s word count profile.

bool, Optional

reference

Optional sender ID for the document. For example, this can hold an identifier you assign to the document outside of Wordbee.

string?, Optional

comments

Optional comments added to the document and shown in the translation editor.

string?, Optional

RESULTS

The result is the updated invoice document.

...