API - Send instructions
When you send a file to translate, the Beebox will translate according to the configured workflow and automation. By default, the translation will be into all project target languages.
Next to the source file, you can optionally send JSON formatted "instructions" to the Beebox:
Specify the target languages of translation. For example: Translate file into French only ("fr").
Specify a deadline of translation.
Specify text alignment options in case you also sent the translated file version.
Specify any meta information to include files.
Read: When to use instructions?.
URL
(PUT) /api/files/file?token=&locale=&folder=&filename={source file name}.beebox
Add JSON formatted instructions to the request body. Note that the instructions file is named like the source file name + .beebox at the end.
The API method, parameters, and result is identical to that for sending source files.
Instruction file name and location
The instructions are stored are JSON formatted. Let us suppose the source file is folder\document-200.xml. In that case, the instructions file must be named folder\document-200.xml.beebox . Append “.beebox” to the original file name like in the example below:
To request a translation into one specific target language, send a JSON like below with name "document-200.xml.beebox":
{ "locales": ["es-ES"] }
Use the standard API call to send: /api/files/file?token=...&filename=document-200.xml.beebox&locale=en
Instructions format
Common use cases
Read more about when to use instructions
Please read the use cases. Instructions files are an important tool!
API call sequence
Always send files in this order to the Beebox:
The instructions file, if any
The translated file, if any
The source file
It is important to send the source file at the end or otherwise an automatic Beebox operation might detect and process the source file before you start sending instructions and translations.
CONTENT ENCODING AND CODE PAGES
Serialize JSON to UTF-8 when adding to the HTTP request body.
ADDITIONAL INFORMATION
More information is found at:
Beebox also supports folder level instruction files: