Alokai

updateCustomer

Updates customers' details.

This method sends a POST request to the updateCustomer endpoint of the Vue Storefront API Middleware. In turn, it receives data from the updateCustomer endpoint exposed by the BigCommerce API This method must be called with users credentials. The data will be updated only if the credentials are correct.

Signature

declare function updateCustomer(
	props: UpdateCustomerParameters,
	options?: MethodOptions
): Promise<UpdateCustomerResponse>;

Parameters

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

Returns

Returns a response with an array where customer object is the first item.

Referenced Types

Examples

Updating customers' details

import { sdk } from '~/sdk.config.ts';
const updateCustomerResponse = await sdk.bigcommerce.updateCustomer({
  validation: {
    email: 'john@doe.com',
    password: 'Pa$$w0r4'
  },
  first_name: 'Nicholas'
})

On this page