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
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | UpdateCustomerParameters | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions |
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'
})