...
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:
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 | ||
attachments | Optional array of files to attach to the document. This can be screenshots, reference material or more. Up to 10 files can be attached. See details below. You can also upload attachments at a later time using Manage attachments | object[]?, Optional |
The optional attachments array contains one record per attachment. 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 attachment file name, with or without folders. | string, Mandatory |
locale | The language code of the attachment. Must be a source or a target language of the present request. | string, Mandatory |
RESULTS
This method is an asynchronous operation: Your request is queued and will execute as soon as possible.
...
Code Block |
---|
{ "trm": { "requestid": 13432, "isbatch": false, "status": "Finished", "statusText": "Finished!" }, "custom": { "files": [ { "name": "file-003.htm", "format": { "formatId": 7952, "formatName": "Default", "formatDomain": "HTML" }, "exists": false, "success": true, "error": null, "did": 288981, "segments": 87, "attachments": 0 } ], "request": { ... } } } |
...
did: The document ID. You will need this number for all subsequent workflow operations related to this document and its workflows (in the different target languages).
name: The name of the document in the project, including any folders.
format: The document format configuration used to extract content from the file. It shows the document format ID (see settings/documentformats/configs/list) , the format configuration name and the type of document (HTML, JSON, XML…).
exists: Indicates if the file did already exist and was replaced with this new version. If you disallowed file version updates (see
allowUpdates
) then the next property will indicate an error.error: Null if success. Otherwise shows the specific error why the file could not be processed. This may have many reasons. For example the file might be invalid.
segments: The number of segments in the file.
attachments: Total number of attachments that could be saved. If a token is invalid, the attachment is disregarded.
The node custom/request
contains your initial payload, including some extra properties.
...