Versions Compared

Key

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

To add one or more files to an existing Codyt project.

Based on the project settings, the operation initiates translation workflows by saving files to the project, marking them online, conducting pre-translation and word count, and creating and assigning jobs.

URL

Code Block
(PUTPOST) /api/projects/{pid}/workflows/new

...

files

An array containing one or more records, each describing a file to be uploaded. These records include a unique token referencing the uploaded file. For 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 “title” (name).

Example:

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

object[], Optional

maxFilesInJob

This parameter is applicable only to Standard projects, with a default value of 100. The maximum is 1000.

It is designed for scenarios involving the submission of a large number of files. The system will group the files into jobs, ensuring that no single job contains more than the specified number of files. If the total exceeds this limit, multiple jobs and workflows will be created automatically.

Note: For Codyt jobs, this parameter is not applicable, as Codyt always creates one workflow per file.

int, Optional

callbackurl
callback

Specify a URL which will be called upon success or failure of operation. This makes polling for operation status unnecessary. See Callbacks (with asynchronous operations)

Optional

...