INSTALL THE CLIENT
npm install accountingshUse the repository documentation to choose a compatible release and confirm package availability.
A first read in the sandbox
Set ACCOUNTING_API_TOKEN to a sandbox company credential in your server environment. Handle failures before using the result in your application.
import { Accounting } from "accountingsh";
const token = process.env.ACCOUNTING_API_TOKEN;
if (!token) throw new Error("Set ACCOUNTING_API_TOKEN");
const api = new Accounting(token, "https://sandbox.api.accounting.sh");
const accounts = await api.accounts.listAccounts(null, 1, 10);Build with JavaScript
Connect Node.js services and server-side JavaScript workflows to your company records. Keep private API credentials out of browser bundles.
Install and choose a release
The installation command below uses the package name declared by the SDK project. Consult the linked repository for release availability, requirements and the documentation matching your installed version. Pin the release you test instead of assuming every version exposes the same methods.
Start with a small read
Enable API access for the company, then use the SDK’s documented configuration for the intended environment and credential. Start by listing a resource and inspect pagination and error responses. The API reference remains the source for fields and permissions.
Add writes carefully
Validate your inputs and retain returned resource identifiers. Review uncertain network results before repeating a write. Connect webhook processing only after your synchronous workflow is tested, and re-read state before acting on an event.
Understand service boundaries
One payment enables API access forever for your company. See the country price on the pricing page. Integrations have their own access and do not require this purchase.