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 connections


GET /api/openfinance/connections Returns all external bank connections for the authenticated user.

Response

id
string
required
Unique connection identifier (UUID).
providerName
string
required
Name of the connected Open Finance provider, e.g., "BBVA", "Banamex".
status
string
required
Connection status, e.g., "active", "pending", "error".
lastSync
string
required
ISO 8601 timestamp of the most recent successful sync.
curl --request GET \
  --url http://localhost:5000/api/openfinance/connections \
  --header 'Authorization: Bearer <token>'
Response
[
  {
    "id": "conn-uuid",
    "providerName": "BBVA",
    "status": "active",
    "lastSync": "2026-03-17T10:00:00Z"
  }
]

Create connection


POST /api/openfinance/connections Links a new Open Finance provider connection to the authenticated user’s profile.

Request body

providerName
string
required
Name of the Open Finance provider, e.g., "BBVA", "Banamex".
scopes
string
required
Space-separated OAuth scopes to request from the provider, e.g., "accounts transactions".
authToken
string
required
Authorization token obtained from the provider’s OAuth flow.

Error responses

StatusDescription
400Validation error — providerName, scopes, and authToken are all required.
401Invalid or missing bearer token.
curl --request POST \
  --url http://localhost:5000/api/openfinance/connections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "providerName": "BBVA",
  "scopes": "accounts transactions",
  "authToken": "provider-oauth-token"
}'
Response (201 Created)
{
  "id": "conn-uuid",
  "providerName": "BBVA",
  "status": "pending",
  "lastSync": "0001-01-01T00:00:00Z"
}

Remove connection


DELETE /api/openfinance/connections/{id} Removes an Open Finance connection. Associated product data is no longer accessible after deletion.

Path parameters

id
string
required
UUID of the connection to delete.

Response

Returns 204 No Content on success with an empty body.

Error responses

StatusDescription
401Invalid or missing bearer token.
404Connection not found or belongs to a different user.
curl --request DELETE \
  --url http://localhost:5000/api/openfinance/connections/conn-uuid \
  --header 'Authorization: Bearer <token>'

Sync connection


POST /api/openfinance/sync/{connectionId} Triggers a pull of the latest balance and product data from the Open Finance provider. Returns an array of newly synced external products.

Path parameters

connectionId
string
required
UUID of the connection to sync.

Response

Returns an array of synced external product objects. See External Products for the product schema.

Error responses

StatusDescription
401Invalid or missing bearer token.
404Connection not found or belongs to a different user.
curl --request POST \
  --url http://localhost:5000/api/openfinance/sync/conn-uuid \
  --header 'Authorization: Bearer <token>'