GET https://api.veriko.mx/v1/finance/by-bank

Bank summary (CSV / XLSX / PDF / preview)

Audience
public
Auth
API key
Permission
finance:generate_self
How-to guide →

Groups the month's verifications by receiving bank (banxico_code), with totals, valid count, success rate, and total amount. 6 columns: Clave Banxico, Banco, Verificaciones, Válidas, Tasa éxito %, Monto total. The PDF Totales row reports the row-weighted aggregate success rate (sum(válidas) * 100 / sum(verificaciones)), NOT the simple average of per-row rates — that average would mislead when a bank with 1 row at 100 % mixes with another at 1000 rows at 50 %.

  • format=csv (default, text/csv) / format=xlsx (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet): flat list.
  • format=pdf (application/pdf): ledger with Totales row. Cap 1000 rows.
  • format=preview (application/json): first 20 rows as FinancePreviewResponse.
Parameters
Parameter In Type Required Description
format query string optional

Output format.

Default: csv

month * query string required

Month to report in `YYYY-MM` format.

user_id query string (uuid) optional

Admins with `finance:generate_all` only. UUID of the user to query.

Request
curl -X GET 'https://api.veriko.mx/v1/finance/by-bank' \
  -H 'Authorization: Bearer mxcep_••••'

Python example — coming soon.

JavaScript example — coming soon.

PHP example — coming soon.

Response 200 FinancePreviewResponse — CSV/XLSX/PDF stream, or JSON envelope in preview mode.
Field Type Description
type string

JSON:API resource type (always `finance_preview`).

attributes object

Report preview fields.

report string

Report type: `monthly` — monthly statement; `counterparties` — top counterparties; `by-bank` — bank breakdown; `accounting` — accounting ledger.

month string

Report month in YYYY-MM format.

headers array

CSV column names, in the same order as the values in `rows`.

rows array (items: ?–20)

First 20 data rows of the report (maximum).

Response status codes GET /v1/finance/by-bank
Status Class Description Body
200 2xx CSV/XLSX/PDF stream, or JSON envelope in preview mode. FinancePreviewResponse
400 4xx Invalid or missing `month` parameter ErrorResponse
401 4xx Authentication is required or the provided credentials are invalid. ErrorResponse
403 4xx Permisos insuficientes ErrorResponse
500 5xx `pdf_render_failed` — PDF renderer crashed. Try CSV or XLSX. ErrorResponse
Response headers 200
Header Type Description
Cache-Control string Disables intermediary caching of the download (does not apply to preview mode).
Content-Disposition string Suggested filename (does not apply in preview mode).
Errors from GET /v1/finance/by-bank
Status Code Detail
400 invalid_month

'month' is required and must be YYYY-MM.

Envelope
meta.request_id
d5e6f7a8b9c1
401 unauthorized

Invalid or missing authentication credentials.

Envelope
meta.request_id
c4d5e6f7a8b9
403 forbidden

You do not have permission to access this resource.

Envelope
meta.request_id
d5e6f7a8b9c0