Přejít na hlavní obsah
PUT
/
v1
/
glossary
/
{term_id}
const updated = await client.glossary.update("term_abc123", {
  type: "specific_translation",
  translations: {
    de: "Datenextraktion",
    fr: "extraction de données",
  },
});
{
  "id": "term_abc123",
  "term": "data extraction",
  "type": "specific_translation",
  "case_sensitive": false,
  "category": "custom",
  "translations": {
    "de": "Datenextraktion",
    "fr": "extraction de données"
  },
  "created_at": "2025-03-01T10:00:00.000Z"
}

Parametry cesty

term_id
string
povinné
Jedinečný identifikátor pojmu ve slovníku.

Tělo požadavku

Všechna pole jsou volitelná. Aktualizují se pouze zadaná pole.
term
string
Aktualizovaný původní pojem.
type
string
Aktualizovaný typ: do_not_translate, specific_translation nebo context_dependent.
case_sensitive
boolean
Aktualizovaná citlivost na velikost písmen.
category
string
Aktualizovaná kategorie.
translations
object
Aktualizovaná mapa překladů. Nahradí všechny existující překlady.

Odpověď

Vrací úplný aktualizovaný objekt pojmu ve slovníku (stejný tvar jako objekt v Seznam pojmů ve slovníku).
const updated = await client.glossary.update("term_abc123", {
  type: "specific_translation",
  translations: {
    de: "Datenextraktion",
    fr: "extraction de données",
  },
});
{
  "id": "term_abc123",
  "term": "data extraction",
  "type": "specific_translation",
  "case_sensitive": false,
  "category": "custom",
  "translations": {
    "de": "Datenextraktion",
    "fr": "extraction de données"
  },
  "created_at": "2025-03-01T10:00:00.000Z"
}
Aktualizace translations nahradí všechny existující překlady. Zahrňte všechny jazykové páry, které chcete zachovat.