Uploading
URL: /segments/remote_upload
Post Data: session_id, original_lang, target_lang, auto_trans, filename
session_id
The unique key returned in the initial login call.
original_lang
API version 2 now allows the original_lang to be specified as text such as 'en-us'. Languages unknown to the server are automatically added. The lang_code of the original language. See Supported Languages for details of how to obtain a catalogue of lang_codes understood by the system.
target_lang
API version 2 now allows the original_lang to be specified as text such as 'en-us'. Languages unknown to the server are automatically added. The lang_code of the translation language. See Supported Languages for details of how to obtain a catalogue of lang_codes understood by the system.
auto_trans
Set to True to signal that the PDF is to be auto-translated. You then need to call remote_auto_trans instead of remote_export2 to begin the translation process.
filename
The contents of the PDF sent as a multi-part post.
Returns
On failure the HTTP status code will be set:
- 200 - OK.
- 429 : if the PDF is encrypted. The system will not process secure PDFs - they must be unlocked before uploading.
- Any other value - error. See text returned with the error for more details.
JSON Data
On success, a JSON structure containing details of the PDF which must be stored for future reference.
The JSON structure will contain amongst other things, the target_lang_id field plus additional keys detailing any fees due before processing can begin.
target_ lang_id
This is a unique ID to the uploaded document and must be used in all subsequent references to the document. Use this ID in the next call to process the PDF.