Skip to content
You are reading the unreleased documentation. No version is released yet, and these pages describe code that is not in a release.

Users (storefront API)

Storefront and customer routes of the users module. Send Accept-Language (or X-Locale from a browser) on every call; a customer route needs the session cookie.

Get current user profile

Responses:

  • 200: User profile retrieved.
  • 401: Unauthorized.

Update user profile

Request body: UpdateProfileDto.

Responses:

  • 200: Profile updated successfully.
  • 400: Invalid input.
  • 401: Unauthorized.

Create new address

Request body: CreateAddressDto.

Responses:

  • 201: Address created successfully.
  • 400: Invalid address data.
  • 401: Unauthorized.

Delete address

Parameters:

  • addressId in path (string, required).

Responses:

  • 204: Address deleted successfully.
  • 401: Unauthorized.
  • 404: Address not found.

Update address

Parameters:

  • addressId in path (string, required).

Request body: UpdateAddressDto.

Responses:

  • 200: Address updated successfully.
  • 400: Invalid address data.
  • 401: Unauthorized.
  • 404: Address not found.

PATCH /v1/users/me/addresses/{addressId}/default

Section titled “PATCH /v1/users/me/addresses/{addressId}/default”

Set address as default

Parameters:

  • addressId in path (string, required).

Request body: SetDefaultAddressDto.

Responses:

  • 200: Default address updated.
  • 401: Unauthorized.
  • 404: Address not found.

Get the current customer notification-consent map

Responses:

  • 200: Consent map retrieved.
  • 401: Unauthorized.

PATCH /v1/users/me/notification-preferences

Section titled “PATCH /v1/users/me/notification-preferences”

Update the current customer notification-consent map

Request body: UpdateNotificationPreferencesDto.

Responses:

  • 200: Consent map updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • email (boolean, optional).
  • sms (boolean, optional).
  • push (boolean, optional).
  • label (string, max length 50, optional).
  • fullName (string, max length 100, required).
  • phone (string, pattern PHONE_RE, required).
  • addressLine1 (string, max length 255, required).
  • addressLine2 (string, max length 255, optional).
  • city (string, max length 100, required).
  • state (string, max length 100, optional).
  • postalCode (string, max length 20, optional).
  • country (string, pattern /^[A-Z]{2}$/, required).
  • isDefaultShipping (boolean, optional).
  • isDefaultBilling (boolean, optional).
  • isDefaultShipping (boolean, optional).
  • isDefaultBilling (boolean, optional).
  • label (string, max length 50, optional).
  • fullName (string, max length 100, optional).
  • phone (string, pattern PHONE_RE, optional).
  • addressLine1 (string, max length 255, optional).
  • addressLine2 (string, max length 255, optional).
  • city (string, max length 100, optional).
  • state (string, max length 100, optional).
  • postalCode (string, max length 20, optional).
  • country (string, pattern /^[A-Z]{2}$/, optional).
  • isDefaultShipping (boolean, optional).
  • isDefaultBilling (boolean, optional).
  • firstName (string, max length 100, optional).
  • lastName (string, max length 100, optional).
  • email (string, optional).
  • phone (string, pattern PHONE_RE, optional).
  • avatarUrl (string, optional).
  • currentPassword (string, optional).
  • newPassword (string, pattern /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, min length 8, max length 128, optional).
  • locale (string, pattern /^[a-z]{2}(-[A-Z]{2})?$/, min length 2, max length 10, optional).