SDKs & Client Libraries
Official client libraries and SDKs to help you integrate with the Mahalo Health API more easily.
Available SDKs
We provide official SDKs for the following languages and platforms:
JavaScript / TypeScript
StableA fully-typed JavaScript/TypeScript SDK for Node.js and browser environments.
Getting Started
Here's how to get started with our SDKs:
Installation
# Using npm
npm install @mahalo-health/sdk
# Using yarn
yarn add @mahalo-health/sdk
# Using pnpm
pnpm add @mahalo-health/sdkBasic Usage
import { MahaloClient } from '@mahalo-health/sdk';
// Initialize the client
const client = new MahaloClient({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
environment: 'production' // or 'sandbox' for testing
});
// Example: Fetch patients
async function getPatients() {
try {
const patients = await client.patients.list({
limit: 10,
offset: 0
});
console.log('Patients:', patients.data);
console.log('Pagination:', patients.pagination);
} catch (error) {
console.error('Error fetching patients:', error);
}
}
getPatients();Security Note
Never hardcode your client credentials in your application code. Use environment variables or a secure credential management system.
SDK Features
- Automatic authentication and token management
- Type-safe API interfaces (where language supports it)
- Automatic pagination handling
- Comprehensive error handling
- Retry mechanisms for transient failures
- Logging and debugging tools
- Full coverage of all API endpoints
Community Libraries
In addition to our official SDKs, there are several community-maintained libraries for integrating with the Mahalo Health API:
| Library | Language | Maintainer | Link |
|---|---|---|---|
| mahalo-go | Go | Community | GitHub |
| mahalo-php | PHP | Community | GitHub |
| mahalo-dotnet | .NET | Community | GitHub |
Note: Community libraries are not officially supported by Mahalo Health. Use at your own discretion.
OpenAPI Specification
If you prefer to generate your own client or need to integrate with a language we don't support yet, you can use our OpenAPI specification:
