updateCustomer
Updates a customer.
This method communicates with the updateCustomer endpoint of the Vue Storefront API Middleware. In turn, it exchanges data with the updateCustomer or the Update a Customer endpoints exposed by SCAPI / OCAPI depending on the middleware configuration.
Signature
export declare function updateCustomer(
props: UpdateCustomerParams
): Promise<UpdateCustomerResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | UpdateCustomerParams |
Returns
Returns a representation of a Customer.
Referenced Types
UpdateCustomerParamsUpdateCustomerResponse
Examples
Updates a customer.
import { sdk } from '~/sdk.config.ts';
const userModification = await sdk.commerce.updateCustomer({
email: 'test.email@mail.com',
firstName: 'John',
lastName: 'Doe',
});