tanqoryExtFulfillmentBatchScan
- Mutation
- Orders and payments
Records one scan of a step's Scan to verify action for a fulfillment order at that step: the code (a barcode or SKU) is checked against the order's items; a match counts one unit of the first line that still needs one. Or, with lineItemId instead of a code, counts quantity units of that line by hand (default 1, up to what it still needs: an item with no barcode or SKU, the scan view's + and check buttons); a negative quantity takes that many counted units back (its -). When every unit is counted the order is verified and the step's activity says so. NOT_FOUND (also a line item not in the order), BLANK (neither code nor lineItemId), INVALID (the step has no Scan to verify, the order is not at that step, both code and lineItemId, a quantity without lineItemId, or a quantity of 0 or more than the line has), CLOSED.
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
code | String | Optional | |
fulfillmentOrderId | ID! | Required | |
id | ID! | Required | |
lineItemId | ID | Optional | |
quantity | Int | Optional | |
stepId | ID! | Required |
Returns
TanqoryExtFulfillmentBatchScanPayload
| Field | Type | Description |
|---|---|---|
matched | Boolean | The scanned code matched a line of the order that still had units to scan. |
userErrors | [TanqoryExtFulfillmentBatchStepUserError!]! | |
verification | TanqoryExtFulfillmentBatchVerification | The order's progress at the step after this scan. |
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 TanqoryExtFulfillmentBatchScan($fulfillmentOrderId: ID!, $id: ID!, $stepId: ID!) {\n tanqoryExtFulfillmentBatchScan(fulfillmentOrderId: $fulfillmentOrderId, id: $id, stepId: $stepId) {\n matched\n userErrors {\n code\n field\n message\n }\n }\n}","variables":{"fulfillmentOrderId":"gid://tanqory/Type/id","id":"gid://tanqory/Type/id","stepId":"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 TanqoryExtFulfillmentBatchScan(\$fulfillmentOrderId: ID!, \$id: ID!, \$stepId: ID!) {
tanqoryExtFulfillmentBatchScan(fulfillmentOrderId: \$fulfillmentOrderId, id: \$id, stepId: \$stepId) {
matched
userErrors {
code
field
message
}
}
}`;
const variables = {
"fulfillmentOrderId": "gid://tanqory/Type/id",
"id": "gid://tanqory/Type/id",
"stepId": "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 TanqoryExtFulfillmentBatchScan($fulfillmentOrderId: ID!, $id: ID!, $stepId: ID!) {
tanqoryExtFulfillmentBatchScan(fulfillmentOrderId: $fulfillmentOrderId, id: $id, stepId: $stepId) {
matched
userErrors {
code
field
message
}
}
}"""
variables = json.loads("""{
"fulfillmentOrderId": "gid://tanqory/Type/id",
"id": "gid://tanqory/Type/id",
"stepId": "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))