API 1.0 / Orders

POST /orders/:identifier/documents

Add document to an order

This method has the URL https://api.toptranslation.com/v1/orders/:identifier/documents and adds a new document to an order.

Required arguments

access_token
Token to authenticate a user.
String
identifier
Unique identifier of the order.
String
document_store_id
Document store ID retrieved from uploading the document to DocumentStore.
String
document_token
Document token retrieved from uploading the document to DocumentStore.
String
source_locale_code
Source locale code of the document
String
target_locale_codes
List of target locale codes seperated by commas.
String

Optional arguments

name
Name of the document.
String

Response

Returns an array of documents. Documents have translations which can be downloaded via the download translation endpoint . While the translation is in progress filename, filesize and mime_type of the translation might be null.

{
   "meta":{
      "status":{
         "code":201
      }
   },
   "data":{
       "identifier":"54314c1a-0146-4f59-bf76-2734dae0dc1c",
       "progress_in_percent":null,
       "name":"Test.docx",
       "path":null,
       "has_missing_strings":false,
       "words":0,
       "segments":null,
       "updated_at":"2017-03-17T15:46:32.000+01:00",
       "created_at":"2017-03-17T15:46:32.000+01:00",
       "default_parser":null,
       "translations":[
          {
             "identifier":"7fc84548-9b19-4478-a97e-6d4a6b004a95",
             "filename":"Test.docx",
             "filesize":144778,
             "mime_type":"application/text",
             "updated_at":"2017-03-17T15:46:37.000+01:00",
             "created_at":"2017-03-17T15:46:32.000+01:00",
             "progress_in_percent":null,
             "version":1,
             "words":null,
             "segments":null,
             "md5_checksum":null,
             "sha1":"fce8a5be414e92b7e6a66a5b3b0a00a17c7b0f89",
             "segments_sha1":null,
             "locale":{
                "code":"en",
                "name":"English",
                "progress":null
             },
             "reference_documents":[

             ],
             "downloadable":true,
             "is_source_translation":true
          },
          {
             "identifier":"28573224-16e8-42d4-afc1-5574ffc8c852",
             "filename":null,
             "filesize":null,
             "mime_type":null,
             "updated_at":"2017-03-17T15:46:33.000+01:00",
             "created_at":"2017-03-17T15:46:33.000+01:00",
             "progress_in_percent":null,
             "version":1,
             "words":null,
             "segments":null,
             "md5_checksum":null,
             "sha1":null,
             "segments_sha1":null,
             "locale":{
                "code":"pl",
                "name":"Polish",
                "progress":null
             },
             "reference_documents":[

             ],
             "downloadable":false,
             "is_source_translation":false
          }
       ],
       "project":null
    }
}

Errors

403 - User not authenticated
User is not allowed to access the resource or execute the method.
404 - Order not found
Order was not found or is not shared with user
404 - Locale not found
Given source or target locale was not found.