Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MiguelNavas19/miapibcv/llms.txt
Use this file to discover all available pages before exploring further.
Overview
All Mi API BCV responses follow a consistent JSON structure. This page documents the standard response format, field types, and data structures returned by the API.Standard Success Response
Every successful API response includes:- A
messagefield indicating the operation status - One or more bank-specific objects containing rate data
Response Fields
Message Field
Status message indicating the result of the API request.Possible values:
"Consulta exitosa"- Successful query with data returned"Tasas no disponibles aún"- Rates not yet available for the current date"No se encontraron datos"- No data found for the specified parameters"Fecha inválida"- Invalid date format provided
Bank Objects
Each bank in the response is represented by a dynamic key matching its source identifier. The API supports four banks:Exchange rate data from Banco Central de Venezuela.
Exchange rate data from Banplus Banco Universal.
Exchange rate data from Banco Nacional de Crédito.
Exchange rate data from Banco de Venezuela.
Response Examples
Complete Response (All Banks)
Returned byGET / or GET /info/{date} without source filtering:
Filtered Response (Single Bank)
Returned byGET /info/{date}/{source} with a specific bank:
Partial Response
If only some banks have data for a specific date:Data Source: Database Schema
The response data comes from thereference_records table with the following structure:
| Column | Type | Description |
|---|---|---|
id | BIGINT | Primary key (auto-increment) |
source | VARCHAR | Bank identifier (bcv, banplus, bnc, bdv) |
value | DECIMAL(64,4) | Exchange rate value |
date | DATE | Date of the rate |
created_at | TIMESTAMP | Record creation timestamp |
updated_at | TIMESTAMP | Record last update timestamp |
The database schema is defined in
database/migrations/2026_01_28_203351_create_reference_records_table.phpResponse Transformation
The API transforms database records into the response format using Laravel collections:- Maps each database record to a key-value pair
- Uses the
sourcefield as the dynamic key - Creates an object with
valueanddatefields - Omits
id,created_at, andupdated_atfrom the response
Dynamic Response Structure
The response structure is dynamic. Bank objects only appear if data exists for them in the database for the requested date.
- Early in the morning, no banks may have data yet → 404 error
- Some banks may update faster than others → partial response
- By midday, all banks typically have data → complete response
Working with Response Data
JavaScript Example
Python Example
PHP Example
Best Practices
Parse Values as Decimals
Always convert the
value field to a proper decimal/numeric type in your application to avoid floating-point precision issues.Check Message Field
Verify the
message field equals "Consulta exitosa" before processing bank data.Handle Missing Banks
Not all banks may be present in every response. Check for existence before accessing.
Cache Responses
The API caches for 1 hour. Consider implementing client-side caching to match this TTL.
Next Steps
Get Current Rates
Learn about the current rates endpoint
Error Handling
Understand API error responses