Skip to content
ndStill is in development. These docs describe the v2 API as designed; the SDKs and the hosted MCP server are previews and not generally available.
Docs

Journal API

The double-entry projection of every payment across rails, with attribution dimensions.

2 endpointsGenerated from the typed registry

Base URL https://api.ndstill.com/v2. Send Authorization: Bearer with a key, Ndstill-Version: 2026-11-01, and an Idempotency-Key on every POST. Conventions, scopes and errors are in the API overview and Errors and decline reasons. Examples come from the mock backend; the shapes are the TypeScript types in packages/api.

List journal entries#

GET/v2/journal
Query parameters all optional
  • sourcestring enum
    "refund""decision""settlement""provider_bill""manual"
  • intent_idId
  • cursorstring
  • limitnumber

    1–200, default 50.

  • qstring

    Free-text search over names, ids and descriptors.

  • sortstring

    Sort field, prefix "-" for descending ("-created_at" is the default).

  • created_gteTimestamp

    created_at >= (ISO).

  • created_lteTimestamp

    created_at <= (ISO).

Response list of JournalEntry

Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:

  • idId
  • object"journal_entry"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

    True for test-mode objects (simulations, sandbox).

  • occurred_atTimestamp
  • sourcestring enum
    "refund""decision""settlement""provider_bill""manual"
  • memostring
  • intent_idId | null
  • linesJournalLine[]
    JournalLine: 5 fields
    • account_codestring
    • account_namestring
    • amountMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
    • sidestring enum

      "debit" | "credit" in the double-entry projection.

      "debit""credit"
    • dimsobject
      5 fields
      • agentRefoptional

        Small reference used for denormalized names in lists (no N+1 lookups in tables).

        Ref: 2 fields
        • idId
        • namestring
      • teamRefoptional

        Small reference used for denormalized names in lists (no N+1 lookups in tables).

        Ref: 2 fields
        • idId
        • namestring
      • customerstringoptional
      • taskstringoptional
      • counterpartyRefoptional

        Small reference used for denormalized names in lists (no N+1 lookups in tables).

        Ref: 2 fields
        • idId
        • namestring
Errors
  • 400invalid_request

    A query parameter is invalid.

  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/journal?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "je_01M82VJYNEJFCMY9VHY5PS5W12",
      "object": "journal_entry",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-11-23T00:42:11.374Z",
      "occurred_at": "2026-11-23T00:42:11.374Z",
      "source": "settlement",
      "memo": "Compute broker · Lambda Cloud",
      "intent_id": "pi_01M82VJYNEJFCMY9VHY5PS5W12",
      "lines": [
        {
          "account_code": "6400",
          "account_name": "AI models and compute",
          "amount": {
            "amount": 166617,
            "asset": "USD"
          },
          "side": "debit",
          "dims": {
            "agent": {
              "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
              "name": "Compute broker"
            },
            "team": {
              "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
              "name": "Research"
            },
            "task": "compute-ad-hoc",
            "counterparty": {
              "id": "cpy_01JZVEZAMEV3FV30AHR5VHAHYT",
              "name": "Lambda Cloud"
            }
          }
        },
        {
          "account_code": "1010",
          "account_name": "Cash: Agent spend (ndStill account)",
          "amount": {
            "amount": 166617,
            "asset": "USD"
          },
          "side": "credit",
          "dims": {
            "agent": {
              "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
              "name": "Compute broker"
            },
            "team": {
              "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
              "name": "Research"
            },
            "task": "compute-ad-hoc",
            "counterparty": {
              "id": "cpy_01JZVEZAMEV3FV30AHR5VHAHYT",
              "name": "Lambda Cloud"
            }
          }
        }
      ]
    },
    {
      "id": "je_01M82SXVEENJ34VTC3VGPS95F2",
      "object": "journal_entry",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-11-23T00:42:11.374Z",
      "occurred_at": "2026-11-23T00:42:11.374Z",
      "source": "settlement",
      "memo": "Procurement bot · Amazon Business",
      "intent_id": "pi_01M82SXVEENJ34VTC3VGPS95F2",
      "lines": [
        {
          "account_code": "6600",
          "account_name": "Office supplies",
          "amount": {
            "amount": 35700,
            "asset": "USD"
          },
          "side": "debit",
          "dims": {
            "agent": {
              "id": "agt_01KXDDQW8E1C6TZK3WM65H12M6",
              "name": "Procurement bot"
            },
            "team": {
              "id": "team_01K9K129ME8NC2B9SV2P484JDP",
              "name": "Procurement"
            },
            "task": "procurement-batch",
            "counterparty": {
              "id": "cpy_01JZVEZAME97KNRYHQSK8ZTK22",
              "name": "Amazon Business"
            }
          }
        },
        {
          "account_code": "2100",
          "account_name": "Card clearing: Stripe (shared payment tokens)",
          "amount": {
            "amount": 35700,
            "asset": "USD"
          },
          "side": "credit",
          "dims": {
            "agent": {
              "id": "agt_01KXDDQW8E1C6TZK3WM65H12M6",
              "name": "Procurement bot"
            },
            "team": {
              "id": "team_01K9K129ME8NC2B9SV2P484JDP",
              "name": "Procurement"
            },
            "task": "procurement-batch",
            "counterparty": {
              "id": "cpy_01JZVEZAME97KNRYHQSK8ZTK22",
              "name": "Amazon Business"
            }
          }
        }
      ]
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 1815
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Retrieve a journal entry#

GET/v2/journal/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response JournalEntry

The same JournalEntry object as List journal entries.

Errors
  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 404not_found

    No object with that id in this org.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/journal/je_01M82VJYNEJFCMY9VHY5PS5W12" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "je_01M82VJYNEJFCMY9VHY5PS5W12",
  "object": "journal_entry",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-23T00:42:11.374Z",
  "occurred_at": "2026-11-23T00:42:11.374Z",
  "source": "settlement",
  "memo": "Compute broker · Lambda Cloud",
  "intent_id": "pi_01M82VJYNEJFCMY9VHY5PS5W12",
  "lines": [
    {
      "account_code": "6400",
      "account_name": "AI models and compute",
      "amount": {
        "amount": 166617,
        "asset": "USD"
      },
      "side": "debit",
      "dims": {
        "agent": {
          "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
          "name": "Compute broker"
        },
        "team": {
          "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
          "name": "Research"
        },
        "task": "compute-ad-hoc",
        "counterparty": {
          "id": "cpy_01JZVEZAMEV3FV30AHR5VHAHYT",
          "name": "Lambda Cloud"
        }
      }
    },
    {
      "account_code": "1010",
      "account_name": "Cash: Agent spend (ndStill account)",
      "amount": {
        "amount": 166617,
        "asset": "USD"
      },
      "side": "credit",
      "dims": {
        "agent": {
          "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
          "name": "Compute broker"
        },
        "team": {
          "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
          "name": "Research"
        },
        "task": "compute-ad-hoc",
        "counterparty": {
          "id": "cpy_01JZVEZAMEV3FV30AHR5VHAHYT",
          "name": "Lambda Cloud"
        }
      }
    }
  ]
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.