Alokai

getSite

Fetches site data.

This method sends a GET request to the getSite endpoint of the Vue Storefront API Middleware. In turn, it receives data from the getSite endpoint exposed by the BigCommerce API

Signature

declare function getSite(
	props?: GetSiteParameters,
	options?: MethodOptions
): Promise<GetSiteResponse>;

Parameters

NameRequiredTypeDescription
propsOptionalGetSiteParameters
optionsOptionalMethodOptions

Returns

Returns a response with the site data including site URLs.

Referenced Types

Examples

Fetching site data

import { sdk } from '~/sdk.config.ts';

const siteData = await sdk.bigcommerce.getSite()

Fetching site data. Sending it this way, the response can be cached safely.

import { sdk } from '~/sdk.config.ts';

const channel = ...
const siteData = await sdk.bigcommerce.getSite({ channel })

On this page