The Accounts Service provides two PATCH endpoints for modifying account data. The general-purposeDocumentation 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.
PATCH /accounts/{id} endpoint accepts an AccountEntryDTO payload and can update any writable account field, returning the full updated record. The targeted PATCH /accounts/update/alias/{id} endpoint updates only the alias field and is the endpoint called by the User Service when an alias change is propagated from the user profile — keeping both services consistent. Both require a valid Bearer JWT.
Update Account
http://localhost:8085
Full URL: http://localhost:8085/accounts/{id}
Authentication
Path Parameters
The primary key of the account to update.
Request Body
Fields are sourced fromAccountEntryDTO. Include only the fields you wish to change.
The primary key of the owning user. Typically not changed after account
creation.
A new unique alias for the account (e.g.,
luna.campo.verde).A new CVU value. Should only be set administratively — CVUs are normally
immutable after generation.
Updated account balance. Use this only for administrative corrections; normal
balance changes should flow through the Transactions Service.
A list of transaction references to associate with this account. Normally
managed by the Transactions Service.
Response Fields
Returns the updatedAccountOutDTO on 200 OK.
The account’s primary key.
The primary key of the owning user.
The alias after the update.
The CVU after the update.
The balance after the update.
Transaction references associated with this account.
Example
Update Alias Only
http://localhost:8085/accounts/update/alias/{id}
Directly updates the alias column for the specified account using a repository-level query. This endpoint is invoked by the User Service whenever a user changes their alias via PATCH /users/update/alias/{id}, ensuring the alias remains consistent across both services. It returns a JSON object with a confirmation message field on success, or an error field on failure.
Authentication
Path Parameters
The primary key of the account whose alias should be updated.
Request Body
The new alias to assign to the account. Must be unique across the platform.
Response
Returns200 OK with a JSON object.
Example
Error Codes
| HTTP Status | Description |
|---|---|
401 Unauthorized | The Authorization header is missing or the JWT is invalid/expired. |
404 Not Found | No account exists with the provided id. |
500 Internal Server Error | The alias update failed due to an unexpected server error (e.g., a database constraint violation). The response body will contain { "error": "Error al actualizar el alias en el servicio de usuarios." }. |
