Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Alejandrin08/Hackathon-SPEI/llms.txt

Use this file to discover all available pages before exploring further.

All endpoints on this page require a valid Authorization: Bearer <token> header. Requests without a valid token return 401 Unauthorized.

List accounts


GET /api/ledger/accounts Returns all bank accounts belonging to the authenticated user.

Response

id
string
required
Unique account identifier (UUID).
accountNumber
string
required
The account number (CLABE or other identifier).
accountType
string
required
Type of account, e.g., "DEFAULT", "checking", "savings".
balance
number
required
Current account balance.
currency
string
required
ISO 4217 currency code, e.g., "MXN".
curl --request GET \
  --url http://localhost:5000/api/ledger/accounts \
  --header 'Authorization: Bearer <token>'
Response
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "accountNumber": "646180123456789012",
    "accountType": "DEFAULT",
    "balance": 15000.00,
    "currency": "MXN"
  }
]

Create account


POST /api/ledger/accounts Creates a new bank account for the authenticated user. Returns the created account object with a 201 Created status.

Request body

accountNumber
string
required
Account number for the new account. Must be between 10 and 50 characters.
accountType
string
required
Type of account to create, e.g., "DEFAULT", "checking", "savings". Must be between 3 and 50 characters.

Response

Returns the newly created account object. See the List accounts response fields for the full schema.

Error responses

StatusDescription
400Validation error — missing or invalid fields.
401Invalid or missing bearer token.
curl --request POST \
  --url http://localhost:5000/api/ledger/accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "accountNumber": "646180123456789012",
  "accountType": "DEFAULT"
}'
Response (201 Created)
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "accountNumber": "646180123456789012",
  "accountType": "DEFAULT",
  "balance": 0.00,
  "currency": "MXN"
}

Build docs developers (and LLMs) love