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 /v1/users/me
Section titled “GET /v1/users/me”Get current user profile
Responses:
200: User profile retrieved.401: Unauthorized.
PATCH /v1/users/me
Section titled “PATCH /v1/users/me”Update user profile
Request body: UpdateProfileDto.
Responses:
200: Profile updated successfully.400: Invalid input.401: Unauthorized.
POST /v1/users/me/addresses
Section titled “POST /v1/users/me/addresses”Create new address
Request body: CreateAddressDto.
Responses:
201: Address created successfully.400: Invalid address data.401: Unauthorized.
DELETE /v1/users/me/addresses/{addressId}
Section titled “DELETE /v1/users/me/addresses/{addressId}”Delete address
Parameters:
addressIdin path (string, required).
Responses:
204: Address deleted successfully.401: Unauthorized.404: Address not found.
PATCH /v1/users/me/addresses/{addressId}
Section titled “PATCH /v1/users/me/addresses/{addressId}”Update address
Parameters:
addressIdin 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:
addressIdin path (string, required).
Request body: SetDefaultAddressDto.
Responses:
200: Default address updated.401: Unauthorized.404: Address not found.
GET /v1/users/me/notification-preferences
Section titled “GET /v1/users/me/notification-preferences”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.
Schemas
Section titled “Schemas”ChannelConsentDto
Section titled “ChannelConsentDto”email(boolean, optional).sms(boolean, optional).push(boolean, optional).
CreateAddressDto
Section titled “CreateAddressDto”label(string, max length 50, optional).fullName(string, max length 100, required).phone(string, patternPHONE_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).
SetDefaultAddressDto
Section titled “SetDefaultAddressDto”isDefaultShipping(boolean, optional).isDefaultBilling(boolean, optional).
UpdateAddressDto
Section titled “UpdateAddressDto”label(string, max length 50, optional).fullName(string, max length 100, optional).phone(string, patternPHONE_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).
UpdateNotificationPreferencesDto
Section titled “UpdateNotificationPreferencesDto”LIFECYCLE(ChannelConsentDto, optional).MARKETING(ChannelConsentDto, optional).
UpdateProfileDto
Section titled “UpdateProfileDto”firstName(string, max length 100, optional).lastName(string, max length 100, optional).email(string, optional).phone(string, patternPHONE_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).