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

Reconciliation API

Authorization, settlement, receipt and invoice matched, with exceptions to resolve.

7 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 reconciliation items#

GET/v2/reconciliation
Query parameters all optional
  • status"matched" | "suggested" | "unmatched" | "exception" | ReconStatus[]
    "matched""suggested""unmatched""exception"
  • 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 ReconItem

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"recon_item"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

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

  • statusReconStatus
    "matched""suggested""unmatched""exception"
  • linksobject

    What is being matched: auth ↔ clearing ↔ receipt ↔ invoice ↔ provider bill.

    5 fields
    • authorizationstring | null
    • clearingstring | null
    • receipt_idId | null
    • document_idId | null
    • provider_billstring | null
  • intent_idId | null
  • agentRef | null

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

    Ref: 2 fields
    • idId
    • namestring
  • counterpartystring
  • amountMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • diffMoney | null

    Difference between linked amounts (e.g. tip, FX).

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • reasonstring | null
  • reason_codestring | nulloptional

    Machine code for the reason, shown under the plain-language text.

  • suggestionobject | null
    4 fields
    • document_idId
    • labelstring
    • confidencenumber
    • reasonsstring[]optional
  • occurred_atTimestamp
  • railstring enumoptional

    The payment's rail (decides which links apply).

    null"card""network_token""checkout_token""stablecoin""bank""ai""cloud"
  • expectedReconLinkKind[]optional

    Links this rail is expected to have; the others don't apply.

    "provider_bill""authorization""clearing""receipt""document"
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/reconciliation?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "rec_01M7YY2FA2DM38R6Z4QCEZ3KKX",
      "object": "recon_item",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-11-21T11:32:39.362Z",
      "status": "matched",
      "links": {
        "authorization": "iauth_7d773c64e156a45718",
        "clearing": "clr_89b37f05703a0d35",
        "receipt_id": "rcpt_01M7SS91A22HD2N9DHBFWQGAD0",
        "document_id": "doc_01M7WBNRA23X26E2W32SN8QYXE",
        "provider_bill": null
      },
      "intent_id": "pi_01M7SS91A22HD2N9DHBFWQGAD0",
      "agent": {
        "id": "agt_01KT2J81REP5PWFMXBR1QGDE4E",
        "name": "Flight booker"
      },
      "counterparty": "United Airlines",
      "amount": {
        "amount": 74166,
        "asset": "USD"
      },
      "diff": null,
      "reason": null,
      "suggestion": null,
      "occurred_at": "2026-11-20T00:32:39.362Z",
      "rail": "network_token",
      "expected": [
        "authorization",
        "clearing",
        "receipt"
      ],
      "reason_code": null
    },
    {
      "id": "rec_01M7XGWP8RZQ28W7C6519GB31V",
      "object": "recon_item",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-11-20T22:23:03.960Z",
      "status": "exception",
      "links": {
        "authorization": null,
        "clearing": "clr_4304349fdbd81589",
        "receipt_id": "rcpt_01M7NSPH8RNKVYVC05JGHZQXEB",
        "document_id": null,
        "provider_bill": "bill_4204330cc137"
      },
      "intent_id": "pi_01M7NSPH8RNKVYVC05JGHZQXEB",
      "agent": {
        "id": "agt_01KZT4G44EFC85Y12AEE7YAPF3",
        "name": "Eval runner"
      },
      "counterparty": "Anthropic",
      "amount": {
        "amount": 5699,
        "asset": "USD"
      },
      "diff": {
        "amount": 788,
        "asset": "USD"
      },
      "reason": "The Anthropic bill line for this usage differs from what ndStill metered. It may include usage outside the AI proxy.",
      "suggestion": null,
      "occurred_at": "2026-11-17T22:24:28.960Z",
      "rail": "ai",
      "expected": [
        "provider_bill",
        "receipt"
      ],
      "reason_code": "bill_amount_mismatch"
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 60
}
Try it

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

Retrieve a reconciliation item#

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

    A prefixed ID from this org.

Response ReconItem

The same ReconItem object as List reconciliation items.

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/reconciliation/rec_01M7XGWP8RZQ28W7C6519GB31V" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "rec_01M7XGWP8RZQ28W7C6519GB31V",
  "object": "recon_item",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-20T22:23:03.960Z",
  "status": "exception",
  "links": {
    "authorization": null,
    "clearing": "clr_4304349fdbd81589",
    "receipt_id": "rcpt_01M7NSPH8RNKVYVC05JGHZQXEB",
    "document_id": null,
    "provider_bill": "bill_4204330cc137"
  },
  "intent_id": "pi_01M7NSPH8RNKVYVC05JGHZQXEB",
  "agent": {
    "id": "agt_01KZT4G44EFC85Y12AEE7YAPF3",
    "name": "Eval runner"
  },
  "counterparty": "Anthropic",
  "amount": {
    "amount": 5699,
    "asset": "USD"
  },
  "diff": {
    "amount": 788,
    "asset": "USD"
  },
  "reason": "The Anthropic bill line for this usage differs from what ndStill metered. It may include usage outside the AI proxy.",
  "suggestion": null,
  "occurred_at": "2026-11-17T22:24:28.960Z",
  "rail": "ai",
  "expected": [
    "provider_bill",
    "receipt"
  ],
  "reason_code": "bill_amount_mismatch"
}
Try it

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

Get the reconciliation summary#

GET/v2/reconciliation/summary
Response ReconSummary
  • object"recon_summary"
  • countsobject
    4 fields
    • matchednumber
    • suggestednumber
    • unmatchednumber
    • exceptionnumber
  • open_amountMoney

    Total of items not yet matched (USD, USDC at par).

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

    An amount: integer minor units + asset.

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

    Matched share of all items, 0–1.

  • last_runReconRun | null
    ReconRun: 7 fields
    • object"recon_run"
    • idId
    • started_atTimestamp
    • matchednumber
    • suggestednumber
    • exceptionsnumber
    • changednumberoptional
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.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/reconciliation/summary" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "recon_summary",
  "counts": {
    "matched": 40,
    "suggested": 12,
    "unmatched": 4,
    "exception": 4
  },
  "open_amount": {
    "amount": 315270,
    "asset": "USD"
  },
  "matched_amount": {
    "amount": 932509,
    "asset": "USD"
  },
  "match_rate": 0.667,
  "last_run": {
    "object": "recon_run",
    "id": "rrun_f57a8f891b6e373d",
    "started_at": "2026-11-22T22:43:11.374Z",
    "matched": 40,
    "suggested": 12,
    "exceptions": 8,
    "changed": 0
  }
}
Try it

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

Accept a suggested match#

POST/v2/reconciliation/{id}/accept
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response ReconItem

The same ReconItem object as List reconciliation items.

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.

  • 409conflict

    The object changed or already exists, or the Idempotency-Key was reused with a different body.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/reconciliation/rec_01M7WD33S9B685QA2ACXYP6RH7/accept" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "id": "rec_01M7WD33S9B685QA2ACXYP6RH7",
  "object": "recon_item",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-20T11:57:25.673Z",
  "status": "matched",
  "links": {
    "authorization": null,
    "clearing": null,
    "receipt_id": "rcpt_01M7Q89NS9RXYM9FJP9QC39F0W",
    "document_id": "doc_01M7P393MKSKT0FMN8V6WSS4N4",
    "provider_bill": "bill_2c5a82cbd7df"
  },
  "intent_id": "pi_01M7Q89NS9RXYM9FJP9QC39F0W",
  "agent": {
    "id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
    "name": "Code reviewer"
  },
  "counterparty": "Anthropic",
  "amount": {
    "amount": 41,
    "asset": "USD"
  },
  "diff": null,
  "reason": null,
  "suggestion": null,
  "occurred_at": "2026-11-18T11:58:39.673Z",
  "rail": "ai",
  "expected": [
    "provider_bill",
    "receipt"
  ],
  "reason_code": null,
  "updated_at": "2026-11-23T00:43:13.583Z"
}
Try it

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

Dismiss an exception#

POST/v2/reconciliation/{id}/dismiss
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body JSON
  • reasonstringrequired
Response ReconItem

The same ReconItem object as List reconciliation items.

Errors
  • 400invalid_request

    A field is missing or invalid; fields names each one.

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

  • 409conflict

    The object changed or already exists, or the Idempotency-Key was reused with a different body.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/reconciliation/rec_01M7XGWP8RZQ28W7C6519GB31V/dismiss" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Checking the API from the docs"
  }'
Response 200
{
  "id": "rec_01M7XGWP8RZQ28W7C6519GB31V",
  "object": "recon_item",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-20T22:23:03.960Z",
  "status": "matched",
  "links": {
    "authorization": null,
    "clearing": "clr_4304349fdbd81589",
    "receipt_id": "rcpt_01M7NSPH8RNKVYVC05JGHZQXEB",
    "document_id": null,
    "provider_bill": "bill_4204330cc137"
  },
  "intent_id": "pi_01M7NSPH8RNKVYVC05JGHZQXEB",
  "agent": {
    "id": "agt_01KZT4G44EFC85Y12AEE7YAPF3",
    "name": "Eval runner"
  },
  "counterparty": "Anthropic",
  "amount": {
    "amount": 5699,
    "asset": "USD"
  },
  "diff": {
    "amount": 788,
    "asset": "USD"
  },
  "reason": "Dismissed: Checking the API from the docs",
  "suggestion": null,
  "occurred_at": "2026-11-17T22:24:28.960Z",
  "rail": "ai",
  "expected": [
    "provider_bill",
    "receipt"
  ],
  "reason_code": "dismissed",
  "updated_at": "2026-11-23T00:43:13.585Z"
}
Try it

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

Reject a suggested match#

POST/v2/reconciliation/{id}/reject
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body JSON
  • reasonstring
Response ReconItem

The same ReconItem object as List reconciliation items.

Errors
  • 400invalid_request

    A field is missing or invalid; fields names each one.

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

  • 409conflict

    The object changed or already exists, or the Idempotency-Key was reused with a different body.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/reconciliation/rec_01M7QR88MSYDVC1DHFS12WBXPM/reject" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200
{
  "id": "rec_01M7QR88MSYDVC1DHFS12WBXPM",
  "object": "recon_item",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-18T16:36:16.665Z",
  "status": "unmatched",
  "links": {
    "authorization": null,
    "clearing": null,
    "receipt_id": "rcpt_01M7JKETMSNM4B42D7Q2349Q89",
    "document_id": null,
    "provider_bill": "bill_0218766d2b7b"
  },
  "intent_id": "pi_01M7JKETMSNM4B42D7Q2349Q89",
  "agent": {
    "id": "agt_01KZT4G44EFC85Y12AEE7YAPF3",
    "name": "Eval runner"
  },
  "counterparty": "Anthropic",
  "amount": {
    "amount": 360,
    "asset": "USD"
  },
  "diff": null,
  "reason": "You said Anthropic-receipt-99.pdf isn't a match. Link the right document or dismiss the item.",
  "suggestion": null,
  "occurred_at": "2026-11-16T16:37:22.665Z",
  "rail": "ai",
  "expected": [
    "provider_bill",
    "receipt"
  ],
  "reason_code": "suggestion_rejected",
  "updated_at": "2026-11-23T00:43:13.593Z"
}
Try it

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

Run reconciliation#

POST/v2/reconciliation/run
Response ReconRun
  • object"recon_run"
  • idId
  • started_atTimestamp
  • matchednumber
  • suggestednumber
  • exceptionsnumber
  • changednumberoptional
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.

  • 409conflict

    The object changed or already exists, or the Idempotency-Key was reused with a different body.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/reconciliation/run" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "object": "recon_run",
  "id": "rrun_081582653715a3b5",
  "started_at": "2026-11-23T00:43:13.579Z",
  "matched": 40,
  "suggested": 15,
  "exceptions": 5,
  "changed": 3
}
Try it

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