Skip to main content

Endpoint

POST /loopos_ai_translator Translates product catalog data (titles, descriptions, options) from a source language to one or more target languages.

Request

source_locale
string
required
Source language locale code (e.g., “en”, “pt”)
target_locale
string
Target language locale code (e.g., “de”, “es”). Use either target_locale or target_locales.
target_locales
array
List of target language locale codes. Use either target_locale or target_locales.
context
string
required
Context of the translation (e.g., “Catalog”, “Product”)
data
object
required
Key-value pairs of text to translate

Response

translations
object
required
Translation response with context and data:
  • context (string): Translation context
  • data (object): Translations by locale, each containing translated key-value pairs

Example Request

{
  "source_locale": "en",
  "target_locales": ["de", "es"],
  "context": "Catalog",
  "data": {
    "product_6_name": "Galaxy S23",
    "product_6_description": "Beautiful description",
    "option_type_2_name": "Color",
    "option_value_3_name": "Black"
  }
}

Example Response

{
  "translations": {
    "context": "Catalog",
    "data": {
      "de": {
        "product_6_name": "Galaxy S23",
        "product_6_description": "Schöne Beschreibung",
        "option_type_2_name": "Farbe",
        "option_value_3_name": "Schwarz"
      },
      "es": {
        "product_6_name": "Galaxy S23",
        "product_6_description": "Hermosa descripción",
        "option_type_2_name": "Color",
        "option_value_3_name": "Negro"
      }
    }
  }
}