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.

Retrieve every card associated with a given digital-money account. The response is always an array — if the account has no linked cards the server returns an empty array ([]) with a 200 OK status rather than a 404. All requests must include a valid JWT in the Authorization header; the token is validated by the API Gateway before the request reaches the accounts service.

Endpoint

GET /accounts/{accountId}/cards
Base URL: http://localhost:8085

Authentication

All card endpoints require a valid Bearer JWT obtained at login. Include it in every request as Authorization: Bearer <token>.

Path Parameters

accountId
long
required
The unique numeric identifier of the account whose cards you want to list.

Response

Returns a JSON array of CardOutDTO objects. An empty array is returned when no cards are linked.

Response Fields

id
long
Internal auto-generated identifier for the card record.
number
string
The full card number as stored in the system.
name
string
Name of the card holder as it appears on the card.
expiry
string
Card expiration date (e.g. "12/26").
cvc
string
The card security code (CVV/CVC).
accountId
long
The account this card is linked to — mirrors the accountId path parameter.

Example Request

curl -X GET "http://localhost:8085/accounts/42/cards" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."

Example Response

[
  {
    "id": 1,
    "number": "4111111111111111",
    "name": "Jane Doe",
    "expiry": "09/27",
    "cvc": "123",
    "accountId": 42
  },
  {
    "id": 2,
    "number": "5500005555555559",
    "name": "Jane Doe",
    "expiry": "03/26",
    "cvc": "456",
    "accountId": 42
  }
]

Empty Account

[]

Error Responses

StatusCondition
400 Bad RequestaccountId is not a valid long integer or the request is malformed.
401 UnauthorizedThe Authorization header is missing or the token is invalid.
500 Internal Server ErrorAn unexpected error occurred on the server.
A 401 is returned by the API Gateway before the request reaches the accounts service if the token is absent or expired.

Build docs developers (and LLMs) love