Quickstart
This guide walks you through installing the Atrope SDK and making your first API call.
Install
npm install @atrope-ai/api-client
# or
bun add @atrope-ai/api-client
Create a client
import { createImsApiClient } from "@atrope-ai/api-client";
const ims = createImsApiClient({
baseUrl: "https://api.atrope.dev",
});
The client is a plain object — no classes, no global state. Create one per tenant or re-use it across your application.
Make your first call
const health = await ims.getHealth();
console.log(health.status); // "healthy"
const summary = await ims.getInventorySummary();
console.log(`${summary.activeSkus} active SKUs`);
console.log(`${summary.lowStockSkus} items low on stock`);
Fetch live inventory
const items = await ims.getInventoryItems();
for (const item of items) {
console.log(`${item.sku} — ${item.name}: ${item.availableUnits} available at ${item.location}`);
}
Pass a custom fetcher
By default the client uses the global fetch. Pass a custom fetcher for testing, middleware, or edge runtimes:
import { createImsApiClient } from "@atrope-ai/api-client";
const ims = createImsApiClient({
baseUrl: "https://api.atrope.dev",
fetcher: (url, init) =>
fetch(url, {
...init,
headers: {
...init?.headers,
Authorization: `Bearer ${token}`,
},
}),
});
Next steps
- Authentication — how to pass tokens and handle tenant context
- SDK Reference — full method and type documentation
- REST API — call the HTTP endpoints directly if you prefer