The User Service exposes two mutation endpoints for modifying an existing user profile. The first,Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gianluca-X/DigitalMoney/llms.txt
Use this file to discover all available pages before exploring further.
PUT /users/update/{userId}, performs a full profile update — replacing name, contact information, email, and role in a single operation. The second, PATCH /users/update/alias/{id}, is a targeted alias-only update. Both endpoints require a valid JWT and enforce the same owner-or-admin access control as the GET endpoint.
Full Profile Update
http://localhost:8085
Full URL: http://localhost:8085/users/update/{userId}
Authentication
userId being updated, or the principal must hold ROLE_ADMIN. Requests without a valid token are rejected with 401 Unauthorized.
Path Parameters
The numeric identifier of the user profile to update.
Request Body
All fields inUserEntryDto are accepted. Although the DTO marks them as @NotBlank, the update service layer applies only the non-null fields you supply.
Updated first name for the user.
Updated last name for the user.
Updated contact phone number.
Updated email address. Must remain unique across the platform. When provided, the change is propagated to the Auth Service via a synchronous Feign call before the local record is updated.
Updated national identity document number.
New password. Send in plain text — the Auth Service BCrypt-hashes it before persisting.
The auth-service record ID for this user. Required when the service needs to forward an email or role change to the Auth Service.
Updated role for the user. Accepted values:
USER, ADMIN. When provided, the change is forwarded to the Auth Service.Response
Returns200 OK with a plain-text confirmation message.
Example
Alias-Only Update
http://localhost:8085/users/update/alias/{id}
Updates only the alias field on the user record.
Authentication
Path Parameters
The numeric identifier of the user whose alias is being changed.
Request Body
The new alias to assign. Must be unique across the entire platform. Aliases
typically follow a three-word dot-separated format (e.g.,
luna.campo.verde).Response
Returns200 OK with a plain-text confirmation message.
Example
Error Codes
| HTTP Status | Description |
|---|---|
400 Bad Request | The requested alias is already in use by another user (AliasAlreadyExistsException), or the new email address is already registered (EmailAlreadyRegisteredException). |
401 Unauthorized | The Authorization header is missing or the token is invalid/expired; or the authenticated user is not the owner of the target profile and does not hold ROLE_ADMIN (UnauthorizedException). |
404 Not Found | No user exists with the provided userId or id. |
