Alokai

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

NameRequiredTypeDescription
propsRequiredUpdateCustomerParams

Returns

Returns a representation of a Customer.

Referenced Types

  • UpdateCustomerParams
  • UpdateCustomerResponse

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',
});

On this page