Alokai

getCustomers

Fetches customers data

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

Signature

declare function getCustomers$1(
	props?: GetCustomersParameters,
	options?: MethodOptions
): Promise<GetCustomersResponse>;

Parameters

NameRequiredTypeDescription
propsOptionalGetCustomersParametersParameter 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 user object as a first item in an array.

Referenced Types

Examples

Fetching a user that matches the id from the customer-data cookie

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

const customer = await sdk.bigcommerce.getCustomers({
  include: 'addresses, formfields'
})

On this page