You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
deleteUserAddress
Method deleting a customer address in SAP Commerce Cloud.
This method sends a POST request to the deleteAddress endpoint of the Alokai Middleware. In turn, it exchanges data with the removeAddress endpoint exposed by the SAP OCC API Address Controller.
The method deletes a customer address based on the vsf-sap-token cookie (which is assigned to that customer). The cookie must be present in the browser for the method to work properly.
Signature
export declare function deleteUserAddress<Props extends DeleteAddressProps = DeleteAddressProps>(
props: Props,
options?: MethodOptions
): Promise<void>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | Props | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions | Options that can be passed to additionally configure the request or customize the logic in a plugin. |
Returns
This method does not return anything.
Referenced Types
Examples
Deleting a customer address.
import { sdk } from '~/sdk';
await sdk.commerce.deleteUserAddress({ addressId: '8796879552535' });