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
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | CustomerDeleteAddressParams | Parameter 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
CustomerDeleteAddressParamsCustomerDeleteAddressResult
Examples
Deletes an existing saved customer address.
import { sdk } from '~/sdk.config.ts';
const category = await sdk.commerce.deleteAddress({
addressName: 'Home',
});