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

Accounting links API

Sync to QuickBooks, Xero, NetSuite and Sage Intacct with your account mapping.

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.

Disconnect an accounting system#

POST/v2/accounting-links/{id}/disconnect
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response AccountingLink

The same AccountingLink object as List accounting links.

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 request only (not run: it changes the org for good)
Request
curl -X POST "https://api.ndstill.com/v2/accounting-links/acl_01KWTE22MEQJTR5MKQ5AA39A7Z/disconnect" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Try it

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

Update the account mapping#

POST/v2/accounting-links/{id}/mapping
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body AccountingMappingUpdate
  • category_mappingobject[]
    2 fields
    • categorystringrequired
    • provider_accountstring | nullrequired
  • dimension_mappingobject[]
    2 fields
    • dimensionAccountingDimensionrequired
      "team""agent""customer""task"
    • targetAccountingDimensionTargetrequired
      "none""class""location""department""project""tag"
  • settingsobject
    3 fields
    • post_asstring enum
      "bills""journal_entries"
    • attach_receiptsboolean
    • frequencystring enum
      "manual""hourly""daily"
Response AccountingLink

The same AccountingLink object as List accounting links.

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/accounting-links/acl_01KWTE22MEQJTR5MKQ5AA39A7Z/mapping" \
  -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": "acl_01KWTE22MEQJTR5MKQ5AA39A7Z",
  "object": "accounting_link",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-07-06T00:43:11.374Z",
  "provider": "quickbooks",
  "provider_name": "QuickBooks Online",
  "company": "Acme Robotics (QuickBooks)",
  "status": "connected",
  "mapping": [
    {
      "dimension": "Category: AI models",
      "from": "6400",
      "to_account": "6400 · Software & AI services"
    },
    {
      "dimension": "Category: Travel",
      "from": "6200",
      "to_account": "6200 · Travel"
    },
    {
      "dimension": "Category: Advertising",
      "from": "6300",
      "to_account": "6300 · Marketing"
    }
  ],
  "last_sync_at": "2026-11-23T00:43:13.591Z",
  "next_sync_at": "2026-11-23T01:43:13.591Z",
  "sync_log": [
    {
      "at": "2026-11-23T00:43:13.601Z",
      "synced": 0,
      "errors": 2,
      "message": "Mapping saved."
    },
    {
      "at": "2026-11-23T00:43:13.591Z",
      "synced": 17,
      "errors": 2,
      "message": "2 entries need attention"
    },
    {
      "at": "2026-11-22T23:56:11.374Z",
      "synced": 12,
      "errors": 0,
      "message": "Synced"
    }
  ],
  "errors": [
    {
      "at": "2026-11-22T21:56:11.374Z",
      "message": "No account mapping for category Data and APIs",
      "intent_id": "pi_01M7XEBR0H4NHN57RZCWZWE26Y",
      "id": "aerr_06916245e0e5",
      "kind": "mapping",
      "category": "6700",
      "fix": "Map Data and APIs to an account, then sync again."
    },
    {
      "at": "2026-11-22T21:56:11.374Z",
      "message": "Vendor GPU Spot Market doesn't exist in QuickBooks",
      "intent_id": "pi_01M7XBGTER7STYKJNNNDHJ3EBD",
      "id": "aerr_926fd87a4ac2",
      "kind": "vendor",
      "category": null,
      "fix": "Let ndStill create the vendor in QuickBooks Online on the next sync, or skip this entry."
    }
  ],
  "chart_of_accounts": [
    {
      "code": "6000",
      "name": "Cost of services",
      "type": "expense"
    },
    {
      "code": "6100",
      "name": "Software subscriptions",
      "type": "expense"
    },
    {
      "code": "6150",
      "name": "Software and AI services",
      "type": "expense"
    }
  ],
  "category_mapping": [
    {
      "category": "6400 AI models and compute",
      "ndstill_account": "6400",
      "provider_account": "6150",
      "entries_30d": 363
    },
    {
      "category": "6410 Cloud hosting",
      "ndstill_account": "6410",
      "provider_account": "6410",
      "entries_30d": 42
    },
    {
      "category": "6100 Software subscriptions",
      "ndstill_account": "6100",
      "provider_account": "6100",
      "entries_30d": 63
    }
  ],
  "dimension_mapping": [
    {
      "dimension": "team",
      "target": "class"
    },
    {
      "dimension": "agent",
      "target": "tag"
    },
    {
      "dimension": "customer",
      "target": "none"
    }
  ],
  "settings": {
    "post_as": "bills",
    "attach_receipts": true,
    "frequency": "hourly"
  },
  "updated_at": "2026-11-23T00:43:13.601Z"
}
Try it

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

Resolve a sync problem#

POST/v2/accounting-links/{id}/resolve
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body AccountingResolve
  • error_idIdrequired
  • resolutionstring enumrequired
    "skip""create_vendor"
Response AccountingLink

The same AccountingLink object as List accounting links.

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/accounting-links/acl_01KWTE22MEQJTR5MKQ5AA39A7Z/resolve" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "error_id": null,
    "resolution": "skip"
  }'
Response 404
{
  "object": "error",
  "type": "not_found",
  "code": "not_found",
  "message": "No sync error here.",
  "request_id": "req_67f03bed74a998a501cf"
}

The mock answered this sample with an error; its message says why. Adjust the request in Try it below.

Try it

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

Sync to the accounting system#

POST/v2/accounting-links/{id}/sync
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response AccountingLink

The same AccountingLink object as List accounting links.

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/accounting-links/acl_01KWTE22MEQJTR5MKQ5AA39A7Z/sync" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "id": "acl_01KWTE22MEQJTR5MKQ5AA39A7Z",
  "object": "accounting_link",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-07-06T00:43:11.374Z",
  "provider": "quickbooks",
  "provider_name": "QuickBooks Online",
  "company": "Acme Robotics (QuickBooks)",
  "status": "connected",
  "mapping": [
    {
      "dimension": "Category: AI models",
      "from": "6400",
      "to_account": "6400 · Software & AI services"
    },
    {
      "dimension": "Category: Travel",
      "from": "6200",
      "to_account": "6200 · Travel"
    },
    {
      "dimension": "Category: Advertising",
      "from": "6300",
      "to_account": "6300 · Marketing"
    }
  ],
  "last_sync_at": "2026-11-23T00:43:13.591Z",
  "next_sync_at": "2026-11-23T01:43:13.591Z",
  "sync_log": [
    {
      "at": "2026-11-23T00:43:13.591Z",
      "synced": 17,
      "errors": 2,
      "message": "2 entries need attention"
    },
    {
      "at": "2026-11-22T23:56:11.374Z",
      "synced": 12,
      "errors": 0,
      "message": "Synced"
    },
    {
      "at": "2026-11-22T22:56:11.374Z",
      "synced": 32,
      "errors": 0,
      "message": "Synced"
    }
  ],
  "errors": [
    {
      "at": "2026-11-22T21:56:11.374Z",
      "message": "No account mapping for category Data and APIs",
      "intent_id": "pi_01M7XEBR0H4NHN57RZCWZWE26Y",
      "id": "aerr_06916245e0e5",
      "kind": "mapping",
      "category": "6700",
      "fix": "Map Data and APIs to an account, then sync again."
    },
    {
      "at": "2026-11-22T21:56:11.374Z",
      "message": "Vendor GPU Spot Market doesn't exist in QuickBooks",
      "intent_id": "pi_01M7XBGTER7STYKJNNNDHJ3EBD",
      "id": "aerr_926fd87a4ac2",
      "kind": "vendor",
      "category": null,
      "fix": "Let ndStill create the vendor in QuickBooks Online on the next sync, or skip this entry."
    }
  ],
  "chart_of_accounts": [
    {
      "code": "6000",
      "name": "Cost of services",
      "type": "expense"
    },
    {
      "code": "6100",
      "name": "Software subscriptions",
      "type": "expense"
    },
    {
      "code": "6150",
      "name": "Software and AI services",
      "type": "expense"
    }
  ],
  "category_mapping": [
    {
      "category": "6400 AI models and compute",
      "ndstill_account": "6400",
      "provider_account": "6150",
      "entries_30d": 363
    },
    {
      "category": "6410 Cloud hosting",
      "ndstill_account": "6410",
      "provider_account": "6410",
      "entries_30d": 42
    },
    {
      "category": "6100 Software subscriptions",
      "ndstill_account": "6100",
      "provider_account": "6100",
      "entries_30d": 63
    }
  ],
  "dimension_mapping": [
    {
      "dimension": "team",
      "target": "class"
    },
    {
      "dimension": "agent",
      "target": "tag"
    },
    {
      "dimension": "customer",
      "target": "none"
    }
  ],
  "settings": {
    "post_as": "bills",
    "attach_receipts": true,
    "frequency": "hourly"
  }
}
Try it

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

Connect an accounting system#

POST/v2/accounting-links/connect
Request body AccountingConnect
  • providerAccountingProviderrequired
    "quickbooks""xero""netsuite""intacct"
  • companystring
  • account_idstring
Response AccountingLink

The same AccountingLink object as List accounting links.

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.

  • 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/accounting-links/connect" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "quickbooks"
  }'
Response 409
{
  "object": "error",
  "type": "conflict",
  "code": "conflict",
  "message": "QuickBooks Online is already connected.",
  "request_id": "req_a279e94f7eddc8759b7e"
}

The mock answered this sample with an error; its message says why. Adjust the request in Try it below.

Try it

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