tokenEntries
query · in the family Billing and the wallet
What it does
Your group’s kernel ledger — every charge, purchase, and adjustment on your prepaid balance.
The group wallet's token-ledger facts, newest-first + born-paginated. With the wallet GET (cached balance) this IS the billing transparency surface: balance == Σ entries exactly. Requires authentication. Template class A16_BILLING (hand-derived v23).
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Billing and the wallet — Your platform bill, token purchases and the usage and cost reads.
Roles that may call it:
- Owner
- Manager
- Associate Manager
- An API key whose scope allows
api:tokenEntries
What happens
Reads only.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The cursor from the previous page, passed back exactly as received. |
Returns
TokenEntryPage TokenEntryPage! — One page of a wallet's token-ledger facts.
This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.
Example request
query ExampleTokenEntries($limit: Int) {
tokenEntries(limit: $limit) {
items {
id
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
entryKind
amountTokens
reason
tokenPurchaseId
billingChargeId
transferCounterpartRootId
transferCounterpartEntryId
carriedInMicroTokens
carriedOutMicroTokens
rateCardVersion
}
nextToken
}
}Variables:
{
"limit": 1
}Example response
{
"data": {
"tokenEntries": {
"items": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"parentId": "01900000-0000-7000-8000-eacdfcfd0000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-53c6eea90000",
"entryKind": "<entry kind>",
"amountTokens": 1,
"reason": "Correcting a miscount.",
"tokenPurchaseId": "01900000-0000-7000-8000-b3215f990000",
"billingChargeId": "01900000-0000-7000-8000-142a32780000",
"transferCounterpartRootId": "01900000-0000-7000-8000-daa1e0a30000",
"transferCounterpartEntryId": "01900000-0000-7000-8000-75703f890000",
"carriedInMicroTokens": 1,
"carriedOutMicroTokens": 1,
"rateCardVersion": 1
}
],
"nextToken": "<the cursor from the previous page>"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)