Saltearse al contenido

API REST

Base URL

http://localhost:3000/api

Headers requeridos

Authorization: Bearer <token>
x-tenant-id: <tenantId>

Endpoints principales

RecursoEndpoints
AuthPOST /api/auth/login, GET /api/auth/me
ItemsGET/POST/PUT/DELETE /api/items
PartnersGET/POST/PUT/DELETE /api/partners
Facturas ventaGET/POST /api/sales-invoices
Facturas compraGET/POST /api/purchase-invoices
Albaranes ventaGET/POST /api/sales-delivery-notes
Pedidos ventaGET/POST /api/sales-orders
PluginsGET /api/plugins/available

Ejemplo

Ventana de terminal
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@openfactu.com","password":"admin123"}'