updateCustomer
Updates customers' details.
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(
context: BigcommerceIntegrationContext,
params: UpdateCustomerParameters
): Promise<UpdateCustomerResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext | |
params | Required | UpdateCustomerParameters |
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'
})