Skip to content

EXP-2414: Remove client-facing Accounting API reference - #1889

Open
pmckinney-codat wants to merge 5 commits into
mainfrom
exp-2414-remove-accounting-api-reference
Open

pmckinney-codat wants to merge 5 commits into
mainfrom
exp-2414-remove-accounting-api-reference

Conversation

@pmckinney-codat

@pmckinney-codat pmckinney-codat commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

What

Removes the client-facing Accounting API reference from docs.codat.io — /accounting-api becomes a hard 404, no redirect:

  • Deletes the /accounting-api reference page (src/pages/accounting-api/index.tsx)
  • Deletes the publicly downloadable OAS spec (static/oas/Codat-Accounting.json)
  • Removes the dead sidebars/accounting-api.js config (its require in sidebars.js was already commented out and the doc pages it references were removed long ago)
  • Rewrites the 72 internal doc links that pointed into /accounting-api#/… to the product references that still document the same endpoints and models:
    • Reads (schemas, list/get endpoints) → Lending API reference, which documents the same accounting data
    • Bank transaction writes in bank-feeds docs → Bank Feeds API
    • Bill Pay use case guides and other writes → Sync for Payables API
    • Tax rate schemas → Sync for Payables (Lending has no TaxRate schema)
    • De-links the two with no surviving equivalent (Items schema in the Xero FAQ, and the Accounting API entry in the using-the-api overview nav list)

Every new link target was verified against the specs in static/oas. The pre-existing redirects for the long-removed doc pages (/accounting-api/overview/using-the-api/overview etc.) are untouched — they point at unrelated live pages.

Notes on /updates

The two legacy announcements under /updates (Apr and Sep 2023) that reference the old page are left as published — we don't edit historical announcements. The only touch is making the one relative link in the Sep 2023 post absolute (same destination): the CI link checker skips absolute docs.codat.io URLs but would fail every future PR on a relative link to the removed page.

Why

The reference was unlisted but still publicly served, and a client found it via the URL. Tom confirmed the Lending API reference documents the same properties, so anyone who needs it (Lloyds, Amex) can be pointed there. An auth-walled internal copy lives at accounting-api-ref.codat.ai for emergencies.

  • Ticket: EXP-2414
  • Slack thread: #docs discussion
  • Companion PR (stops the OAS pipeline re-adding the spec): codat-internal/oas#90 — merged
  • Product review sheet for the new link targets: shared internally via Claude artifact (ask Phil)

Verification

npm run build passes locally: no page or redirect stub is emitted at /accounting-api, Codat-Accounting.json is absent from the build output, and no built page links to /accounting-api. Prettier and cspell pass on all touched files. The CI link check on this PR reported zero broken links.

🤖 Generated with Claude Code

The Accounting API reference at /accounting-api was unlisted but still
publicly served, and a client found it via the URL. An auth-walled
internal copy now lives at accounting-api-ref.codat.ai, so the
client-facing page and its OAS spec can go.

- Delete the /accounting-api reference page and Codat-Accounting.json
- Remove the accounting-api sidebar config (unused since its doc pages
  were removed; the require was already commented out)
- Redirect /accounting-api to /lending-api, which documents the same
  properties, so existing deep links don't 404

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://codatio.github.io/codat-docs/pr-preview/pr-1889/

Built to branch gh-pages at 2026-09-16 15:44 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Drop the /accounting-api -> /lending-api redirect: the URL should be
completely dead, not forward anywhere. That means the ~60 internal doc
links into the old reference would 404, so rewrite them to the product
references that still document the same endpoints and models:

- Reads (schemas, list/get endpoints) -> Lending API reference, which
  documents the same accounting data (per the Slack thread)
- Bank transaction writes in bank-feeds docs -> Bank Feeds API
- Bill Pay use case guides and other writes -> Sync for Payables API
- Tax rate schemas -> Sync for Payables (Lending has no TaxRate schema)
- De-link the few with no surviving equivalent (Items schema,
  delete-journal-entry, the Accounting API entries in historical blog
  posts and the using-the-api overview nav list)

Every new target was verified against the specs in static/oas.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

vale

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('be supported').

In some cases where a bill is being created in your application, the company may also want to save a copy of the pdf invoice against the bill in their accounting software. This can be supported via the [bill attachments API](/sync-for-payables-api#/operations/upload-bill-attachment)


📝 [vale] <Google.Will> reported by reviewdog 🐶
Avoid using 'will'.

The [create account model](/sync-for-payables-api#/operations/get-create-account-model) provides a list of the companies enabled currencies, this will return:


📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('being made').

Then you should [create a bank account](/sync-for-payables-api#/operations/create-bank-account) with an `accountType` of `Debit` to represent the account the payments are being made from:


📝 [vale] <Google.Parens> reported by reviewdog 🐶
Use parentheses judiciously.

A list of unpaid [bills](/sync-for-payables-api#/schemas/Bill) (accounts payable invoices) can be retrieved from the accounting software, in the Accounting API a bill is an itemised record of goods purchased from or services provided by a supplier.


📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('be retrieved').

A list of unpaid [bills](/sync-for-payables-api#/schemas/Bill) (accounts payable invoices) can be retrieved from the accounting software, in the Accounting API a bill is an itemised record of goods purchased from or services provided by a supplier.


📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('is set').

Note that if locations is set to mandatory in the companies NetSuite Account, the `reference` is required and should be an `id` from the [trackingCategories](/sync-for-payables-api#/operations/list-tracking-categories) prefixed with location.


📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('is required').

Note that if locations is set to mandatory in the companies NetSuite Account, the `reference` is required and should be an `id` from the [trackingCategories](/sync-for-payables-api#/operations/list-tracking-categories) prefixed with location.


📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('be retrieved').

Sage Intacct uses a `paymentMethodRef`, the payment method's for a company can be retrieved from the [options API](/sync-for-payables-api#/operations/get-create-update-bill-model)


📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('be retrieved').

Sage Intacct uses a `paymentMethodRef`, the payment method's for a company can be retrieved from the [options API](/sync-for-payables-api#/operations/get-create-update-bill-model)


📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('are sorted').

By default, results are sorted in ascending order. For example, if you want to return a [list of invoices](/lending-api#/operations/list-accounting-invoices) in ascending order, oldest first, use the following syntax: `{parameter}={value}`. In this case, `orderBy=issueDate`.

Comment thread docs/integrations/bank-feeds/qbo-bank-feeds/qbo-bank-feeds.md
Comment thread docs/lending/data-integrity/api-data-integrity.md
Comment thread docs/usecases/bill-pay/bills.md
Comment thread docs/usecases/bill-pay/bills.md
Comment thread docs/usecases/bill-pay/bills.md
The two blog posts are historical announcements and should read as
published. Restore their original wording and link targets; the only
edit kept is making the one relative /accounting-api link absolute
(same destination), because the CI link checker skips absolute
docs.codat.io URLs but would fail every future PR on a relative link
to the now-removed page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread docs/usecases/bill-pay/bills.md
Comment thread docs/usecases/bill-pay/mapping.md
Comment thread docs/usecases/bill-pay/mapping.md
Comment thread docs/usecases/bill-pay/overview.md
Comment thread docs/usecases/bill-pay/overview.md
Comment thread docs/usecases/bill-pay/payments.md
Comment thread docs/usecases/bill-pay/payments.md
Comment thread docs/usecases/bill-pay/payments.md
Comment thread docs/usecases/bill-pay/payments.md
Comment thread docs/using-the-api/ordering-results.md
From the product review of the new link destinations:

- expenses/config-and-categorize: point the account-mapping step at the
  Sync for Expenses options endpoint (get-create-chartOfAccounts-model)
  instead of the Lending list-accounts read
- qbo-bank-feeds docs and the banking proxy example: drop the three
  links into the Lending reference entirely (bank feeds/banking readers
  will not have Lending); text kept

Commerce prerequisites page feedback is pending a scope decision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Product review feedback (Hawi): the page was already dropped from the
sync-for-commerce sidebar and its parent build guide is gone, so it
should have been removed then. It was only reachable by URL, nothing
links to it, and no redirect targets it, so it can go outright -- which
also removes four of the relinked accounting data-type links.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Link check results:

[]

@pmckinney-codat
pmckinney-codat marked this pull request as ready for review September 16, 2026 15:42
| `errorMessage` | | Codat standardizes error messages for the status codes. Error messages returned in the redirect will always be mapped with the status codes listed above. <br/> **403** = "User cancelled." <br/> **500** = "Unknown error occurred." <br/> **501** = "Not supported." <br/> **Note**: If you want to use the original error message from the integration, use `statusText`. |
| `statusText` | _String_ | String as it's passed back from the integration. |
| `data.company.companyName` | _String_ | The name of the connected party within the underlying platform. <br/>This maps to the company name property in the [company info dataset](/accounting-api#/schemas/CompanyDataset). |
| `data.company.companyName` | _String_ | The name of the connected party within the underlying platform. <br/>This maps to the company name property in the [company info dataset](/lending-api#/schemas/AccountingCompanyInfo). |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hawi confirmed this was correct (or as correct as it can be)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants