Skip to main content

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.

Retrieves the complete profile for a registered Digital Money House user. The response includes all identity fields stored in the user table — name, contact details, DNI, and the auto-generated CVU and alias tied to the user’s digital account. Access is restricted: a regular user can only fetch their own record, while a principal bearing the ROLE_ADMIN authority may retrieve any profile.

Endpoint

GET /users/{id}
Base URL: http://localhost:8085 Full URL: http://localhost:8085/users/{id}

Authentication

All requests to this endpoint must include a valid JWT in the Authorization header. The token is validated by the API Gateway before the request reaches the User Service. If the authenticated principal is neither the owner of the requested record nor an admin, the service throws UnauthorizedException, which returns 401 Unauthorized.
Authorization: Bearer <token>

Path Parameters

id
integer
required
The unique numeric identifier of the user to retrieve. Must match the id column in the user table.

Response Fields

A successful 200 OK response returns the full User entity as JSON.
id
integer
Auto-generated primary key for the user record.
firstName
string
The user’s first name (up to 50 characters).
lastName
string
The user’s last name (up to 50 characters).
email
string
The user’s email address. Also serves as the principal identifier used in JWT claims.
dni
string
National identity document number (up to 50 characters).
phone
string
Contact phone number (up to 50 characters).
alias
string
Human-readable unique alias for the digital account (e.g., sol.rio.mar). Auto-generated at registration and unique across the platform (up to 300 characters).
cvu
string
22-character Uniform Virtual Key used for transfers. Auto-generated at registration and unique across the platform.
accountId
integer
The foreign key referencing the user’s associated digital account in the Accounts Service.
authId
integer
The foreign key referencing the user’s record in the Auth Service database.

Example

Request

curl -X GET "http://localhost:8085/users/42" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..."

Response

{
  "id": 42,
  "firstName": "María",
  "lastName": "González",
  "email": "maria.gonzalez@example.com",
  "dni": "30456789",
  "phone": "+5491134567890",
  "alias": "sol.rio.mar",
  "cvu": "0000003100025678901234",
  "accountId": 7,
  "authId": 15
}

Error Codes

HTTP StatusDescription
401 UnauthorizedThe Authorization header is missing, malformed, or the token has expired; or the authenticated user is neither the owner of the requested profile nor an admin (UnauthorizedException).
404 Not FoundNo user exists with the provided id.

Build docs developers (and LLMs) love