tanqoryExtTranslationsImport
- Mutation
- Markets, tax and languages
Imports translations from a CSV file in the export's columns (an earlier Tanqory file with a Content digest column is read too), sent in parts of at most 500,000 characters, in order: the first call has no jobId and its part starts with the header row (INVALID when a needed column is missing); each later call names the job; the call with last: true queues it. At most 100 parts (TOO_LARGE). Each row is checked and saved on its own: a row with no translated content, or whose translated content equals the saved translation, is skipped; a saved translation is replaced only with overwrite: true (set on the first call); a row whose Default content is not the item's current content is saved as outdated; a failed row is reported with its line in rowErrors.
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
jobId | ID | Optional | |
last | Boolean! | Required | |
overwrite | Boolean | Optional | |
part | String! | Required |
Returns
TanqoryExtTranslationJobPayload
| Field | Type | Description |
|---|---|---|
job | TanqoryExtTranslationJob | |
userErrors | [TanqoryExtTranslationJobUserError!]! |
Example request
A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.
Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
-H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data '{"query":"mutation TanqoryExtTranslationsImport($last: Boolean!, $part: String!) {\n tanqoryExtTranslationsImport(last: $last, part: $part) {\n job { id }\n userErrors {\n code\n field\n message\n }\n }\n}","variables":{"last":false,"part":""}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `mutation TanqoryExtTranslationsImport(\$last: Boolean!, \$part: String!) {
tanqoryExtTranslationsImport(last: \$last, part: \$part) {
job { id }
userErrors {
code
field
message
}
}
}`;
const variables = {
"last": false,
"part": ""
};
const res = await fetch(`https://api.tanqory.com/admin/2026-10/stores/${process.env.STORE_ID}/graphql`, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.TANQORY_ACCESS_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({ query, variables }),
});
console.log(res.status, JSON.stringify(await res.json(), null, 2));# Python 3, standard library only. Save as request.py and run: python3 request.py
import json, os, urllib.request
query = """mutation TanqoryExtTranslationsImport($last: Boolean!, $part: String!) {
tanqoryExtTranslationsImport(last: $last, part: $part) {
job { id }
userErrors {
code
field
message
}
}
}"""
variables = json.loads("""{
"last": false,
"part": ""
}""")
req = urllib.request.Request(
"https://api.tanqory.com/admin/2026-10/stores/" + os.environ["STORE_ID"] + "/graphql",
data=json.dumps({"query": query, "variables": variables}).encode(),
headers={
"Authorization": "Bearer " + os.environ["TANQORY_ACCESS_TOKEN"],
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(req) as res:
print(res.status, json.dumps(json.load(res), indent=2))