Introduction to the Language I/O Direct API
What is the Language I/O API and what is it for?
The Language I/O API allows you to configure custom connections between your CRM or platform and Language I/O services. A typical example would be if the CRM that you use is not supported by any of the Language I/O plugins, or you want to connect internal tools for internal translation needs.
Authentication
subject to change
[You must have valid credentials with Language I/O to use the Language I/O API. Contact your Language I/O Customer Success Manager to receive your API username and password if you do not have them.]
API Requests
The base URL for the Language I/O API is https://golinguist.com/linguistnow/resources/
.
The Language I/O API allows you to detect the language of a piece of content, retrieve a list of languages, or translate a piece of content to one or several languages. The endpoints available for consumptions are the following:
The API supports POST and GET requests (for more information, see the endpoint pages). Here is an example of sending an API request using CURL:
curl \
-u "johndoe" \
-H "Content-Type:application/json" -X POST \
-d '{"translationType": "machine", "text": "Hola"}' \
https://golinguist.com/linguistnow/resources/locale/detectLocale/
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. Comment puis-je vous aider ?",
"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.