GET https://api.veriko.mx/v1/finance/accounting

Accounting export (CSV / XLSX / PDF · DD/MM/YYYY)

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

Same 15 SAT-friendly columns as the monthly verifications report, with dates in DD/MM/YYYY and a configurable decimal separator. Designed for direct import into accounting software (Contpaq, Aspel, Excel).

  • format=csv (default, text/csv) / format=xlsx (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet): flat list.
  • format=pdf (application/pdf): ledger-style PDF with a metadata block (records which decimal was used). Cap 1000 rows.
  • format=preview (application/json): first 20 rows as FinancePreviewResponse.
Parameters
Parameter In Type Required Description
decimal query string optional

Decimal separator. `comma` → `1.234,56` (default); `dot` → `1,234.56`. Any other value is treated as `comma`.

Default: comma

format query string optional

Output format.

Default: csv

month * query string required

Month to export 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/accounting' \
  -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/accounting
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/accounting
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