Update a project template
curl --request PATCH \
--url https://public-api.hyperlocalise.com/v1/project-templates/{templateId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"sourceLocale": "<string>",
"targetLocales": [
"<string>"
],
"projectDescription": "<string>",
"translationContext": "<string>",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automaticallyGroupIdenticalStrings": true,
"sourceTextEditable": true,
"memoryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"glossaryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
sourceLocale: '<string>',
targetLocales: ['<string>'],
projectDescription: '<string>',
translationContext: '<string>',
teamId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
automaticallyGroupIdenticalStrings: true,
sourceTextEditable: true,
memoryIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
glossaryIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://public-api.hyperlocalise.com/v1/project-templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/project-templates/{templateId}"
payload = {
"name": "<string>",
"description": "<string>",
"sourceLocale": "<string>",
"targetLocales": ["<string>"],
"projectDescription": "<string>",
"translationContext": "<string>",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automaticallyGroupIdenticalStrings": True,
"sourceTextEditable": True,
"memoryIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"glossaryIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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/project-templates/{templateId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceLocale\": \"<string>\",\n \"targetLocales\": [\n \"<string>\"\n ],\n \"projectDescription\": \"<string>\",\n \"translationContext\": \"<string>\",\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"automaticallyGroupIdenticalStrings\": true,\n \"sourceTextEditable\": true,\n \"memoryIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"glossaryIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"projectTemplate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"sourceLocale": "<string>",
"targetLocales": [
"<string>"
],
"projectDescription": "<string>",
"translationContext": "<string>",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automaticallyGroupIdenticalStrings": true,
"sourceTextEditable": true,
"approvedTranslationsOnSourceChange": "stay_approved",
"memoryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"glossaryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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": {}
}Project templates
Update a project template
Requires project-templates:write. Set fields replace the stored values; memoryIds and glossaryIds replace the whole list, in priority order. teamId: null clears the team. Projects already created from the template do not change.
PATCH
https://public-api.hyperlocalise.com
/
v1
/
project-templates
/
{templateId}
Update a project template
curl --request PATCH \
--url https://public-api.hyperlocalise.com/v1/project-templates/{templateId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"sourceLocale": "<string>",
"targetLocales": [
"<string>"
],
"projectDescription": "<string>",
"translationContext": "<string>",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automaticallyGroupIdenticalStrings": true,
"sourceTextEditable": true,
"memoryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"glossaryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
sourceLocale: '<string>',
targetLocales: ['<string>'],
projectDescription: '<string>',
translationContext: '<string>',
teamId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
automaticallyGroupIdenticalStrings: true,
sourceTextEditable: true,
memoryIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
glossaryIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://public-api.hyperlocalise.com/v1/project-templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/project-templates/{templateId}"
payload = {
"name": "<string>",
"description": "<string>",
"sourceLocale": "<string>",
"targetLocales": ["<string>"],
"projectDescription": "<string>",
"translationContext": "<string>",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automaticallyGroupIdenticalStrings": True,
"sourceTextEditable": True,
"memoryIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"glossaryIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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/project-templates/{templateId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceLocale\": \"<string>\",\n \"targetLocales\": [\n \"<string>\"\n ],\n \"projectDescription\": \"<string>\",\n \"translationContext\": \"<string>\",\n \"teamId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"automaticallyGroupIdenticalStrings\": true,\n \"sourceTextEditable\": true,\n \"memoryIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"glossaryIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"projectTemplate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"sourceLocale": "<string>",
"targetLocales": [
"<string>"
],
"projectDescription": "<string>",
"translationContext": "<string>",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automaticallyGroupIdenticalStrings": true,
"sourceTextEditable": true,
"approvedTranslationsOnSourceChange": "stay_approved",
"memoryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"glossaryIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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
Was this page helpful?

