Get translation type by ID
GET /api/translation-types/{translationTypeId}
Success: 200 OK
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
Overview
Returns one translation type — the definition of a category of thing that can be translated, such
as Site, Product, ActivityGroup, PriceLevel or Membership. Every translated string on the
platform is filed against a translation type, the id of the record it belongs to, the property being
translated, and a culture; this endpoint describes the first of those four.
The commonest misreading is the translations array. It does not contain the translations of
the records in this category. It contains the translations of the translation type's own label —
the word "Product" rendered in Welsh, French and so on — so it is typically small, and empty on a
single-language tenant. There is no way to get, say, every product translation from here; product
translations come back on the product endpoints themselves.
Use it when you already hold a numeric translation type id and need its type string or its
localised label. To discover the ids in the first place, call
Get all translation types, which returns the
same shape as an array — and if you are going to look up more than one, fetch the list once and
index it locally rather than calling this repeatedly.
The response is a subset of what the platform holds about a translation type. The configuration flags that govern how a type behaves during import and export — whether it also carries a name, and whether it carries web comments — are not exposed here.
Endpoint
GET {base_url}/api/translation-types/{translationTypeId}
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
translationTypeId | integer (int32) | Yes | The translation type's numeric id, as returned in the id field by Get all translation types. It is a platform-generated integer, not the type name — you cannot pass Product here and have it resolve; that is a 400, because the value is not an integer. An integer that matches no translation type returns 404. |
Sample request
curl -X GET '{base_url}/api/translation-types/4' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
id | integer (int32) | The translation type's numeric id, echoing the value you requested. This is the id other translation calls expect wherever a translation type is identified numerically. |
type | string | The translation type's stable code name, maximum 50 characters and never null — for example Site, Product, ActivityGroup, PriceLevel, Membership or BookingSheetType. This, rather than id, is the value used where translation types are named as strings, and it is the value to key any mapping in your own code on, because it does not vary between environments in the way a generated integer can. |
description | string | A longer, human-readable explanation of the category, up to 512 characters. It is nullable and frequently is null, so fall back to type when you need something to display. |
translations | array of object | Localised renderings of this translation type's own label, not of any record in the category — see the Overview. [] when nothing has been translated, which is the normal state on a single-language tenant and is not an error. At most one entry exists per culture and property combination. |
translations[].culture | string | The culture this rendering is for, up to 20 characters, matching a code in the platform's culture list — cy-gb, en-gb, fr, de, es, pt, gd and similar. The codes are lower-case, so compare case-insensitively rather than against a hard-coded en-GB. |
translations[].type | string | Misleadingly named: this is not the translation type. It is the name of the property being translated on the translation type, so expect values such as Description or Name. Because this array is not filtered to one property, several entries can share a culture and differ only by this field — key on culture plus type together, never on culture alone. |
translations[].text | string | The translated text, maximum 255 characters. Never null for an entry that exists. |
translations[].language | string | An optional sub-language qualifier held alongside culture. It is always null on this endpoint — the field is present in the JSON but never carries a value. Do not branch on it here. |
Sample response
{
"id": 4,
"type": "Product",
"description": "Retail and catering products",
"translations": [
{
"culture": "cy-gb",
"type": "Description",
"text": "Cynhyrchion manwerthu ac arlwyo",
"language": null
}
]
}Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | {translationTypeId} is not a whole number — for example a type name such as Product was sent instead of the numeric id. The request is rejected before the lookup runs, so the body is a validation problem document (application/problem+json) with an errors map keyed by field name, rather than the plain-text strings this API returns elsewhere. |
404 | Not found | No translation type has that id. The body is a plain-text string: There is no translation type that matches the request. Note there is no full stop, and note the status — this endpoint returns 404 for a missing record, unlike several other Configuration lookups that answer 400. |
500 | Internal server error | An unexpected server-side failure reading the translation types or their translations. The body is empty. |