tanqoryExtFulfillmentBatchActionScan
- Mutation
- Orders and payments
Runs the action a scanned Barcode action sheet code stands for, on this batch, and logs the scan on the batch timeline (SCANNED). NEXT_STEP / PREVIOUS_STEP move every order one step (as tanqoryExtFulfillmentBatchMove, each from its own step); PRIMARY_ACTION / SECONDARY_ACTION run the first / second action of the current step (Create documents here, with its event; Scan to verify is opened by the dashboard, which gets the step); CLOSE_BATCH closes the batch, REOPEN_BATCH reopens a closed one. NOT_FOUND (batch), INVALID (not a sheet code, a code of another batch, nothing to move, no such action on the step, reopening an open batch), CLOSED (any action but REOPEN_BATCH on a closed batch), and whatever Create documents refuses.
Arguments
Returns
TanqoryExtFulfillmentBatchActionScanPayload
| Field | Type | Description |
|---|---|---|
action | TanqoryExtFulfillmentBatchSheetAction | The action the code stands for. |
batch | TanqoryExtFulfillmentBatch | |
count | Int | Orders the action moved or acted on. |
event | TanqoryExtFulfillmentBatchEvent | CREATE_DOCUMENTS: the DOCUMENTS_CREATED event with the PDF. |
step | TanqoryExtFulfillmentBatchStep | PRIMARY_ACTION / SECONDARY_ACTION: the step the action ran on. |
stepAction | TanqoryExtFulfillmentWorkflowActionType | PRIMARY_ACTION / SECONDARY_ACTION: which step action it was. SCAN_TO_VERIFY: the dashboard opens the scan view; CREATE_DOCUMENTS: the PDF is in |
userErrors | [TanqoryExtFulfillmentBatchStepUserError!]! |
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 TanqoryExtFulfillmentBatchActionScan($code: String!, $id: ID!) {\n tanqoryExtFulfillmentBatchActionScan(code: $code, id: $id) {\n action\n batch { id }\n count\n event { id }\n step { id }\n stepAction\n userErrors {\n code\n field\n message\n }\n }\n}","variables":{"code":"","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 = `mutation TanqoryExtFulfillmentBatchActionScan(\$code: String!, \$id: ID!) {
tanqoryExtFulfillmentBatchActionScan(code: \$code, id: \$id) {
action
batch { id }
count
event { id }
step { id }
stepAction
userErrors {
code
field
message
}
}
}`;
const variables = {
"code": "",
"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 = """mutation TanqoryExtFulfillmentBatchActionScan($code: String!, $id: ID!) {
tanqoryExtFulfillmentBatchActionScan(code: $code, id: $id) {
action
batch { id }
count
event { id }
step { id }
stepAction
userErrors {
code
field
message
}
}
}"""
variables = json.loads("""{
"code": "",
"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))