Alokai

getChannel

Fetches information about the channel

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

Signature

declare function getChannel$1(
	props?: GetChannelParams,
	options?: MethodOptions
): Promise<GetChannelResponse>;

Parameters

NameRequiredTypeDescription
propsOptionalGetChannelParamsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.
optionsOptionalMethodOptions

Returns

Returns a response with the channel object

Referenced Types

Examples

Fetching a channel.

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

const channelResponse = await sdk.bigcommerce.getChannel()

Fetching a channel. Sending it this way, the response can be cached safely.

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

const channel = ...
const channelResponse = await sdk.bigcommerce.getChannel({ channel });

On this page