https://api.veriko.mx/v1/finance/ceps/exportsRequest the CEP archive in the background
How-to guide →Queues the preparation of the CEP ZIP for a date range and responds immediately with an HTTP status 202. It is the asynchronous alternative to GET /v1/finance/ceps for large ranges: the archive is built in the background, without holding the connection open.
The response carries the export in state queued and its location in the Location header. Poll GET /v1/finance/ceps/exports/{id} until status is terminal (ready, failed or expired) and download the archive with GET /v1/finance/ceps/exports/{id}/download. When it finishes, the service also notifies by email and inside the app, with a link (never with the archive attached).
The archive is the same ZIP that GET /v1/finance/ceps delivers. Once ready it can be downloaded for 24 hours; after that it is deleted and must be requested again.
Before queuing, the service counts the CEPs in the range:
- With no receipts, it responds with an HTTP status
404(withno_cepsin the body), like the synchronous ZIP. - With more than 10,000 receipts, it responds with an HTTP status
422(withrange_too_largein the body). Split the range into shorter periods.
If an export of the same range is already in progress, it returns that one instead of creating another. Each account can have 2 exports in progress at a time (429, with export_limit_reached) and the platform allows 5 in total (503, with exports_busy).
The operation supports Idempotency-Key.
If queueing fails, it responds with an HTTP 503 status (dispatch_failed).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | optional | Optional client-generated key (Stripe-style) that guarantees the request is processed exactly once within a 24-hour TTL. The scope is 11111111-2222-3333-4444-555555555555 |
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string (date) (pattern) | required | Start date (inclusive, 2026-04-01 |
to | string (date) (pattern) | required | End date (inclusive, 2026-04-30 |
user_id | string (uuid) | optional | Administrators only — UUID of the account whose CEPs are exported. e.g.f47ac10b-58cc-4372-a567-0e02b2c3d479 |
curl -X POST 'https://api.veriko.mx/v1/finance/ceps/exports' \
-H 'Authorization: Bearer veriko_••••' \
-H 'Content-Type: application/json' \
-d '{
"from": "2026-04-01",
"to": "2026-04-30"
}'Python example — coming soon.
JavaScript example — coming soon.
PHP example — coming soon.
No matches
| Field | Type | Description |
|---|---|---|
data | object | Main response payload. Shape varies by endpoint (object, array, or JSON:API envelope with |
type | string | JSON:API resource type. Always cep_archive |
id | string (uuid) | Resource identifier, unique within its f47ac10b-58cc-4372-a567-0e02b2c3d479 |
attributes | object | Attributes of an asynchronous CEP archive export. |
status | string | Export state — ready |
from | string (date) | Start date of the range (inclusive, 2026-04-01 |
to | string (date) | End date of the range (inclusive, 2026-04-30 |
item_count | integer | nullnullable | Number of CEPs included in the archive. 42 |
size_bytes | integer | nullnullable | Size of the ZIP archive in bytes. 1638400 |
error_code | string | nullnullable | Cause of the failure when null |
created_at | string (date-time) | Moment the export was requested, in UTC. e.g.2026-05-01T15:00:00Z |
completed_at | string | nullnullable | Moment it finished ( 2026-05-01T15:00:20Z |
expires_at | string | nullnullable | Moment from which the archive can no longer be downloaded, in UTC: 24 hours after 2026-05-02T15:00:20Z |
links | object | Export links. |
self | string | Path of this export, to check its status. e.g./v1/finance/ceps/exports/f47ac10b-58cc-4372-a567-0e02b2c3d479 |
download | string | Download path of the ZIP. Present only when the status is /v1/finance/ceps/exports/f47ac10b-58cc-4372-a567-0e02b2c3d479/download |
meta | object | Response metadata including API version, route prefix, unique request identifier, and the server timestamp in UTC. |
version | string | API version that processed the request. e.g.1.47.0 |
api_version | string | API route prefix version (e.g. v1 |
request_id | string | Unique request identifier, 24 hexadecimal characters. Keep it and quote it when you contact support: it locates the request. e.g.a1b2c3d4e5f66f5e4d3c2b1a |
datetime | object | Companion descriptor present in the {"timezone":"UTC","format":"ISO 8601"} |
timezone* | string | Always UTC |
format* | string | Always ISO 8601 |
field_names_notice | object | Field-name change notice. It only appears on {"code":"legacy_request_fields","message":"This request uses Spanish field names, which are accepted until March 1, 2027. From that date, the API will only accept and return English field names. You can migrate whenever it suits you; see the migration guide.","sunset":"2027-03-01","documentation_url":"https://docs.example.com/en/how-to/migrate-to-english-field-names","legacy_fields":["fecha","monto"]} |
code* | string | Notice type. legacy_request_fields |
message* | string | Notice text, in the response language ( This request uses Spanish field names, which are accepted until March 1, 2027. From that date, the API will only accept and return English field names. You can migrate whenever it suits you; see the migration guide. |
sunset* | string (date) | Cut-off date, the same one the 2027-03-01 |
documentation_url* | string (uri) | Migration guide to the English names, in the response language. e.g.https://docs.example.com/en/how-to/migrate-to-english-field-names |
legacy_fields | array | Spanish names the request sent. Only with ["fecha","monto"] |
links | object | Pagination or related links, present only when the endpoint returns a paginated collection. |
| Status | Class | Description | Body |
|---|---|---|---|
| 202 | 2xx | The export was queued ( queued), or it is the one already in progress for that range. | CepArchiveResponse |
| 400 | 4xx | invalid_range: Malformed dates or to < from. | ErrorResponse |
| 401 | 4xx | Authentication is required or the provided credentials are invalid. | ErrorResponse |
| 403 | 4xx | Insufficient permissions. Also email_verification_required: the account's email cannot receive mail and, until it is fixed or verified, only reading the profile, fixing the email, and logging out are allowed. | ErrorResponse |
| 404 | 4xx | no_ceps: No CEPs available in the specified range. | ErrorResponse |
| 413 | 4xx | The request body exceeds the maximum accepted size ( body_too_large). | ErrorResponse |
| 422 | 4xx | range_too_large: The range exceeds the maximum CEPs per export (10,000). | ErrorResponse |
| 429 | 4xx | export_limit_reached: The account already has the maximum number of exports in progress. Check Retry-After and meta.retry_after. The API key request limit (rate_limit_exceeded) responds the same way. | RetryAfterError |
| 503 | 5xx | exports_busy: Too many exports are in progress on the platform, or dispatch_failed: it could not be queued. Check Retry-After when present. | ErrorResponse |
| Header | Type | Description |
|---|---|---|
Idempotent-Replayed | string | Only present when the request included the Idempotency-Key header. false marks a fresh response; true marks a response reused from the idempotency cache, which remains valid for 24 hours per account, endpoint, and key. |
Location | string | Path of the export, to check its state. |
| Status | Code | Example |
|---|---|---|
| 400 | body_empty | The request has no body. Envelope
|
| 400 | invalid_json | The request body is not valid JSON. Check its syntax and resend it. Envelope
|
| 400 | invalid_range | A date in the range is missing or not valid. Envelope
|
| 400 | invalid_user_id | The user identifier is not in the expected format. Envelope
|
| 401 | unauthorized | This request requires authentication. Envelope
|
| 403 | forbidden | You do not have permission to perform this action. Envelope
|
| 403 | permission_denied | You do not have permission to access this resource. Envelope
|
| 413 | body_too_large | The body exceeds the 1 MB maximum. Envelope
|
| 422 | validation_error | Some data needs fixing. Envelope
|
| 429 | export_limit_reached | You already have the maximum number of exports in progress. Wait for one to finish before requesting another. Envelope
Response headers
|
| 429 | rate_limit_exceeded | You exceeded the request limit. Envelope
Response headers
|
| 503 | dispatch_failed | We could not start the request. Envelope
Response headers
|