Skip to main content

JavaScript / TypeScript SDK

The @smartbills/sdk package provides a fully typed TypeScript client for the Smartbills REST API. It handles authentication, pagination, file uploads, error mapping, and automatic retries so you can focus on building your integration.

Features

  • Full TypeScript type definitions for every request and response
  • Automatic retry with exponential back-off on transient failures
  • Structured error hierarchy with type guard helpers
  • Multi-tenant support via businessId context
  • Locale-aware responses (en-CA, fr-CA)
  • ESM and CommonJS dual-module builds
  • FormData-based file uploads and presigned S3 upload flow

Quick start

Available services

The SmartbillsClient exposes the following service objects. Each service groups related API operations.

Requirements

  • Node.js 18 or later
  • TypeScript 5.0 or later (optional but recommended)

Next steps