tanqoryExtProductImport
- Query
- Products
A product import of the store by id.
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
id | ID! | Required |
Returns
TanqoryExtProductImport A product CSV import.
| Field | Type | Description |
|---|---|---|
count | Int! | The products in the file (one per URL handle). |
createdAt | DateTime! | |
createdCount | Int! | |
errorMessage | String | FAILED: why the run stopped. |
failedCount | Int! | |
fileErrors | [TanqoryExtProductImportFileError!]! | The rows of the file that make no product. |
filename | String | The file's name as uploaded. |
finished | Boolean! | Whether the import has ended (COMPLETED, FAILED or CANCELED). |
finishedAt | DateTime | |
id | ID! | |
overwrite | Boolean! | Products whose handle exists are updated from the file (true) or left as they are (false). |
previewProducts | [String!]! | The titles of the first products of the file, in file order (at most 250).
|
processedCount | Int! | Products handled so far (created, updated, skipped and failed). |
publishToAllChannels | Boolean! | New products are published to every sales channel (true) or as the file's Published on online store column says (false). |
rows | [TanqoryExtProductImportRow!]! | The import's products in file order (at most 250), optionally only those of some statuses.
|
skippedCount | Int! | |
status | TanqoryExtProductImportStatus! | |
submittedAt | DateTime | |
updatedCount | Int! | |
variantCount | Int! | The variant rows in the file. |
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":"query TanqoryExtProductImport($id: ID!) {\n tanqoryExtProductImport(id: $id) {\n count\n createdAt\n createdCount\n errorMessage\n failedCount\n filename\n finished\n finishedAt\n id\n overwrite\n }\n}","variables":{"id":"gid://tanqory/Type/id"}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `query TanqoryExtProductImport(\$id: ID!) {
tanqoryExtProductImport(id: \$id) {
count
createdAt
createdCount
errorMessage
failedCount
filename
finished
finishedAt
id
overwrite
}
}`;
const variables = {
"id": "gid://tanqory/Type/id"
};
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 = """query TanqoryExtProductImport($id: ID!) {
tanqoryExtProductImport(id: $id) {
count
createdAt
createdCount
errorMessage
failedCount
filename
finished
finishedAt
id
overwrite
}
}"""
variables = json.loads("""{
"id": "gid://tanqory/Type/id"
}""")
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))