tanqoryExtSubscriptionSummary
- Query
- Orders and payments
Requires read_own_subscription_contracts access scope. About access scopes
The store's subscription contracts at a glance: how many there are in each status, how many were created and cancelled in [since, until) with a row per UTC day (default the last 30 days, at most 366 days), and what the active ones bill per month, per currency. Cancellations are counted from the contracts' activity, which began on 2026-11-27. Null while the summary is turned off for this platform. Requires read_own_subscription_contracts access scope.
Arguments
Returns
| Field | Type | Description |
|---|---|---|
active | Int! | |
cancelled | Int! | |
cancelledInPeriod | Int! | Contracts cancelled in the period. |
createdInPeriod | Int! | Contracts created in the period. |
days | [TanqoryExtSubscriptionSummaryDay!]! | One row per UTC day of the period, oldest first. |
expired | Int! | |
failed | Int! | |
monthlyRecurring | [MoneyV2!]! | What the active contracts bill per month, per currency: current line prices times quantities plus the delivery price, before discounts and taxes, spread over a month by their billing interval; rounded to 2 decimals. |
paused | Int! | |
since | DateTime! | The start of the period (inclusive). |
total | Int! | Every contract of the store. |
until | DateTime! | The end of the period (exclusive). |
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 TanqoryExtSubscriptionSummary {\n tanqoryExtSubscriptionSummary {\n active\n cancelled\n cancelledInPeriod\n createdInPeriod\n expired\n failed\n monthlyRecurring {\n amount\n currencyCode\n }\n paused\n since\n total\n }\n}","variables":{}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `query TanqoryExtSubscriptionSummary {
tanqoryExtSubscriptionSummary {
active
cancelled
cancelledInPeriod
createdInPeriod
expired
failed
monthlyRecurring {
amount
currencyCode
}
paused
since
total
}
}`;
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 TanqoryExtSubscriptionSummary {
tanqoryExtSubscriptionSummary {
active
cancelled
cancelledInPeriod
createdInPeriod
expired
failed
monthlyRecurring {
amount
currencyCode
}
paused
since
total
}
}"""
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))