The Vue Storefront Essentials Course is now available! Learn More
Settings

Settings

Introduction

This section will cover the basics of the settings API's that are used to retrieve the site's meta data and information about the channel.

API Reference

You can find all available BigCommerce module methods and their description in the API Reference.

Get Channel

To get the information about the channel, you can use the getChannel method. The channel id will be automatically picked up from the cookie in the requests header.

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

const channelResponse = await sdk.bigcommerce.getChannel();

To include the information about the channels subresources in the response, use the include property in the payload.

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

const channelResponse = await sdk.bigcommerce.getChannel({include: 'currencies'});

Get Site

To fetch the a list of sites linked to sales channels, you can use the getSite method. The channel id will be automatically picked up from the cookie in the requests header.

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

const siteData = await sdk.bigcommerce.getSite();