Go to file
lite 2fcd61ae81 docs: update documentation for format system
- Add formatos.md with native and dolibarr format specs
- Update api.md with both format examples and formats endpoint
- Update arqui.md with formats layer and new data flow
- Update formato_datos.md to reference formatos.md
2026-05-17 16:27:38 -04:00
api feat: add formats endpoint and update factura handler 2026-05-17 16:27:33 -04:00
documentacion docs: update documentation for format system 2026-05-17 16:27:38 -04:00
internal feat: add format system with auto-detection 2026-05-17 16:27:27 -04:00
test Update documentation and organize test files 2026-05-14 20:50:55 +02:00
verifactu Fix integración VeriFactu AEAT: XML, hash y encadenamiento 2026-05-13 01:13:09 +02:00
.gitignore base: project structure and configuration 2026-04-08 14:30:50 +02:00
AGENTS.md base: project structure and configuration 2026-04-08 14:30:50 +02:00
README.md docs: reorganize documentation and add prerequisites guide 2026-05-17 16:27:18 -04:00
config.yml Implement VeriFactu API with certificate management, invoice submission and local fallback 2026-04-17 13:03:06 +02:00
go.mod Implement VeriFactu API with certificate management, invoice submission and local fallback 2026-04-17 13:03:06 +02:00
go.sum base: project structure and configuration 2026-04-08 14:30:50 +02:00
main.go feat: add format system with auto-detection 2026-05-17 16:27:27 -04:00

README.md

VeriFactu MidAPI

API intermediaria para enviar facturas a la AEAT a través del protocolo VeriFactu.

Recibe facturas en JSON, calcula el hash encadenado, genera el XML SOAP y lo envía a la AEAT. Si la AEAT no está disponible, guarda la factura localmente (fallback).


Documentación

Requisitos y setup Go, Python, OpenSSL, certificado, configuración
API Reference Endpoints, requests, responses
Protocolo VeriFactu Operaciones, hash, URLs AEAT, XML
Formato de datos NIF, fechas, tipos factura, IVA, ejemplo JSON
Formatos de entrada native, dolibarr, y cómo añadir nuevos
Arquitectura Capas, flujo de datos, cifrado
Seguridad Certificados, RSA, HTTPS
Certificados Obtener y configurar certificado FNMT
Tokens Sistema de autenticación por tokens
Configuración config.yml, variables de entorno
Testing Tests, depuración
Errores Códigos de error

Endpoints

Método Ruta Descripción
GET /api/v1/health Health check
GET /api/v1/auth/public-key Clave pública RSA
POST /api/v1/auth/register Registrar certificado .p12
GET /api/v1/formats Lista formatos disponibles
POST /api/v1/facturas Alta de factura (formato auto-detectado)
POST /api/v1/facturas/anular Anular factura

Estado

  • Alta de facturas con hash encadenado
  • Fallback local
  • Registro y validación de certificados
  • Anulación con AEAT
  • Consultas
  • Subsanación