docs: update API, architecture, installation guides and README

- API-POS.md: added sections 11-15 (BNPL, ERP, WhatsApp Cloud,
  Supplier Portal, Dashboard Stats)
- ARCHITECTURE.md: added infra/monitoring section with systemd,
  Prometheus/Grafana, PWA, and integration stubs
- INSTALACION.md: added systemd setup, monitoring docker compose,
  PWA install notes, and Playwright test commands
- README.md: updated endpoint count, tech stack, infrastructure table
This commit is contained in:
2026-04-29 06:34:40 +00:00
parent fb591c7de6
commit ca239a458b
4 changed files with 245 additions and 3 deletions

View File

@@ -1430,3 +1430,153 @@ Todos los errores retornan:
```json
{"error": "Descripcion del error"}
```
---
## 11. BNPL (Buy Now Pay Later) — Stub
Prefix: `/pos/api/bnpl`
Stubs ready for APLAZO, Kueski, Clip integration.
### GET /providers
List configured BNPL providers.
**Response 200:**
```json
{
"providers": [
{"id": "ap lazo", "name": "APLAZO", "enabled": false, "config_needed": ["api_key", "merchant_id"]},
{"id": "kueski", "name": "Kueski Pay", "enabled": false, "config_needed": ["api_key", "secret"]},
{"id": "clip", "name": "Clip Pagos", "enabled": false, "config_needed": ["api_key"]}
]
}
```
### POST /applications
Create a BNPL application for a sale.
**Request body:**
```json
{
"sale_id": 123,
"amount": 1500.00,
"provider": "ap lazo",
"customer": {"name": "Juan Perez", "phone": "5512345678"}
}
```
### GET /applications/:id
Get application status.
### POST /webhook/:provider
Receive provider webhooks.
---
## 12. ERP Sync — Stub
Prefix: `/pos/api/erp`
Stubs ready for Aspel SAE, CONTPAQi, SAP B1, Odoo.
### GET /providers
List supported ERP systems.
### POST /sync
Start a sync job.
**Request body:**
```json
{
"provider": "aspel_sae",
"sync_type": "sales"
}
```
### GET /sync/:job_id
Get sync job status.
### POST /sync/:job_id/run
Mock execute sync job.
---
## 13. WhatsApp Business API (Meta Cloud) — Stub
Prefix: `/pos/api/whatsapp-cloud`
### GET/POST /webhook
Meta Cloud API webhook verification and message reception.
### GET /status
Check Meta Cloud API connection status.
### GET /templates
List approved message templates.
### POST /messages
Send a message.
**Request body:**
```json
{
"to": "5215512345678",
"body": "Su orden esta lista",
"template": "order_ready"
}
```
---
## 14. Supplier Portal
Prefix: `/pos/api/supplier-portal`
### GET /demand
Aggregated demand by zone, part group, and time range.
**Query params:** `days` (default 30), `group_id`, `branch_id`
### GET /top-parts
Top 50 moving parts with current stock.
**Query params:** `days` (default 30)
---
## 15. Dashboard Stats
Prefix: `/pos/api/dashboard`
### GET /stats
Summary stats for today and this month.
**Response 200:**
```json
{
"today": {"sales_count": 42, "sales_total": 12500.00},
"month": {"sales_count": 1200, "sales_total": 450000.00},
"top_products": [...],
"hourly_sales": [...]
}
```
### GET /stats/employees
Sales per employee today.