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:The staging environment is available at
https://staging.app.yofacturo.es. Use it for integration testing before going live.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. Successful responses that return a single resource use adata 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 v4. Resubmitting the same key within the idempotency window returns the cached response without re-processing the batch.
Rate limiting
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.
Error responses
All errors follow a consistent envelope:Error codes
| HTTP status | Code | Description |
|---|---|---|
400 | bad_request | Missing or invalid 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) |
429 | rate_limit_exceeded | Too many requests — check Retry-After header |

