AlmondTill/G3N API

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:

What happens

Reads only.

Arguments

NameTypeRequiredNotes
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe 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

graphql
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:

json
{
  "limit": 1
}

Example response

json
{
  "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

Used in