Import TMX or CSV into a translation memory
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/translation-memories/{memoryId}/import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "<string>",
"sourceFilename": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', sourceFilename: '<string>'})
};
fetch('https://public-api.hyperlocalise.com/v1/translation-memories/{memoryId}/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/translation-memories/{memoryId}/import"
payload = {
"content": "<string>",
"sourceFilename": "<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/translation-memories/{memoryId}/import"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"sourceFilename\": \"<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))
}{
"import": {
"importAttemptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"importBatchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalRead": 1,
"created": 1,
"updated": 1,
"warned": 1,
"failed": 1,
"headerSrclang": "<string>",
"issues": [
{
"severity": "warning",
"code": "<string>",
"message": "<string>",
"unitIndex": 123,
"tuid": "<string>"
}
]
}
}{
"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": {}
}Translation memories
Import TMX or CSV into a translation memory
Requires translation-memories:write, which the memories:write token scope grants to admins and localization managers. Native, non-archived memories only. Each unit updates the entry with the same TMX tuid, or the same locale pair and source text, and creates one otherwise. At most 10,000 units and 25 MiB. The run appears in the memory’s import history.
POST
https://public-api.hyperlocalise.com
/
v1
/
translation-memories
/
{memoryId}
/
import
Import TMX or CSV into a translation memory
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/translation-memories/{memoryId}/import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "<string>",
"sourceFilename": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', sourceFilename: '<string>'})
};
fetch('https://public-api.hyperlocalise.com/v1/translation-memories/{memoryId}/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/translation-memories/{memoryId}/import"
payload = {
"content": "<string>",
"sourceFilename": "<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/translation-memories/{memoryId}/import"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"sourceFilename\": \"<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))
}{
"import": {
"importAttemptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"importBatchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalRead": 1,
"created": 1,
"updated": 1,
"warned": 1,
"failed": 1,
"headerSrclang": "<string>",
"issues": [
{
"severity": "warning",
"code": "<string>",
"message": "<string>",
"unitIndex": 123,
"tuid": "<string>"
}
]
}
}{
"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/jsonmultipart/form-data
Was this page helpful?

