Introduction to the Language IO API
What is the Language IO API and what is it for?
The Language IO API allows you to configure custom connections between your CRM or platform and Language IO services. A typical example would be if the CRM that you use is not supported by any of the Language IO plugins, or you want to connect internal tools for internal translation needs.
API Requests
The base URL for the Language IO API is https://agw.golinguist.com/linguistnow/resources/
.
The Language IO API allows you to detect the language of a piece of content or translate a piece of content to one or several languages. The endpoints available for consumptions are the following:
Supported request procedures include cURL, Postman, and python or javascript libraries. The payload format is JSON. Here is an example of sending an API request using cURL:
curl \
-H "Content-Type:application/json" -X POST \ -d '{"sourceContent": "Hola", "sourceLocale": "es-es", "targetLocale": "fr-fr", "contentTypeName": "api", "translationType": "machine", "textType": "text"}' \ https://agw.golinguist.com/linguistnow/resources/translate/
API Responses
The response format for all requests is a JSON object. The HTTP status code shows if a request succeeds or not. A 200 status code means success. Any other code means a failure occurred.
Example of a successful request:
HTTP/1.1 200 OK
{
"rnResponseProjectId": "123456",
"statusMessage": "Machine translation complete",
"translatedText": "Bonjour",
"translationId": 4994,
"wordCount": 6
}
Example of a failed request:
HTTP/1.1 400 Bad Request
{
"error":{
"userMessage":"We were unable to detect the language of the message.",
"id":501,
"message": "ERROR: The translation request was missing the source language and we were unable to detect it. Please contact support@languageio.com with error code 501:1588195898167"
}
}
Comments
0 comments
Please sign in to leave a comment.