DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsGlobal DatagetGlobalData()
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
getGlobalData()Currency & PricingFeature FlagsMaintenance Mode
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
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

getGlobalData()

Retrieve store name, logo, contact info, and settings.

Updated March 29, 2026

On this page
  • Overview
  • SDK Usage
  • Layout Example
  • REST API
  • Page Data
  • Next Steps

Overview

Fetch store-wide settings including name, logo, currency, social links, and contact information. This is essential for building layouts, headers, and footers.

SDK Usage

typescript
import dash from "@/lib/dash"

const data = await dash.getGlobalData()

// data.global = {
//   store_name: "My Store",
//   store_description: "The best store around",
//   logo: "https://cdn.dashfordevs.com/logo.png",
//   logo_dark: "https://cdn.dashfordevs.com/logo-dark.png",
//   favicon: "https://cdn.dashfordevs.com/favicon.ico",
//   contact_email: "hello@mystore.com",
//   contact_phone: "555-0123",
//   address: "123 Main St, Austin TX 78701",
//   social_media: {
//     instagram: "https://instagram.com/mystore",
//     facebook: "https://facebook.com/mystore",
//     twitter: "https://twitter.com/mystore",
//   },
//   currency: "USD",
//   timezone: "America/New_York",
//   custom_fields: {},
// }

Layout Example

typescript
// app/layout.tsx
import dash from "@/lib/dash"

export default async function RootLayout({ children }) {
  const { global } = await dash.getGlobalData()

  return (
    <html>
      <head>
        <title>{global.store_name}</title>
        <link rel="icon" href={global.favicon} />
      </head>
      <body>
        <header>
          <a href="/"><img src={global.logo} alt={global.store_name} /></a>
        </header>
        {children}
        <footer>
          <p>{global.store_name} · {global.contact_email}</p>
          <div>
            {global.social_media.instagram && <a href={global.social_media.instagram}>Instagram</a>}
            {global.social_media.facebook && <a href={global.social_media.facebook}>Facebook</a>}
          </div>
        </footer>
      </body>
    </html>
  )
}

REST API

shell
GET /storefront/global
X-API-Key: pk_live_your_key

Page Data

Fetch structured page data configured in the dashboard:

typescript
const page = await dash.getPageData("/about")
// Returns page sections and content configured in the page builder

Next Steps

  • Currency & Pricing — Currency configuration
  • Feature Flags — Toggling storefront features
  • Project Structure — Recommended layout
PreviousTax CalculationNextCurrency & Pricing

On this page

  • Overview
  • SDK Usage
  • Layout Example
  • REST API
  • Page Data
  • Next Steps