curl -X POST "https://api-integration.ollang.com/integration/memories/507f1f77bcf86cd799439011/items/import" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Getting started",
"targetText": "Premiers pas"
},
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Release notes",
"targetText": "Notes de version"
}
]
}'
const memoryId = "507f1f77bcf86cd799439011";
const response = await fetch(
`https://api-integration.ollang.com/integration/memories/${memoryId}/items/import`,
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
items: [
{
sourceLanguage: "en",
targetLanguage: "fr",
sourceText: "Getting started",
targetText: "Premiers pas",
},
{
sourceLanguage: "en",
targetLanguage: "fr",
sourceText: "Release notes",
targetText: "Notes de version",
},
],
}),
}
);
const { jobId } = await response.json();
// Poll the import job until it (and vectorization) completes
const job = await fetch(
`https://api-integration.ollang.com/integration/memories/import-jobs/${jobId}`,
{ headers: { "X-Api-Key": "<your-api-key>" } }
).then((r) => r.json());
import requests
memory_id = "507f1f77bcf86cd799439011"
data = {
"items": [
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Getting started",
"targetText": "Premiers pas",
},
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Release notes",
"targetText": "Notes de version",
},
]
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.post(
f"https://api-integration.ollang.com/integration/memories/{memory_id}/items/import",
json=data,
headers=headers,
)
job_id = response.json()["jobId"]
# Poll the import job until it (and vectorization) completes
job = requests.get(
f"https://api-integration.ollang.com/integration/memories/import-jobs/{job_id}",
headers=headers,
).json()
{
"jobId": "66b8d6f1e1b9b1d8c6c0d8e1",
"status": "pending"
}
{
"error": "Not Found",
"message": "Memory not found"
}
{
"code": -2,
"error": "ValidationError",
"details": [
{
"messages": [
"items must contain no more than 1000 elements"
],
"path": "items"
}
]
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Memories and instructions
Import Memory Items
Add translation units to a translation memory
POST
/
integration
/
memories
/
{memoryId}
/
items
/
import
curl -X POST "https://api-integration.ollang.com/integration/memories/507f1f77bcf86cd799439011/items/import" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Getting started",
"targetText": "Premiers pas"
},
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Release notes",
"targetText": "Notes de version"
}
]
}'
const memoryId = "507f1f77bcf86cd799439011";
const response = await fetch(
`https://api-integration.ollang.com/integration/memories/${memoryId}/items/import`,
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
items: [
{
sourceLanguage: "en",
targetLanguage: "fr",
sourceText: "Getting started",
targetText: "Premiers pas",
},
{
sourceLanguage: "en",
targetLanguage: "fr",
sourceText: "Release notes",
targetText: "Notes de version",
},
],
}),
}
);
const { jobId } = await response.json();
// Poll the import job until it (and vectorization) completes
const job = await fetch(
`https://api-integration.ollang.com/integration/memories/import-jobs/${jobId}`,
{ headers: { "X-Api-Key": "<your-api-key>" } }
).then((r) => r.json());
import requests
memory_id = "507f1f77bcf86cd799439011"
data = {
"items": [
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Getting started",
"targetText": "Premiers pas",
},
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Release notes",
"targetText": "Notes de version",
},
]
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.post(
f"https://api-integration.ollang.com/integration/memories/{memory_id}/items/import",
json=data,
headers=headers,
)
job_id = response.json()["jobId"]
# Poll the import job until it (and vectorization) completes
job = requests.get(
f"https://api-integration.ollang.com/integration/memories/import-jobs/{job_id}",
headers=headers,
).json()
{
"jobId": "66b8d6f1e1b9b1d8c6c0d8e1",
"status": "pending"
}
{
"error": "Not Found",
"message": "Memory not found"
}
{
"code": -2,
"error": "ValidationError",
"details": [
{
"messages": [
"items must contain no more than 1000 elements"
],
"path": "items"
}
]
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Queue translation units (source/target text per language pair) for import into a translation memory. The units are processed asynchronously through the same import pipeline as dashboard file uploads — including the vectorization step that makes them available to semantic matching — so the endpoint returns an import job to poll rather than a synchronous result.
A single request accepts up to 1000 items; send multiple requests for larger corpora. A memory can hold several language pairs at once — matches are resolved per target language at translation time.
Poll Get Memory Import Job with the returned
jobId to track progress.
curl -X POST "https://api-integration.ollang.com/integration/memories/507f1f77bcf86cd799439011/items/import" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Getting started",
"targetText": "Premiers pas"
},
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Release notes",
"targetText": "Notes de version"
}
]
}'
const memoryId = "507f1f77bcf86cd799439011";
const response = await fetch(
`https://api-integration.ollang.com/integration/memories/${memoryId}/items/import`,
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
items: [
{
sourceLanguage: "en",
targetLanguage: "fr",
sourceText: "Getting started",
targetText: "Premiers pas",
},
{
sourceLanguage: "en",
targetLanguage: "fr",
sourceText: "Release notes",
targetText: "Notes de version",
},
],
}),
}
);
const { jobId } = await response.json();
// Poll the import job until it (and vectorization) completes
const job = await fetch(
`https://api-integration.ollang.com/integration/memories/import-jobs/${jobId}`,
{ headers: { "X-Api-Key": "<your-api-key>" } }
).then((r) => r.json());
import requests
memory_id = "507f1f77bcf86cd799439011"
data = {
"items": [
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Getting started",
"targetText": "Premiers pas",
},
{
"sourceLanguage": "en",
"targetLanguage": "fr",
"sourceText": "Release notes",
"targetText": "Notes de version",
},
]
}
headers = {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
}
response = requests.post(
f"https://api-integration.ollang.com/integration/memories/{memory_id}/items/import",
json=data,
headers=headers,
)
job_id = response.json()["jobId"]
# Poll the import job until it (and vectorization) completes
job = requests.get(
f"https://api-integration.ollang.com/integration/memories/import-jobs/{job_id}",
headers=headers,
).json()
Authorizations
This endpoint requires API key authentication.- Header name:
X-Api-Key - Header value: Your API key from the Ollang dashboard
Path Parameters
Body Parameters
Translation units to add to the memory. Minimum 1, maximum 1000 per request.
Response
Returns the import job created for the request.Identifier of the import job. Poll Get Memory Import Job for progress.
Initial status of the import job. Always
pending on creation; it moves through processing to completed (or failed).{
"jobId": "66b8d6f1e1b9b1d8c6c0d8e1",
"status": "pending"
}
{
"error": "Not Found",
"message": "Memory not found"
}
{
"code": -2,
"error": "ValidationError",
"details": [
{
"messages": [
"items must contain no more than 1000 elements"
],
"path": "items"
}
]
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Was this page helpful?