Behio Storefront SDK
Customer

Profile & Addresses

Customer profile management and address book

Profile

Get Profile

const profile = await client.customer.getProfile();
// { id, email, firstName, lastName, phone }

Update Profile

const updated = await client.customer.updateProfile({
  firstName: 'Jan',
  lastName: 'Novak',
  phone: '+420123456789',
});

Change Password

await client.customer.changePassword('oldPassword', 'newPassword');

Addresses

List

const { items } = await client.customer.getAddresses();

Create

const address = await client.customer.createAddress({
  firstName: 'Jan',
  lastName: 'Novak',
  street: 'Vodickova 12',
  city: 'Praha',
  zip: '11000',
  country: 'CZ',
  isDefault: true,
});

Update

const updated = await client.customer.updateAddress('address-id', {
  street: 'Na Prikope 5',
});

Delete

await client.customer.deleteAddress('address-id');

On this page