NAV
http python

Introduction

This is the API documentation of 24translate - TDS Translation Distribution System. This tool provides an extensive API for connecting any type of software such as:

The API calls are REST compliant and use the following HTTP methods:

The main entities of the API as well as its properties and endpoints are all documented in the API reference.

Getting Started

Send requests to the API

All HTTP-requests sent to the server should have HTTP-header Authorization: Bearer, see Authentication guide. Most of our API endpoints expect parameters such as orderNumber or documentId in URL path and/or in request body as JSON. Most endpoints will provide a response in JSON format.

import requests
import json

url='https://api.24translate.ch/api/order'
order_info={
    "sourceLanguage": "en-US",
    "targetLanguage": "de-DE",
    "productName": "mycompany_good",
    "specialisationCode": "mycompany_pr"
}
# auth_hook hook defined in Authentication guide.
r = requests.post(url, json = order_info, auth=auth_hook)
orderNumber=json.loads(r.text).get('orderNumber')

To use the API, it is required to send HTTP requests to the API endpoints and process the responses.

In order to use our API, you need access information provided by us: customer_uuid and secret_api_token. You can generate an authentication token as described in Authentication guide. For every HTTP-request, it is necessary to put the generated token in the Authorization: Bearer {generated-token} HTTP-header.

Authentication guide

from requests.auth import AuthBase
import jwt
import datetime


class ApiAuth(AuthBase):
    def __init__(self, customer_uuid, secret_api_token):
        self.customer_uuid = customer_uuid
        self.secret_api_token = secret_api_token

    def encode_auth_token(self):
        payload = {
            'exp': datetime.datetime.utcnow() + datetime.timedelta(days=0, seconds=1000),
            'iat': datetime.datetime.utcnow(),
            'sub': self.customer_uuid
        }
        return jwt.encode(
            payload,
            self.secret_api_token,
            algorithm='HS256'
        )


    def __call__(self, r):
        r.headers['Authorization'] = 'Bearer ' + self.encode_auth_token().decode("utf-8")
        return r

auth_hook=ApiAuth(customer_uuid='21a9ddbb-3b8a-4ed3-84c7-4c7ba061189e', secret_api_token='6e3780b4-b820-4669-af3e-9171c4157c7e')

The API can only be used by registered 24translate customers who have been provided with a customer_uuid and secret_api_token.

Your account manager can provide you with the following information necessary to generate JWT tokens:

Our API uses JWT (JSON Web Token) for authentication with HMAC SHA-256 (HS256) as cryptographic algorithm. Algorithms HS384 and HS512 are also supported. The Bearer token for every HTTP request sent to our API endpoints should be generated by the customer using payload as described below and using provided secret_api_token as the secret token. See an example in Python.

The Payload has the following attributes:

For each API request, please use the header 'Authorization' with the value 'Bearer' along with the encoded token. For example: Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8

The following example shows a request to create an initial order:

POST /api/order HTTP/1.1
Accept: */*
Connection: keep-alive
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8

{"sourceLanguage": "en-US", "targetLanguage": "de-DE", "productName": "mycompany_quick", "specialisationCode": "mycompany_pr"}

The server will respond with a status code 201, the location of the status page, and the generated orderNumber in JSON format:

HTTP/1.1 201 Created
Location: https://api.24translate.ch/api/order/CHS-1003334
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 03 Sep 2020 07:52:23 GMT
Server: 24t
{"orderNumber":"CHS-1003334"}

Example order workflow

The API guide lists all necessary and optional steps to create a translation order. The steps are listed in chronological order for each variant. For more details on objects, properties and endpoints, please refer to the relevant documentation.

1. Create an initial order

For each request you have to place the generated JWT Token in the HTTP-header 'Authorization: Bearer', for more details see documentation: Authentication guide.

POST /api/order HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8

{
  "sourceLanguage": "de-DE",
  "targetLanguage": "fr-FR",
  "specialisationCode": "customer_marketing",
  "productName": "customer_good",
  "deliveryMode": "_48_HOURS",
}
To view the examples 
please switch to the 
code examples in http.

Request

Create an initial order by providing the required information for your translation. POST request for the endpoint /order. Insert the order request parameters in the request body.

HTTP/1.1 201 Created
Location: https://api.24translate.ch/api/order/CHS-1003334
Content-Type: application/json;charset=UTF-8
{
    "orderNumber": "CHS-1003334"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
{"items":[{"statusCode":130,"statusType":"INVALID_TARGET_LANGUAGE","statusMessage":"targetLanguage: INVALID"}]}
To view the examples 
please switch to the 
code examples in http.

Response

ResponseCode: 201

The Response is a OrderResponse. Please remember the orderNumber. You will need it to reference your order throughout the process.

ResponseCode: 400

The Response is a StatusItems if an order cannot be created due to validation errors. Please correct the input and try again.

For more details, please refer to the documentation: POST /order

2. Add source documents to your order

POST /api/order/CHS-1003334/sourceDocument HTTP/1.1
Content-Length: 194
Content-Type: multipart/form-data; boundary=ea68e150b02947e0ab250a9edcc10ec6
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjY2MDgsImlhdCI6MTU5OTEyNTYwOCwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.SLfqwAbLlhOUojS2kt0bTuo_2e4gshC84DdXIILpvbI
--ea68e150b02947e0ab250a9edcc10ec6\r\nContent-Disposition: form-data; name="file"; filename="words8.txt"\r\n\r\nword1 word2 word3 word4 word5 word6 word7 word8 \r\n--ea68e150b02947e0ab250a9edcc10ec6--

Request

Next, you need to upload the documents to be translated. We support different file types such as docx, xliff, ... . If you want to upload more than one document, please use one POST requests for each document.

Create a POST request for the endpoint /order/{orderNumber}/sourceDocument. Add the source document in the body.

HTTP/1.1 200 OK
{
  "documentId": 456,
  "filename": "document.doc",
  "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
  "filesize": 194
}
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 200

The Response is a SourceDocumentResponse. Please remember the documentId as you will need it as a reference for other requests. We use md5Checksum to validate if the upload was successful.

For more details, please refer to the documentation: POST /order/{orderNumber}/sourceDocument

3. Get order status

GET /api/order/CHS-1003334/status HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8
To view the examples 
please switch to the 
code examples in http.

Request

Create a GET status request if you wish to get a status information for your order. Execute a GET request to the endpoint /order/{orderNumber}/status.

HTTP/1.1 200 OK
"VALID"
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 200

The response is a string OrderStatus. We check all the uploaded documents for structural errors. If everything is ok, you will get the response VALID and can commit your order. Repeat the request in regular intervals (5-30-600sec) until its response is either VALID or INVALID.

For more details on the workflow status, please refer to the documentation: Workflow of the order

For more details, please refer to the documentation: GET /order/{orderNumber}/status

4. Get a quote

GET /api/order/CHS-1003334/quote HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8
To view the examples 
please switch to the 
code examples in http.

Request

Once you uploaded all the documents to be translated and if the status of your order is VALID, you can then ask for a quote.

To get a quote for your order, please create a GET /api/order/CHS-1003334/quote request.

HTTP/1.1 200 OK
{
  "currency": "EUR",
  "grossAmount": 143.20,
  "minimumPrice": true,
  "netAmount": 123.45,
  "taxAmount": 19.75,
  "taxRate": 16,
  "totalDiscountPercent": 23.45,
  "volume": 40,
  "volumeType": "LINE"
}
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 200

You will receive a response of type QuoteResponse with all quote details such as prices and the total volume of the documents.

For more details, please refer to the documentation: GET /order/{orderNumber}/quote

5. Transfer the order request into an order

PUT /api/order/CHS-1003334/place HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8
To view the examples 
please switch to the 
code examples in http.

Request

Once you uploaded all the documents to be translated, and the initial order information is ready, you can transfer the order request into an actual order. As soon as this is done, we will start to work on your documents. The order status now changes into WORKING. The status will change into DELIVERED if the translated documents are ready to be downloaded. It is not possible to PUT an order into this state more than once.

By sending this request, you agree to be charged for the order.

Execute a PUT request on the endpoint /order/{orderNumber}/place.

HTTP/1.1 201 Created
{
  "orderNumber": "CHS-1003334"
}
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 200, 201

The response code 201 means that the order has been placed successfully.

The response code 200 means that the order has already been placed before this request was sent. The response is a OrderResponse

For more details, please refer to the documentation: PUT /order/{orderNumber}/place

6. (for testing) Get delivery immediatly

POST /api/order/CHS-1003334/deliverImmediately HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8
To view the examples 
please switch to the 
code examples in http.

Request

In our test environment we have provided a function to help you test faster by emulating translation of documents. To get your translation immediatly after a /order/place call the /order/{orderNumber}/deliverImmediately. The order will then change to status DELIVERED and you can proceed to the next step order/{orderNumber}/targetDocuments.

Execute a POST request to the endpoint /order/{orderNumber}/deliverImmediately.

HTTP/1.1 201 OK
Location: https://api.24translate.ch/api/order/CHS-1003334/targetDocuments
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 201

The responsecode 201 signals that everything has worked. Continue with the steps GET /order/{orderNumber}/status or GET /order/{orderNumber}/targetDocuments

For more details, please refer to the documentation: POST /order/{orderNumber}/deliverImmediately

7. Get order status by orderNumber until the order is delivered

GET /api/order/CHS-1003334/status HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8
To view the examples 
please switch to the 
code examples in http.

Request

You can monitor the status of the order.

Execute a GET request on the endpoint /order/{orderNumber}/status.

HTTP/1.1 200 OK
"DELIVERED"
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 200

The response is a string OrderStatus.

If the translation of the documents is finished, the status response will be set to DELIVERED which means the documents are ready to be picked up. Repeat the request in regular intervals until the order status is DELIVERED.

For more details on the workflow status, please refer to the documentation: Workflow of the order

For more details, please refer to the documentation: GET /order/{orderNumber}/status

8. Get a list of target documents

GET /api/order/CHS-1003334/targetDocuments HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8
To view the examples 
please switch to the 
code examples in http.

Request

In order to download the translated documents, you first need to get a list of the target documents. Execute a GET request on the endpoint /order/{orderNumber}/targetDocuments.

HTTP/1.1 200 OK
{
    "items": [
        {
            "documentId": 223658,
            "filename": "words8_DE.txt",
            "filesize": 52,
            "uri": "https://api.24translate.ch/api/order/CHS-1003334/targetDocument/223658/content"
        }
    ]
}
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 200

The response is a JSON Array with TargetDocumentResponses. For each target document the response contains an uri that can be used to download the translated document.

For more details, please refer to the documentation: GET /order/{orderNumber}/targetDocuments

9. Download translated documents

With the target document uris from the previous step you can download the translated document. It is possible to build the uri manually by applying the orderNumber and the documentId:

GET /api/order/CHS-1003334/targetDocument/223658/content HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjAzNDUsImlhdCI6MTU5OTExOTM0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.PCZbNg26V8o4cbhSAX08XGciF59_ykuGttkO-9a1Ia8
To view the examples 
please switch to the 
code examples in http.

Request

Execute a GET request for the endpoint /order/{orderNumber}/targetDocument/{documentId}/content.

HTTP/1.1 200 OK
Content-disposition: attachment; filename="words8_DE.txt";
Content-Type: text/plain;charset=UTF-8
Content-Length: 52

"This is your translated text"
To view the examples 
please switch to the 
code examples in http.

Response

Responsecode: 200

The Response is a string with the content of the translated document.

For more details, please refer to the documentation: GET /order/{orderNumber}/targetDocument/{documentId}/content

Workflow of the order

When an order is created, an order status is created along with it. This status changes in the process of the order steps. Initially, a new order has the status DOCUMENTS_MISSING and a delivered order has the status DELIVERED.

The order status can be called regularly via the request GET /status.

All status states are shown in the following flow chart: Order workflow

Special Parameters

There are a few input parameters in the API that are handled specially and require static values. These values are described in the following section. Most of these values are configured specifically for each customer company. If you want your companys configuration changed, contact your account manager. For each of these parameters exists an API endpoint returning the valid values configured for your company.

Language Code

In the GET /api/order request you have to set your sourceLanguage and targetLanguage. The format for these values is mostly BCP-47 code. We support many languages and language combinations. However, there are also a few that we cannot offer. For specific questions about exotic languages and language combinations, please contact your account manager.

To view all the valid values for you, use the GET endpoints /list/sourceLanguages and /list/targetLanguages.

Here some example language codes: de-DE en-EN fr-FR it-IT de-CH

POST /api/order HTTP/1.1
Content-Type: application/json
{
...
  "sourceLanguage": "de-DE",
  "targetLanguage": "fr-FR",
...
}
To view the examples 
please switch to the 
code examples in http.

For more details, please refer to the documentation: OrderRequest:Language

Specialisation of an order

In the GET /api/order request you have to set the specialisationCode of the documents. The information provided by the specialisation is used to ensure the best quality of the translation. With our customers, we discuss what is the right choice of specialisation and define corresponding values which are specified here in the attribute. Please talk to your account manager about specialisationCode.

To view all the valid values for you, use the GET endpoint /list/specialisations.

POST /api/order HTTP/1.1
Content-Type: application/json
{
...
  "specialisationCode": "customer_marketing",
...
}
To view the examples 
please switch to the 
code examples in http.

For more details, please refer to the documentation: OrderRequest:specialisationCode

productName

In the GET /api/order request you have to set a productName, which refers to the services i.e. order types that we offer. We have different products that define the service and quality of the order. These are e.g. 'translation and correction'. Please choose the productName that matches your requirements. In order to best meet our customers' requirements, we define customer-specific products. Please contact your account manager to discuss the appropriate products and ask for your productName(s).

To view all the valid values for you, use the GET endpoints /list/products.

POST /api/order HTTP/1.1
Content-Type: application/json
{
  "productName": "customer_good",
}
To view the examples 
please switch to the 
code examples in http.

For more details, please refer to the documentation: OrderRequest:productName The name of the translation product.

deliveryMode

In the GET /api/order request you have to set a deliveryMode, which refers to the delivery time.

To view all the valid values, use the GET endpoints /list/deliveryModes.

POST /api/order HTTP/1.1
Content-Type: application/json
{
  "deliveryMode": "_48_HOURS",
}
To view the examples 
please switch to the 
code examples in http.

For more details, please refer to the documentation: OrderRequest:deliveryMode The name of the deliveryMode.

API Reference

24translate TDS API

Version: v0.9.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

Email: Support

API Reference: order

Can trigger every task in the order lifecycle. An order can be created as an enquiry, which is basically an order in states DOCUMENTS_MISSING, CHECKING, INVALID, VALID.

POST /order

Create an initial order without source documents.

Code samples


POST /order HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Content-Type: application/json
Accept: application/json


import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.24translate.ch/api/order', headers = headers)

print(r.json())

Creates a unique order with a unique ID. This ID is used as reference for any further operations. Upload files with POST /order/{orderNumber}/sourceDocument

Body parameter

{
  "sourceLanguage": "en-US",
  "targetLanguage": "de-DE",
  "specialisationCode": "mycompany_marketing",
  "productName": "mycompany_good",
  "desiredDeliveryTime": "2016-01-01T12:00:00+01:00",
  "deliveryMode": "EXPRESS",
  "specialFields": [
    {
      "key": "costCentre",
      "value": "CC-12345"
    }
  ]
}

Parameters

Name In Type Required Description
body body OrderRequest true Initial order request with mandatory attributes such as source language and target language.

Example responses

201 Response

{
  "orderNumber": "CHS-1003334"
}

Responses

Status Meaning Description Schema
201 Created The order has been created OrderResponse
400 Bad Request Invalid order input data. The body contains a list of validation errors. StatusItems
401 Unauthorized Auth failed StatusItems

Response Schema

Status Code 201: OrderResponse

Name Type Required Description.
» orderNumber OrderNumber true Order number for reference.

Status Code 400: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

GET /order/{orderNumber}

Get quote+status+info by orderNumber

Code samples


GET /order/{orderNumber} HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/order/{orderNumber}', headers = headers)

print(r.json())

Returns the quote for an order as the price with detailed information.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

200 Response

{
  "status": "VALID",
  "quote": {
    "currency": "EUR",
    "grossAmount": 143.2,
    "minimumPrice": true,
    "netAmount": 123.45,
    "taxAmount": 19.75,
    "taxRate": 16,
    "totalDiscountPercent": 23.45,
    "volume": 0,
    "volumeType": "LINE"
  },
  "info": {
    "attributes": {
      "sourceLanguage": "en-US",
      "targetLanguage": "de-DE",
      "specialisationCode": "mycompany_marketing",
      "productName": "mycompany_good",
      "desiredDeliveryTime": "2016-01-01T12:00:00+01:00",
      "deliveryMode": "EXPRESS",
      "specialFields": [
        {
          "key": "costCentre",
          "value": "CC-12345"
        }
      ]
    },
    "estimatedDeliveryTime": "2016-01-01T12:00:00+01:00",
    "actualDeliveryTime": "2016-01-01T11:59:00+01:00"
  }
}

Responses

Status Meaning Description Schema
200 OK Quote data OrderFullInfo
401 Unauthorized Auth error StatusItems
404 Not Found The orderNumber doesn't exist StatusItems

Response Schema

Status Code 200: OrderFullInfo

Name Type Required Description.
» status OrderStatus false Once you create an order, it will be in state DOCUMENTS_MISSING. You need to upload sourceDocuments in order to reach status VALID, after which you can place an an order and will transition to WORKING and later DELIVERED once targetDocuments are ready to be downloaded.
» quote QuoteResponse false none
»» currency string true The currency of the price.
»» grossAmount number(double) true The gross amount of the offer.
»» minimumPrice boolean true If 'true', this is a minimum price.
»» netAmount number(double) true The net amount of the offer.
»» taxAmount number(double) true The total tax amount, depending on both the net and gross amount.
»» taxRate number(double) true The tax rate of the offer price.
»» totalDiscountPercent number(double) true The price discount in percent based on the CAT analysis result and the customer tm discount settings.
»» volume integer(int32) false Volume of all documents.
»» volumeType string false TBD
» info OrderInfo false Represents information about the order.
»» attributes OrderRequest false none
»»» sourceLanguage string true The BCP-47 code of the source language.
»»» targetLanguage string true The BCP-47 code of the target language.
»»» specialisationCode string true The specialisation of the source text. Please contact your account manager for valid inputs.
»»» productName string true The name of the translation product. Please contact your account manager for valid input values.
»»» desiredDeliveryTime string true The date and time of the desired delivery as a ISO 8601 compliant string.
»»» deliveryMode string false Delivery mode.
»»» specialFields [SpecialField] false [Special fields are used to add customer-specific attributes to an order, for example costCentre.]
»»»» key string false none
»»»» value string false none
»» estimatedDeliveryTime string false The date and time of the estimated delivery as a ISO 8601 compliant string.
»» actualDeliveryTime string false The date and time of the actual delivery as a ISO 8601 compliant string.

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

DELETE /order/{orderNumber}

Delete an order before it has been placed.

Code samples


DELETE /order/{orderNumber} HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.24translate.ch/api/order/{orderNumber}', headers = headers)

print(r.json())

Deletes an order by orderNumber. This can only be done if the order hasn't been placed yet.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

401 Response

{
  "items": [
    {
      "statusCode": 1999,
      "statusType": "OTHER",
      "statusMessage": "Details about the error"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK, the requested order has been deleted. None
401 Unauthorized Auth error StatusItems
404 Not Found The orderNumber doesn't exist StatusItems
412 Precondition Failed Forbidden - the status of the order is not VALID, CHECKING, INVALID or DOCUMENTS_MISSING. It is not possible to delete an order once it has been placed. StatusItems

Response Schema

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

PATCH /order/{orderNumber}

Modify order data.

Code samples


PATCH /order/{orderNumber} HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Content-Type: application/json
Accept: application/json


import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.24translate.ch/api/order/{orderNumber}', headers = headers)

print(r.json())

Modify the basic order information.

Body parameter

{
  "sourceLanguage": "en-US",
  "targetLanguage": "de-DE",
  "specialisationCode": "mycompany_marketing",
  "productName": "mycompany_good",
  "desiredDeliveryTime": "2016-01-01T12:00:00+01:00",
  "deliveryMode": "EXPRESS",
  "specialFields": [
    {
      "key": "costCentre",
      "value": "CC-12345"
    }
  ]
}

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.
body body OrderRequest true Order request with basic information for an order.

Example responses

201 Response

{
  "orderNumber": "CHS-1003334"
}

Responses

Status Meaning Description Schema
200 OK OK None
201 Created The order is patched OrderResponse
400 Bad Request Invalid order input data. The body contains a list of validation errors. StatusItems
401 Unauthorized Auth failed StatusItems

Response Schema

Status Code 201: OrderResponse

Name Type Required Description.
» orderNumber OrderNumber true Order number for reference.

Status Code 400: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

POST /order/{orderNumber}/sourceDocument

Add a source document to an order

Code samples


POST /order/CHS-1003334/sourceDocument HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Content-Type: multipart/form-data; boundary=6308f7b26cf95f88b92efa9b627007a8
--6308f7b26cf95f88b92efa9b627007a8
Content-Disposition: form-data; name="md5Checksum"

157220d547d9045e3a0daa0d14665f8f
--6308f7b26cf95f88b92efa9b627007a8
Content-Disposition: form-data; name="file"; filename="document.doc"
binaryData
--6308f7b26cf95f88b92efa9b627007a8--


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g'
}

files = {'file': open('document.doc','rb')}
r = requests.post('https://api.24translate.ch/api/order/CHS-1003334/sourceDocument', headers = headers, data={'md5Checksum':'25912deacc5d55528e223ec7b99705cc'}, files=files)

print(r.json())

Upload a source document to be translated. You can upload one or more files with each post request. You may also send a md5 checksum to ensure correct file transfer. The status of the order must be INVALID, DOCUMENTS_MISSING, CHECKING or VALID. The file size is limited to 100 MB.

Body parameter

file: string
md5Checksum: string

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.
body body object false none
» file body string(binary) true file
» md5Checksum body string false The md5 checksum of the file.

Example responses

200 Response

{
  "documentId": 182704,
  "filename": "document.doc",
  "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
  "filesize": 456383
}

Responses

Status Meaning Description Schema
200 OK The document metadata of the added document SourceDocumentResponse
400 Bad Request Document content is not readable or the md5 checksum failed. None
401 Unauthorized Auth error StatusItems
404 Not Found The orderNumber doesn't exist StatusItems
410 Gone The order has been deleted StatusItems
412 Precondition Failed Forbidden - the status of the order is not DOCUMENTS_MISSING, INVALID, VALID or CHECKING. StatusItems
413 Payload Too Large The file size limit is exceeded. We support files up to 100 MB max. StatusItems
415 Unsupported Media Type Unsupported file type. StatusItems

Response Schema

Status Code 200: SourceDocumentResponse

Name Type Required Description.
» documentId DocumentId(int32) true Document ID for reference.
» filename string true The filename of the document.
» md5Checksum string true The md5 checksum of the document.
» filesize integer(int32) true The filesize of the document in byte.

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 410: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 413: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 415: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

DELETE /order/{orderNumber}/sourceDocument/{documentId}

Delete a source document by orderNumber and documentId

Code samples


DELETE /order/{orderNumber}/sourceDocument/{documentId} HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.24translate.ch/api/order/{orderNumber}/sourceDocument/{documentId}', headers = headers)

print(r.json())

Deletes a source document from an order. The status of the order must be DOCUMENTS_MISSING, INVALID, VALID or CHECKING.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.
documentId path DocumentId true documentId

Example responses

401 Response

{
  "items": [
    {
      "statusCode": 1999,
      "statusType": "OTHER",
      "statusMessage": "Details about the error"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK None
401 Unauthorized Auth error StatusItems
404 Not Found The requested source document doesn't exist StatusItems
410 Gone The order has been deleted StatusItems
412 Precondition Failed Forbidden - the status of the order is not DOCUMENTS_MISSING, INVALID, VALID or CHECKING. StatusItems

Response Schema

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 410: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

GET /order/{orderNumber}/sourceDocuments

Get a list of source documents for an order

Code samples


GET /order/{orderNumber}/sourceDocuments HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/order/{orderNumber}/sourceDocuments', headers = headers)

print(r.json())

Returns a list of all the source documents referring to a given orderNumber.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

200 Response

{
  "items": [
    {
      "documentId": 182704,
      "filename": "document.doc",
      "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
      "filesize": 456383
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of source documents SourceDocumentResponses
204 No Content No source documents have yet been uploaded to this order. None
401 Unauthorized Auth error StatusItems
404 Not Found The orderNumber doesn't exist StatusItems
410 Gone The order has been deleted StatusItems

Response Schema

Status Code 200: SourceDocumentResponses

Name Type Required Description.
» items [allOf] false none
»» documentId DocumentId(int32) true Document ID for reference.
»» filename string true The filename of the document.
»» md5Checksum string true The md5 checksum of the document.
»» filesize integer(int32) true The filesize of the document in byte.

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 410: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

POST /order/{orderNumber}/deliverImmediately

Deliver the order immediately (test-only).

Code samples


POST /order/{orderNumber}/deliverImmediately HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.24translate.ch/api/order/{orderNumber}/deliverImmediately', headers = headers)

print(r.json())

To be used in test environments only. Deliver the order immediately so that you can download target documents. The response includes HTTP-header Location with the URL of the targetDocuments endpoint.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

401 Response

{
  "items": [
    {
      "statusCode": 1999,
      "statusType": "OTHER",
      "statusMessage": "Details about the error"
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created OK with Location to targetDocuemtns. None
401 Unauthorized Auth error StatusItems
403 Forbidden Operation cannot be used in production environment. StatusItems
404 Not Found The orderNumber doesn't exist StatusItems
412 Precondition Failed Forbidden - the status of the order is not WORKING. It is not possible to deliver immediately if the order has not been placed yet or has already been delivered. StatusItems

Response Schema

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 403: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

GET /order/{orderNumber}/status

Get order status by orderNumber

Code samples


GET /order/{orderNumber}/status HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/order/{orderNumber}/status', headers = headers)

print(r.json())

Returns the status of the order

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

200 Response

"VALID"

Responses

Status Meaning Description Schema
200 OK Returns the status of the order. OrderStatus
401 Unauthorized Auth error StatusItems
404 Not Found The orderNumber doesn't exist StatusItems
410 Gone The order has been deleted StatusItems

Response Schema

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 410: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

GET /order/{orderNumber}/quote

Get quote by orderNumber

Code samples


GET /order/{orderNumber}/quote HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/order/{orderNumber}/quote', headers = headers)

print(r.json())

Returns the quote for an order as the price with detailed information. The order status must be VALID.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The order ID is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

200 Response

{
  "currency": "EUR",
  "grossAmount": 143.2,
  "minimumPrice": true,
  "netAmount": 123.45,
  "taxAmount": 19.75,
  "taxRate": 16,
  "totalDiscountPercent": 23.45,
  "volume": 0,
  "volumeType": "LINE"
}

Responses

Status Meaning Description Schema
200 OK Quote data QuoteResponse
401 Unauthorized Auth error StatusItems
404 Not Found The orderNumber doesn't exist StatusItems
412 Precondition Failed The order isn't ready yet - its status must be VALID StatusItems

Response Schema

Status Code 200: QuoteResponse

Name Type Required Description.
» currency string true The currency of the price.
» grossAmount number(double) true The gross amount of the offer.
» minimumPrice boolean true If 'true', this is a minimum price.
» netAmount number(double) true The net amount of the offer.
» taxAmount number(double) true The total tax amount, depending on both the net and gross amount.
» taxRate number(double) true The tax rate of the offer price.
» totalDiscountPercent number(double) true The price discount in percent based on the CAT analysis result and the customer tm discount settings.
» volume integer(int32) false Volume of all documents.
» volumeType string false TBD

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

GET /order/{orderNumber}/info

Get info by orderNumber

Code samples


GET /order/{orderNumber}/info HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/order/{orderNumber}/info', headers = headers)

print(r.json())

Returns detailed order information. The order status must be beyond INITIAL.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The order ID is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

200 Response

{
  "attributes": {
    "sourceLanguage": "en-US",
    "targetLanguage": "de-DE",
    "specialisationCode": "mycompany_marketing",
    "productName": "mycompany_good",
    "desiredDeliveryTime": "2016-01-01T12:00:00+01:00",
    "deliveryMode": "EXPRESS",
    "specialFields": [
      {
        "key": "costCentre",
        "value": "CC-12345"
      }
    ]
  },
  "estimatedDeliveryTime": "2016-01-01T12:00:00+01:00",
  "actualDeliveryTime": "2016-01-01T11:59:00+01:00"
}

Responses

Status Meaning Description Schema
200 OK Order information OrderInfo
401 Unauthorized Auth error StatusItems
404 Not Found The orderNumber doesn't exist StatusItems
412 Precondition Failed The order isn't ready yet - its status is INITIAL StatusItems

Response Schema

Status Code 200: OrderInfo

Represents information about the order.

Name Type Required Description.
» attributes OrderRequest false none
»» sourceLanguage string true The BCP-47 code of the source language.
»» targetLanguage string true The BCP-47 code of the target language.
»» specialisationCode string true The specialisation of the source text. Please contact your account manager for valid inputs.
»» productName string true The name of the translation product. Please contact your account manager for valid input values.
»» desiredDeliveryTime string true The date and time of the desired delivery as a ISO 8601 compliant string.
»» deliveryMode string false Delivery mode.
»» specialFields [SpecialField] false [Special fields are used to add customer-specific attributes to an order, for example costCentre.]
»»» key string false none
»»» value string false none
» estimatedDeliveryTime string false The date and time of the estimated delivery as a ISO 8601 compliant string.
» actualDeliveryTime string false The date and time of the actual delivery as a ISO 8601 compliant string.

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

PUT /order/{orderNumber}/place

Transfer the order request into an order

Code samples


PUT /order/{orderNumber}/place HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.24translate.ch/api/order/{orderNumber}/place', headers = headers)

print(r.json())

Transfer the order request into an order. The order status must be VALID.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

200 Response

{
  "orderNumber": "CHS-1003334"
}

Responses

Status Meaning Description Schema
200 OK The order has already been placed. The body contains the order response. OrderResponse
201 Created The order has been placed. The body contains the order response. OrderResponse
401 Unauthorized Auth error StatusItems
410 Gone The order has been deleted. StatusItems
412 Precondition Failed Precondition failed. The order status must be VALID. StatusItems
500 Internal Server Error Internal error placing the order StatusItems

Response Schema

Status Code 200: OrderResponse

Name Type Required Description.
» orderNumber OrderNumber true Order number for reference.

Status Code 201: OrderResponse

Name Type Required Description.
» orderNumber OrderNumber true Order number for reference.

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 410: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 500: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

GET /order/{orderNumber}/targetDocuments

Get a list of target documents for an order

Code samples


GET /order/{orderNumber}/targetDocuments HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/order/{orderNumber}/targetDocuments', headers = headers)

print(r.json())

Returns a list of all the target documents referring to a given orderNumber. The order status must be DELIVERED.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.

Example responses

200 Response

{
  "items": [
    {
      "documentId": 182704,
      "filename": "document.doc",
      "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
      "filesize": 456383,
      "uri": "https://api.24translate.ch/api/order/127770/targetDocument/223658/content"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of target documents TargetDocumentResponses
401 Unauthorized Auth Error StatusItems
410 Gone The order has been deleted StatusItems
412 Precondition Failed Forbidden - the status of the order is not DELIVERED StatusItems

Response Schema

Status Code 200: TargetDocumentResponses

Name Type Required Description.
» items [allOf] false none

allOf

Name Type Required Description.
»» anonymous DocumentResponse false none
»»» documentId DocumentId(int32) true Document ID for reference.
»»» filename string true The filename of the document.
»»» md5Checksum string true The md5 checksum of the document.
»»» filesize integer(int32) true The filesize of the document in byte.

and

Name Type Required Description.
»» anonymous object false none
»»» uri string true Uri to download the translated file.

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 410: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

GET /order/{orderNumber}/targetDocument/{documentId}/content

Handles a document download request

Code samples


GET /order/{orderNumber}/targetDocument/{documentId}/content HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: */*


import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/order/{orderNumber}/targetDocument/{documentId}/content', headers = headers)

print(r.json())

Download the translated document. The status of the order must be DELIVERED.

Parameters

Name In Type Required Description
orderNumber path OrderNumber true The orderNumber is a unique reference for the order request. Use POST /order to create an orderNumber.
documentId path DocumentId true The documentId is a unique reference for the document.

Example responses

200 Response

401 Response

{
  "items": [
    {
      "statusCode": 1999,
      "statusType": "OTHER",
      "statusMessage": "Details about the error"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Content of the translated document. Please use http-headers Content-Type. string
401 Unauthorized Auth Error StatusItems
404 Not Found The document could not be found StatusItems
410 Gone The order has been deleted StatusItems
412 Precondition Failed Forbidden - the status of the order is not DELIVERED StatusItems
500 Internal Server Error Internal error reading the document content StatusItems

Response Schema

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 410: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 412: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 500: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

API Reference: list

GET /list/products

List all valid products for a customer

Code samples


GET /list/products HTTP/1.1
Host: api.24translate.ch
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTkxMjg3NDUsImlhdCI6MTU5OTEyNzc0NSwic3ViIjoiMjFhOWRkYmItM2I4YS00ZWQzLTg0YzctNGM3YmEwNjExODllIn0.xGjsZc1uu9HbumD9PcRmcjHKJenb2AQgBRLZL8xI79g
Accept: application/json


import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.24translate.ch/api/list/products', headers = headers)

print(r.json())

List all valid products for the customer identified by the authentication. The product code can be useed in the POST /order request.

Example responses

200 Response

{
  "items": [
    {
      "code": "qs_good",
      "description": "24translate \"good\""
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List products ListItems
401 Unauthorized Auth error StatusItems
404 Not Found No products found StatusItems

Response Schema

Status Code 200: ListItems

Collection of list items.

Name Type Required Description.
» items [ListItem] false none
»» code string false none
»» description string false none

Status Code 401: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Status Code 404: StatusItems

Collection of status items.

Name Type Required Description.
» items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]
»» statusCode integer false none
»» statusType string false none
»» statusMessage string false none

Schemas

OrderRequest

{
  "sourceLanguage": "en-US",
  "targetLanguage": "de-DE",
  "specialisationCode": "mycompany_marketing",
  "productName": "mycompany_good",
  "desiredDeliveryTime": "2016-01-01T12:00:00+01:00",
  "deliveryMode": "EXPRESS",
  "specialFields": [
    {
      "key": "costCentre",
      "value": "CC-12345"
    }
  ]
}

Properties

Name Type Required Description
sourceLanguage string true The BCP-47 code of the source language.
targetLanguage string true The BCP-47 code of the target language.
specialisationCode string true The specialisation of the source text. Please contact your account manager for valid inputs.
productName string true The name of the translation product. Please contact your account manager for valid input values.
desiredDeliveryTime string true The date and time of the desired delivery as a ISO 8601 compliant string.
deliveryMode string false Delivery mode.
specialFields [SpecialField] false [Special fields are used to add customer-specific attributes to an order, for example costCentre.]

Enumerated Values

Property Value
deliveryMode EXPRESS
deliveryMode _24_HOURS
deliveryMode _48_HOURS
deliveryMode _3_TO_5_DAYS

OrderInfo

{
  "attributes": {
    "sourceLanguage": "en-US",
    "targetLanguage": "de-DE",
    "specialisationCode": "mycompany_marketing",
    "productName": "mycompany_good",
    "desiredDeliveryTime": "2016-01-01T12:00:00+01:00",
    "deliveryMode": "EXPRESS",
    "specialFields": [
      {
        "key": "costCentre",
        "value": "CC-12345"
      }
    ]
  },
  "estimatedDeliveryTime": "2016-01-01T12:00:00+01:00",
  "actualDeliveryTime": "2016-01-01T11:59:00+01:00"
}

Represents information about the order.

Properties

Name Type Required Description
attributes OrderRequest false none
estimatedDeliveryTime string false The date and time of the estimated delivery as a ISO 8601 compliant string.
actualDeliveryTime string false The date and time of the actual delivery as a ISO 8601 compliant string.

OrderStatus

"VALID"

Once you create an order, it will be in state DOCUMENTS_MISSING. You need to upload sourceDocuments in order to reach status VALID, after which you can place an an order and will transition to WORKING and later DELIVERED once targetDocuments are ready to be downloaded.

Properties

Name Type Required Description
anonymous string false Once you create an order, it will be in state DOCUMENTS_MISSING. You need to upload sourceDocuments in order to reach status VALID, after which you can place an an order and will transition to WORKING and later DELIVERED once targetDocuments are ready to be downloaded.

Enumerated Values

Value
DOCUMENTS_MISSING
CHECKING
VALID
INVALID
REJECTED
WORKING
DELIVERED
ARCHIVED

OrderFullInfo

{
  "status": "VALID",
  "quote": {
    "currency": "EUR",
    "grossAmount": 143.2,
    "minimumPrice": true,
    "netAmount": 123.45,
    "taxAmount": 19.75,
    "taxRate": 16,
    "totalDiscountPercent": 23.45,
    "volume": 0,
    "volumeType": "LINE"
  },
  "info": {
    "attributes": {
      "sourceLanguage": "en-US",
      "targetLanguage": "de-DE",
      "specialisationCode": "mycompany_marketing",
      "productName": "mycompany_good",
      "desiredDeliveryTime": "2016-01-01T12:00:00+01:00",
      "deliveryMode": "EXPRESS",
      "specialFields": [
        {
          "key": "costCentre",
          "value": "CC-12345"
        }
      ]
    },
    "estimatedDeliveryTime": "2016-01-01T12:00:00+01:00",
    "actualDeliveryTime": "2016-01-01T11:59:00+01:00"
  }
}

Properties

Name Type Required Description
status OrderStatus false Once you create an order, it will be in state DOCUMENTS_MISSING. You need to upload sourceDocuments in order to reach status VALID, after which you can place an an order and will transition to WORKING and later DELIVERED once targetDocuments are ready to be downloaded.
quote QuoteResponse false none
info OrderInfo false Represents information about the order.

DocumentResponse

{
  "documentId": 182704,
  "filename": "document.doc",
  "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
  "filesize": 456383
}

Properties

Name Type Required Description
documentId DocumentId true Document ID for reference.
filename string true The filename of the document.
md5Checksum string true The md5 checksum of the document.
filesize integer(int32) true The filesize of the document in byte.

SourceDocumentResponse

{
  "documentId": 182704,
  "filename": "document.doc",
  "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
  "filesize": 456383
}

Properties

None

SourceDocumentResponses

{
  "items": [
    {
      "documentId": 182704,
      "filename": "document.doc",
      "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
      "filesize": 456383
    }
  ]
}

Properties

Name Type Required Description
items [SourceDocumentResponse] false none

TargetDocumentResponse

{
  "documentId": 182704,
  "filename": "document.doc",
  "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
  "filesize": 456383,
  "uri": "https://api.24translate.ch/api/order/127770/targetDocument/223658/content"
}

Properties

allOf

Name Type Required Description
anonymous DocumentResponse false none

and

Name Type Required Description
anonymous object false none
» uri string true Uri to download the translated file.

TargetDocumentResponses

{
  "items": [
    {
      "documentId": 182704,
      "filename": "document.doc",
      "md5Checksum": "25912deacc5d55528e223ec7b99705cc",
      "filesize": 456383,
      "uri": "https://api.24translate.ch/api/order/127770/targetDocument/223658/content"
    }
  ]
}

Properties

Name Type Required Description
items [TargetDocumentResponse] false none

QuoteResponse

{
  "currency": "EUR",
  "grossAmount": 143.2,
  "minimumPrice": true,
  "netAmount": 123.45,
  "taxAmount": 19.75,
  "taxRate": 16,
  "totalDiscountPercent": 23.45,
  "volume": 0,
  "volumeType": "LINE"
}

Properties

Name Type Required Description
currency string true The currency of the price.
grossAmount number(double) true The gross amount of the offer.
minimumPrice boolean true If 'true', this is a minimum price.
netAmount number(double) true The net amount of the offer.
taxAmount number(double) true The total tax amount, depending on both the net and gross amount.
taxRate number(double) true The tax rate of the offer price.
totalDiscountPercent number(double) true The price discount in percent based on the CAT analysis result and the customer tm discount settings.
volume integer(int32) false Volume of all documents.
volumeType string false TBD

Enumerated Values

Property Value
volumeType LINE
volumeType WORD
volumeType PAGE
volumeType CHARACTER

OrderResponse

{
  "orderNumber": "CHS-1003334"
}

Properties

Name Type Required Description
orderNumber OrderNumber true Order number for reference.

StatusItem

{
  "statusCode": 1999,
  "statusType": "OTHER",
  "statusMessage": "Details about the error"
}

A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.

Properties

Name Type Required Description
statusCode integer false none
statusType string false none
statusMessage string false none

Enumerated Values

Property Value
statusType EMPTY_SOURCE_LANGUAGE
statusType EMPTY_PRODUCT
statusType EMPTY_TARGET_LANGUAGE
statusType EMPTY_SPECIALISATION
statusType INVALID_SOURCE_LANGUAGE
statusType INVALID_TARGET_LANGUAGE
statusType INVALID_LANGUAGE_COMBINATION
statusType INVALID_SPECIALISATION
statusType INVALID_DELIVERY_TIME
statusType INVALID_DELIVERY_TIME_FORMAT
statusType INVALID_DELIVERY_MODE
statusType INVALID_PRODUCT
statusType INVALID_SECURITY_LEVEL
statusType UPLOAD_SOURCE_DOCUMENT_FAILED
statusType OTHER
statusType LIST_NO_PRODUCTS

StatusItems

{
  "items": [
    {
      "statusCode": 1999,
      "statusType": "OTHER",
      "statusMessage": "Details about the error"
    }
  ]
}

Collection of status items.

Properties

Name Type Required Description
items [StatusItem] false [A status item represents an error message or any other status, about which the user should know. statusType can be considered as a limited set of messages, with multiple statusCodes used under the same statusType and statusMessage provides details in a natural language.]

ListItem

{
  "code": "qs_good",
  "description": "24translate \"good\""
}

Properties

Name Type Required Description
code string false none
description string false none

ListItems

{
  "items": [
    {
      "code": "qs_good",
      "description": "24translate \"good\""
    }
  ]
}

Collection of list items.

Properties

Name Type Required Description
items [ListItem] false none

SpecialField

{
  "key": "costCentre",
  "value": "CC-12345"
}

Special fields are used to add customer-specific attributes to an order, for example costCentre.

Properties

Name Type Required Description
key string false none
value string false none

OrderNumber

"CHS-1003334"

Order number for reference.

Properties

Name Type Required Description
anonymous string false Order number for reference.

DocumentId

182704

Document ID for reference.

Properties

Name Type Required Description
anonymous integer(int32) false Document ID for reference.