Add a locale to an open key job
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/jobs/{jobId}/locales \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locale": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({locale: '<string>'})
};
fetch('https://public-api.hyperlocalise.com/v1/jobs/{jobId}/locales', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/jobs/{jobId}/locales"
payload = { "locale": "<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/jobs/{jobId}/locales"
payload := strings.NewReader("{\n \"locale\": \"<string>\"\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))
}{
"locales": [
{
"locale": "<string>",
"totalStrings": 1,
"translatedStrings": 1,
"approvedStrings": 1,
"needsReviewStrings": 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": {}
}Jobs
Add a locale to an open key job
Requires jobs:write. The locale must be a project target locale. A job holds at most 20 locales.
POST
https://public-api.hyperlocalise.com
/
v1
/
jobs
/
{jobId}
/
locales
Add a locale to an open key job
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/jobs/{jobId}/locales \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locale": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({locale: '<string>'})
};
fetch('https://public-api.hyperlocalise.com/v1/jobs/{jobId}/locales', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/jobs/{jobId}/locales"
payload = { "locale": "<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/jobs/{jobId}/locales"
payload := strings.NewReader("{\n \"locale\": \"<string>\"\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))
}{
"locales": [
{
"locale": "<string>",
"totalStrings": 1,
"translatedStrings": 1,
"approvedStrings": 1,
"needsReviewStrings": 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": {}
}Was this page helpful?

