Skip to content

Localization

Lookup a localized server string from it's lookup key and translate based on Accept-Language header or "culture" URL parameter.

GET /v1/language

Sample

json
GET /v1/language
{
    "key": "Key"
}

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
keyqueryNoThe lookup key for the string.

Responses

StatusDescription
200Successfully retrieved a localized string from the lookup key provided.
400The request failed validation, the error object will contain further information.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultstring?NoGets the response payload.
json
{
  "success": true,
  "result": "string"
}

Code samples

ts
// @vantagepay/vantagepay
// Retrieves localized UI language strings. For lookup languages use client.lookups.getLanguages().
// Not wrapped by the JavaScript SDK - call the endpoint directly with the active token.
const response = await fetch(baseUrl + '/v1/language', {
  method: 'GET',
  headers: { Authorization: 'Bearer ' + ApiTokens.accessToken },
})
const result = await response.json()
csharp
// VantagePay.SDK
// Retrieves localized UI language strings. For lookup languages use client.Lookups.GetLanguagesAsync().
// Not wrapped by the .NET SDK - call the endpoint directly with an authorized HttpClient.
using var http = new HttpClient { BaseAddress = new Uri("https://sandbox-api.vantagepay.dev") };
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", client.ApiTokens.AccessToken);
var response = await http.GetAsync("/v1/language");
response.EnsureSuccessStatusCode();

Payments for Africa