API e integración
API JSON bajo /api/v1/…. Las rutas actuales están en OpenAPI en su despliegue. En los ejemplos, sustituya YOUR_HOST por su host.
Documentación
- Interactiva: /docs (si está habilitada).
- Esquema:
GET /api/v1/openapi.json. - Estado:
GET /health,GET /readiness,GET /api/v1/status.
Convenciones
- HTTPS en producción.
Content-Type: application/json(excepto cargas de archivos en disputas).- Tras
POST /api/v1/auth/login— cookie y/oAuthorization: Bearer …. - Actualización:
POST /api/v1/auth/refresh. - Las operaciones sensibles pueden usar
Idempotency-Key— véase OpenAPI.
Grupos principales
- Auth y sesiones: register, login, refresh, logout, MFA.
- Perfil y monedero:
/api/v1/me,/api/v1/wallet/balances,/api/v1/wallet/activity. - Depósito en garantía (escrow): create, list, fund, release, dispute.
- Helpdesk: tickets.
- Lista completa — en OpenAPI.
Soporte de integración
Preguntas sobre acceso y escenarios: ayuda o support@evopay.biz. Los clientes autenticados pueden crear tickets mediante POST /api/v1/helpdesk/tickets.
Ejemplos
json · cuerpo de la solicitud
{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}
bash · registro
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}'
bash · inicio de sesión
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/login" \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!"
}'
bash · perfil y monedero
curl -sS "https://YOUR_HOST/api/v1/me" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/balances" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/activity?limit=20" -b cookies.txt
bash · crear escrow
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"title": "Entrega de equipos",
"description": "Equipos de servidor según especificación",
"amount": "8000.00",
"currency": "USD"
}'
Luego sustituya ESCROW_ID:
bash · ciclo de vida del escrow
curl -sS "https://YOUR_HOST/api/v1/escrow/contracts/ESCROW_ID" -b cookies.txt
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/fund" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/release" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
bash · estado
curl -sS "https://YOUR_HOST/api/v1/status"
curl -sS "https://YOUR_HOST/readiness"