API - IT - Submit New Request

This method permits to submit a new translation request.

URL

(POST) /api/it/requests?token=&filename=&src=&trg=&option=&foption=&hash=&compress=deflate


PARAMETERS

Parameters are:

token

The session token obtained when connecting.

filename

Mandatory.

The name of the file. Make sure to include the file extension.

If you send body text or selections, you can choose body.html or body.txt depending on whether the content is html or raw text, respectively.

Note: You can send multiple requests using the same file name. Requests are not identified by the file name but a unique request ID.

option

Mandatory. The translation option. See api/configuration.

srcMandatory. The source language code. Make sure to only use source languages according to the configuration.
trgMandatory. The target language code. Make sure to only use target languages according to the configuration.
foption

Mandatory. The file format option. See api/configuration.

hash

Mandatory. A unique ID defined by you, used to avoid the duplication of the requests.

compressOptional. The compression library to use to decompress the streamed file. GZip or Deflate (default)
MESSAGE BODY

Add the GZip/Deflate compressed binary content of the file to the message body.

Set content type to "Stream", such as in: Content-Type: Stream

Do not use multi-part MIME contents as this is not supported by the Beebox.

In Postman, you would set this option to specify the file:

In C# you would use the DeflateStream class to compress the file. See sample code.



RESULTS

The method returns a JSON object:

id

The ID assigned to the newly submitted request.


An HTTP status of 200 indicates success. Other HTTP status values indicate an error.

You can now poll the API in regular intervals to see when the translation is done and can be downloaded. See API - IT - List Requests


EXAMPLE

The method may return:

{
	"id": 3772
}


REMARKS

Uploading big files may take some time.

Use asynchronous upload mechanisms if you want to display an upload progress status.



Copyright Wordbee - Buzzin' Outside the Box since 2008