Alokai

deleteAddress

Deletes a saved address of the signed-in customer by address name.

This method communicates with the deleteAddress endpoint of the Vue Storefront API Middleware. In turn, it receives data from the removeCustomerAddress or the Delete customer address endpoints exposed by SCAPI / OCAPI depending on the middleware configuration.

Signature

export declare function deleteAddress(
	props: CustomerDeleteAddressParams
): Promise<CustomerDeleteAddressResult>;

Parameters

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

Returns

Returns an operation status object.

Referenced Types

  • CustomerDeleteAddressParams
  • CustomerDeleteAddressResult

Examples

Deletes an existing saved customer address.

import { sdk } from '~/sdk.config.ts';

const category = await sdk.commerce.deleteAddress({
  addressName: 'Home',
});

On this page