DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsSDK ReferenceDashClient
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
admin moduleDashClientaffiliates moduledash.productsauth moduledash.categoriesblog moduledash.cartbrands moduledash.checkoutcalendar moduledash.authCart Moduledash.customercategories moduledash.blogcheckout moduledash.reviewscoa moduledash.shippingcontact moduledash.discountscontent-types moduledash.locationsdash.getGlobalDatadiscount-store moduledash.contactearn-points moduledash.seoemail moduleforms modulehtml-templates modulelegal modulemarketing modulemedia modulepage-groups modulepages modulepayment modulePayment Methods Moduleproducts modulereferrals moduleseo moduleshipping modulesitemap moduletax moduleSubscriptions Moduletracking moduleupload moduleinsights modulesurvey module
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

DashClient

Initialize the SDK client with your API key.

Updated March 29, 2026

On this page
  • DashClient
  • Constructor
  • Properties
  • Core Methods
  • Modules
  • Content & Frontend (All Org Types)
  • E-commerce & Wholesale
  • Additional Modules
  • TypeScript
  • ISR Revalidation Helper

DashClient

The main entry point for the SDK. All modules are accessed as properties of the client instance. DashClient works for all organization types — e-commerce, service, and wholesale.

Constructor

typescript
import { DashClient } from "dash4devs"

const dash = new DashClient({
  apiKey: "pk_live_...",                          // required
  baseURL: "https://api.dashfordevs.com",          // optional, auto-detected
})

Properties

PropertyTypeDescription
apiKeystringThe API key used for authentication
baseURLstringBackend API URL
versionstringSDK version ("0.1.0")

Core Methods

typescript
// Health check — verify API key and get org info
const info = await dash.ping()

// Get store-wide settings (name, logo, currency, etc.)
const data = await dash.getGlobalData()

// Get page data by path or name
const page = await dash.getPageData("/about")

// Session management
const sessionId = dash.getSessionId()
dash.setSessionId("custom-session-id")

Modules

Available modules depend on your organization type, but all modules are accessible through the SDK regardless — the API returns appropriate data for your org type.

Content & Frontend (All Org Types)

ModuleAccessDocs
Blogdash.blogdash.blog
Contactdash.contactdash.contact
Authdash.authdash.auth
SEOdash.seodash.seo
Global Datadash.getGlobalData()dash.getGlobalData
Pagesdash.pagesPages
Content Typesdash.contentTypesContent Types
Mediadash.mediaMedia

E-commerce & Wholesale

ModuleAccessDocs
Productsdash.productsdash.products
Categoriesdash.categoriesdash.categories
Cartdash.cartdash.cart
Checkoutdash.checkoutdash.checkout
Shippingdash.shippingdash.shipping
Locationsdash.locationsdash.locations
Discountsdash.discountStoredash.discounts

Additional Modules

dash.payment, dash.tracking, dash.email, dash.marketing, dash.upload, dash.brands, dash.affiliates, dash.tax, dash.referrals, dash.earnPoints, dash.legal, dash.coa, dash.sitemap, dash.admin

TypeScript

The SDK ships with full TypeScript definitions. Import types directly:

typescript
import type { Product, CartItem, Category, Pagination } from "dash4devs"

ISR Revalidation Helper

typescript
import { createRevalidateHandler } from "dash4devs"

// app/api/revalidate/route.ts
export const POST = createRevalidateHandler({
  secret: process.env.REVALIDATION_SECRET!,
})
Previousadmin moduleNextaffiliates module

On this page

  • DashClient
  • Constructor
  • Properties
  • Core Methods
  • Modules
  • Content & Frontend (All Org Types)
  • E-commerce & Wholesale
  • Additional Modules
  • TypeScript
  • ISR Revalidation Helper