Submit a translation request

Endpoint for sending a translation request

This endpoint allows a translation request to be sent to the Ovesio system. You can send multiple texts in a single request, each with its own keys and contexts, and the translation can be done simultaneously in several languages.

Endpoint URL

https://api.ovesio.com/v1/translate/request

Method

POST

Data format

application/json

Example JSON request

{
  "from": "en",
  "to": ["fr", "de"],
  "conditions": {
    "de": "fr"
  },
  "use_existing_translation": true,
  "delta_mode": false,
  "workflow": 1,
  "callback_url": "https://example.com/api/callback",
  "data": [
    {
      "ref": "product-123",
      "content": [
        {
          "key": "title",
          "value": "Gaming Laptop ASUS ROG"
        },
        {
          "key": "description",
          "value": "High-performance laptop for gaming",
          "context": "Specificații produs"
        }
      ]
    }
  ]
}

Application parameters

Parameter Type Required Description
from string yes Source language. If it is not known, it can be omitted (AUTO).
delta_mode Boolean not Turn on callback only if the translation is different from the previous one.
Workflow integer not The ID of the desired workflow.
use_existing_translation Boolean not If false, forces the retranslation even if the text already exists in the system.
to Array yes Target languages (e.g. ["fr", "de"]).
Conditions Object not Allows defining intermediate languages in chain translations (e.g. {"de": "fr"}).
callback_url string not The URL to which the translation results will be sent via POST.
date Array yes Texts to be translated.


Field structure data

RequiredTypeField Description
Ref string not Unique identifier (e.g. product ID, item, etc.).
Content Array yes List of texts, each with its own value and optional key and context.


Field structure content

RequiredTypeField Description
key string not Text tag (e.g., title, description etc.).
Value string yes The actual text to be translated.
context string not Semantic context for the translation (e.g. "product category").


Possible answers

Successful response (HTTP 200)

{
  "success": true,
  "data": [
    {
      "id": 320126,
      "ref": "product-123"
    }
  ]
}

Confirm that the application has been accepted and the translation process has been initiated. You can use id it to check the status later.

Error response (HTTP 400 or other ≠ 200 code)

{
  "success": false,
  "errors": {
    "invalid_data": "Invalid format detected"
  }
}

This structure indicates that the request was invalid, and the errors field will contain specific details about the issue encountered.

Integration examples

You can check out examples of integration available on the official GitHub Ovesio page.