Accounting links API
Sync to QuickBooks, Xero, NetSuite and Sage Intacct with your account mapping.
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 accounting links#
/v2/accounting-links- 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).
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"accounting_link"
- org_idId
- created_atTimestamp
- updated_atTimestampoptional
- test_modebooleanoptional
True for test-mode objects (simulations, sandbox).
- providerAccountingProvider
"quickbooks""xero""netsuite""intacct" - provider_namestring
- companystring
- statusstring enum
"connected""error""disconnected" - mappingobject[]
3 fields
- dimensionstring
- fromstring
- to_accountstring
- last_sync_atTimestamp | null
- next_sync_atTimestamp | null
- sync_logobject[]
4 fields
- atTimestamp
- syncednumber
- errorsnumber
- messagestring
- errorsAccountingError[]
AccountingError: 7 fields
- idIdoptional
Present on errors raised after Books v2 (resolve by id).
- atTimestamp
- messagestring
- intent_idId | null
- kindstring enumoptional
mapping = a category has no account; vendor = vendor missing in the ledger; period = the period is closed.
"other""vendor""mapping""period" - categorystring | nulloptional
The ndStill category behind a mapping error.
- fixstringoptional
What to do next, in plain language.
- chart_of_accountsobject[]optional
The provider's chart of accounts (what categories can map to).
3 fields
- codestring
- namestring
- typestring enum
"expense""asset""liability"
- category_mappingobject[]optional
ndStill expense categories → provider accounts (null = not mapped).
4 fields
- categorystring
- ndstill_accountstring
- provider_accountstring | null
- entries_30dnumber
- dimension_mappingobject[]optional
Attribution dimensions → provider tracking fields.
2 fields
- dimensionAccountingDimension
"team""agent""customer""task" - targetAccountingDimensionTarget
"none""class""location""department""project""tag"
- settingsobjectoptional
3 fields
- post_asstring enum
"bills""journal_entries" - attach_receiptsboolean
- frequencystring enum
"manual""hourly""daily"
- 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.
curl -X GET "https://api.ndstill.com/v2/accounting-links?limit=2" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"object": "list",
"data": [
{
"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-22T23:56:11.374Z",
"next_sync_at": "2026-11-23T00:56:11.374Z",
"sync_log": [
{
"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"
},
{
"at": "2026-11-22T21:56:11.374Z",
"synced": 25,
"errors": 2,
"message": "2 entries need an account mapping"
}
],
"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"
}
}
],
"has_more": false,
"next_cursor": null,
"total": 1
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Retrieve an accounting link#
/v2/accounting-links/{id}- idIdrequired
A prefixed ID from this org.
The same AccountingLink object as List accounting links.
- 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.
curl -X GET "https://api.ndstill.com/v2/accounting-links/acl_01KWTE22MEQJTR5MKQ5AA39A7Z" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"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-22T23:56:11.374Z",
"next_sync_at": "2026-11-23T00:56:11.374Z",
"sync_log": [
{
"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"
},
{
"at": "2026-11-22T21:56:11.374Z",
"synced": 25,
"errors": 2,
"message": "2 entries need an account mapping"
}
],
"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"
}
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Disconnect an accounting system#
/v2/accounting-links/{id}/disconnect- idIdrequired
A prefixed ID from this org.
The same AccountingLink object as List accounting links.
- 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.
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)"Runs against the in-browser mock with a test key. Nothing leaves your browser.
Update the account mapping#
/v2/accounting-links/{id}/mapping- idIdrequired
A prefixed ID from this org.
- 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"
The same AccountingLink object as List accounting links.
- 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.
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 '{}'{
"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"
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Resolve a sync problem#
/v2/accounting-links/{id}/resolve- idIdrequired
A prefixed ID from this org.
- error_idIdrequired
- resolutionstring enumrequired
"skip""create_vendor"
The same AccountingLink object as List accounting links.
- 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.
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"
}'{
"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.
Runs against the in-browser mock with a test key. Nothing leaves your browser.
Sync to the accounting system#
/v2/accounting-links/{id}/sync- idIdrequired
A prefixed ID from this org.
The same AccountingLink object as List accounting links.
- 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.
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)"{
"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"
}
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Connect an accounting system#
/v2/accounting-links/connect- providerAccountingProviderrequired
"quickbooks""xero""netsuite""intacct" - companystring
- account_idstring
The same AccountingLink object as List accounting links.
- 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.
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"
}'{
"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.
Runs against the in-browser mock with a test key. Nothing leaves your browser.