Alokai
You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x

updateUserAddress

Update an existing customer address in SAP Commerce Cloud.

This method exchanges data with the updateAddress endpoint exposed by the SAP OCC API Address Controller.

This method works only in an authenticated user session (i.e. when the vsf-sap-token cookie is present in the request). It only updates the fields provided in the address param.

Signature

export declare function updateUserAddress(
	context: SapccIntegrationContext,
	props: UpdateAddressProps
): Promise<void>;

Parameters

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

Returns

This method does not return anything.

Referenced Types

Examples

Updating a customer address.

import { sdk } from '~/sdk';

await sdk.commerce.updateUserAddress({
  addressId: '8796879552535',
  address: {
    line1: 'Line 1'
  }
});

On this page