AlmondTill/G3N API

On this page

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).

What happens

Reads only.

Who may call it

Capability area: Billing and the wallet — Your platform bill, token purchases and the usage and cost reads.

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

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-065235280000",
          "rootId": "01900000-0000-7000-8000-a093dd800000",
          "createdAt": "2027-01-31T00:00:00.000Z",
          "updatedAt": "2027-01-31T00:00:00.000Z",
          "revisionNum": 1,
          "revision": "01900000-0000-7000-8000-b7960e180000",
          "entryKind": "<entry kind>",
          "amountTokens": 1,
          "reason": "Correcting a miscount.",
          "tokenPurchaseId": "01900000-0000-7000-8000-28e82c5c0000",
          "billingChargeId": "01900000-0000-7000-8000-34d522a50000",
          "transferCounterpartRootId": "01900000-0000-7000-8000-6176046e0000",
          "transferCounterpartEntryId": "01900000-0000-7000-8000-d67bafcc0000",
          "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