tanqoryExtB2bSettings
- Query
- Customers and B2B
The store-wide B2B settings: the terms a new company location starts with, and how many days before a tax exemption certificate expires the staff are told. A store that never saved them has the defaults (no payment terms, no deposit, orders are not submitted as drafts, buyers cannot change the shipping address, 30 days).
Arguments
None.
Returns
TanqoryExtB2bSettings! The store-wide B2B settings.
| Field | Type | Description |
|---|---|---|
defaultCheckoutToDraft | Boolean! | A new company location's orders are submitted as drafts for review. |
defaultDepositPercentage | Int | The share of the order (1 to 100) a new company location pays up front, or null for no deposit. |
defaultEditableShippingAddress | Boolean! | A new company location's buyers may ship to any address. |
defaultPaymentTermsTemplate | PaymentTermsTemplate | The payment terms a new company location starts with, or null for none. |
defaultsEnabled | Boolean! | Whether the store-wide defaults apply (staff switch b2b_store_defaults). |
taxExemptionExpiryEnabled | Boolean! | Whether certificate expiry dates and the reminder are on (staff switch b2b_exemption_dates). |
taxExemptionReminderDays | Int! | How many days (1 to 365) before a tax exemption certificate expires the staff are told, by the staff notification "Tax exemption expiring" (Settings > Notifications). |
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 TanqoryExtB2bSettings {\n tanqoryExtB2bSettings {\n defaultCheckoutToDraft\n defaultDepositPercentage\n defaultEditableShippingAddress\n defaultPaymentTermsTemplate { id }\n defaultsEnabled\n taxExemptionExpiryEnabled\n taxExemptionReminderDays\n }\n}","variables":{}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `query TanqoryExtB2bSettings {
tanqoryExtB2bSettings {
defaultCheckoutToDraft
defaultDepositPercentage
defaultEditableShippingAddress
defaultPaymentTermsTemplate { id }
defaultsEnabled
taxExemptionExpiryEnabled
taxExemptionReminderDays
}
}`;
const variables = {};
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 TanqoryExtB2bSettings {
tanqoryExtB2bSettings {
defaultCheckoutToDraft
defaultDepositPercentage
defaultEditableShippingAddress
defaultPaymentTermsTemplate { id }
defaultsEnabled
taxExemptionExpiryEnabled
taxExemptionReminderDays
}
}"""
variables = json.loads("""{}""")
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))