Nimbu JS SDK
Use the Nimbu JavaScript SDK to read, write, and organize Nimbu data from Cloud Code, themes, browsers, and server-side integrations.
The Nimbu JS SDK is the main JavaScript interface for Nimbu data. It wraps the REST API in objects, queries, collections, relations, files, customers, orders, products, pages, and a small set of direct API helpers.
Use it when you want to:
- read and write channel entries
- query content, customers, products, pages, and orders
- update relations, files, galleries, ACLs, and select fields
- call Cloud Functions
- build browser, theme, Cloud Code, or server-side integrations against the same data model
Mental Model
Most SDK work follows the same shape:
const article = await new Nimbu.Query('articles').get(articleId);
article.set('status', 'published');
article.increment('views', 1);
await article.save();Nimbu.Object represents one record. Nimbu.Query finds records. Nimbu.Collection groups records returned by a query. Specialized classes such as Nimbu.Customer, Nimbu.Product, Nimbu.Order, and Nimbu.Page use the same object model but route requests to their built-in endpoints.
Where It Runs
| Environment | Setup | Typical use |
|---|---|---|
| Cloud Code | Already available as global Nimbu; no initialize() needed. | Jobs, callbacks, routes, admin extensions, integrations. |
| Theme/browser | Load the browser bundle or import package, then call Nimbu.initialize(...). | Storefront interactions, customer sessions, Cloud Function calls. |
| External Node/server | Import package, configure storage/Ajax if needed, then call Nimbu.initialize(...). | Backoffice automation, sync jobs, service integrations. |
| React Native | Import react-native.js so AsyncStorage is wired. | Mobile app data access and customer sessions. |
Start Here
- Getting Started for install, imports, browser bundles, and initialization.
- Environment Differences for Cloud Code vs browser vs external usage.
- Objects & Channels for CRUD and request options.
- Queries for filtering, pagination, and batch iteration.
- Relations & Field Types for relations, atomics, files, galleries, and select fields.
- Recipes for common workflows.
- Curated Reference for stable public APIs.