Documentation Index
Fetch the complete documentation index at: https://docs.yofacturo.es/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All API endpoints are relative to:Versioning
The current stable version is v1. All v1 endpoints are prefixed with/api/v1/.
There are no version negotiation headers — the version is part of the URL path.
Request format
- Content type:
application/json - Encoding: UTF-8
- All timestamps must be in ISO 8601 format (
YYYY-MM-DDTHH:MM:SSZ) - Dates (without time) must be
YYYY-MM-DD
Response format
All responses return JSON. Most endpoints that return a single resource wrap the payload in adata key:
POST /api/v1/auth/sessions returns a flat JSON object at the root level — no data envelope:
meta object with pagination info:
POST /api/v1/invoice_batches endpoint may additionally include an errors key alongside data when some invoices in the batch fail validation (partial success):
errors object is keyed by external_invoice_id.
Pagination
List endpoints accept two query parameters:| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
page | integer | 1 | — | Page number (1-indexed) |
per_page | integer | 25 | 100 | Results per page |
Idempotency
POST /api/v1/invoice_batches requires an Idempotency-Key header containing a valid UUID. Resubmitting the same key within the idempotency window returns the cached response without re-processing the batch.
Rate limiting
Most protected endpoints enforce rate limits per organization. When exceeded, the API returns429 Too Many Requests with a Retry-After header indicating the number of seconds to wait.
POST /api/v1/invoice_batches is excluded from rate limiting — idempotency already prevents duplicate processing.Error responses
All errors follow a consistent envelope:Error codes
| HTTP status | Code | Description |
|---|---|---|
400 | bad_request | Missing or blank required parameter |
401 | unauthorized | Missing, invalid, or expired authentication |
404 | not_found | Resource not found within the current organization |
422 | missing_idempotency_key | Idempotency-Key header is absent |
422 | invalid_idempotency_key | Idempotency-Key is not a valid UUID |
422 | validation_failed | Request body failed validation (see message for details) |
422 | unprocessable_content | Record could not be saved due to validation errors |
429 | too_many_requests | Too many requests — check Retry-After header |

