Skip to main content
This page covers three SDK namespaces: the server-side Management API, the Pages API, and the Components API.

Management API (Server-side Only)

The sdk.management namespace provides server-side operations for analytics, inventory management, order management, and data export. These methods require a secretKey in the SDK configuration.
Management methods must only be called from a server-side environment (Node.js, SSR, API routes). They will fail without a secretKey.

management.getAnalytics(params?)

Retrieve store analytics data.
Parameters:

management.updateInventory(data)

Update product inventory.
Parameters: Returns: { success: boolean }

management.getOrders(params?)

Get orders with server-side filters (more powerful than customer-facing order listing).
Parameters: Returns: { data: Order[]; pagination?: Pagination }

management.exportCustomers(params?)

Export customer data.
Parameters:

management.getWebhookData(params?)

Retrieve webhook event data.

Pages API

The sdk.pages namespace retrieves static pages configured in the store (e.g., About Us, Terms, Privacy Policy).

pages.getAll()

Get all published pages.
Returns: Page[]

pages.getByUrl(url)

Get a specific page by its URL slug.
Returns: Page

Components API

The sdk.components namespace retrieves homepage components configured by the store owner (featured sections, promotional blocks, etc.).

components.getAll()

Get all homepage components.

components.getById(id)

Get a specific component by ID.

components.getProducts(id, params?)

Get the products associated with a component.

Example: Server-side Analytics Dashboard