getCustomers
Fetches customers data
It receives data from the getCustomers endpoint exposed by the BigCommerce API
Signature
declare function getCustomers(
context: BigcommerceIntegrationContext,
params: index_d_exports$1.GetCustomersParameters
): Promise<index_d_exports$1.GetCustomersResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext | |
params | Required | index_d_exports$1.GetCustomersParameters |
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'
})