Approve translations in bulk
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"stringIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"keys": [
"<string>"
],
"tags": [
"<string>"
],
"locales": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stringIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
keys: ['<string>'],
tags: ['<string>'],
locales: ['<string>']
})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve"
payload = {
"stringIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"keys": ["<string>"],
"tags": ["<string>"],
"locales": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve"
payload := strings.NewReader("{\n \"stringIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keys\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"locales\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"updated": 1
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Translations
Approve translations in bulk
Requires translations:approve (admins, localization managers and reviewers). Native projects only. Approves the picked strings’ translations that wait for review or are drafts, when they have text, recording the token owner as reviewer. Blank translations, rejected translations, texts over the string’s maxLength and segments locked in the content editor are left alone. A selection includes hidden strings.
POST
https://public-api.hyperlocalise.com
/
v1
/
projects
/
{projectId}
/
translations
/
approve
Approve translations in bulk
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"stringIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"keys": [
"<string>"
],
"tags": [
"<string>"
],
"locales": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stringIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
keys: ['<string>'],
tags: ['<string>'],
locales: ['<string>']
})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve"
payload = {
"stringIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"keys": ["<string>"],
"tags": ["<string>"],
"locales": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}/translations/approve"
payload := strings.NewReader("{\n \"stringIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keys\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"locales\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"updated": 1
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Body
application/json
Pick strings one way only. keys match in any file; tags pick strings carrying every tag. Bulk update and batch review refuse a selection matching more than 1,000 strings (too_many_strings). Adding strings to a key job refuses more than 5,000.
Was this page helpful?

