Developer Portal
REST API v1 · SHA-256 + HMAC-SHA256 · Ley 21.719 · GDPR
Endpoints
4
Versión
v1
Latencia
≤ 2ms
Quick Start
http://localhost:3000/api/v1Producción: https://api.eab64.com/api/v1Autenticación
El endpoint POST /api/v1/audit/seal requiere un Bearer Token en el header Authorization. Obtén tu token en Settings → API Keys.
Authorization: Bearer eab64_sk_prod_ab3f...
Header ausente o sin prefijo Bearer.
{
"error": "Authorization header requerido.",
"code": "UNAUTHORIZED",
"hint": "Incluye: Authorization: Bearer <token>"
}Token terminado en _limit — cuota agotada.
{
"error": "Límite de solicitudes superado.",
"code": "RATE_LIMIT_EXCEEDED",
"retry_after_ms": 60000
}
// Header: Retry-After: 60Gestiona tus tokens, revoca accesos y consulta tu quota en Settings → API Keys · Cada token tiene un prefijo único visible tras la generación.
Endpoints
/api/v1/audit/sealSella un payload — respuesta ≤ 2 msRequest Body (application/json)
Response 200 OK
Response Headers
Error Codes
Ejemplos de código
curl -s -X POST http://localhost:3000/api/v1/audit/seal \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eab64_sk_prod_ab3f..." \
-d '{"payload": "Score crediticio cliente #8821"}'/api/v1/audit/ledgerRegistro de auditoría paginadoQuery Parameters
Response 200 OK
Ejemplos de código
# Todos los registros (paginados) curl -s http://localhost:3000/api/v1/audit/ledger # Con paginación y filtro por nodo curl -s "http://localhost:3000/api/v1/audit/ledger?limit=10&offset=0&node_id=2"
/api/v1/audit/verifyVerifica la integridad de un bloqueRequest Body
Response
HTTP 200 → válido · HTTP 422 → inválido
Ejemplos de código
curl -s -X POST http://localhost:3000/api/v1/audit/verify \
-H "Content-Type: application/json" \
-d '{
"eab_block_hex": "365a985f6f493480e9eadf2c68ae9a001908ea9c93b3a2d0d9bb07cf746260a6f3dbc54f009827a3f1fea93ece06d5e928ed9520901be45a7e25d87f8c4fc7c5",
"payload": "Score crediticio cliente #8821 — Riesgo Bajo"
}'/api/v1/healthEstado del sistema · SLA · LatenciasResponse 200 OK
Sin parámetros. Header Cache-Control: no-store — siempre datos en tiempo real.
Ejemplos de código
curl -s http://localhost:3000/api/v1/health | python3 -m json.tool
Live Playground
Prueba el endpoint POST /api/v1/audit/seal directamente desde el navegador. Ingresa tu Bearer Token — sin token recibirás 401, con token terminado en _limit recibirás 429.
/api/v1/audit/sealEntorno: localhost:3000Request Body
Sin token recibirás 401 · Token terminado en _limit → 429
Ejecuta una llamada para ver la respuesta
Type Reference
interface SealRequest {
payload: string; // required — max 4 096 chars
node_id?: number; // optional — default: 1
opcode?: number; // optional — default: 0x01
flags?: number; // optional — default: 0b00000011
}interface SealResponse {
eab_block_hex: string; // 128 hex chars / 64 bytes
node_id: number;
opcode: number;
flags: number;
timestamp_utc: string; // ISO 8601 UTC
latency_ms: number; // ≤ 2 ms
compliance: {
ley_21719: boolean;
arco_rights: boolean;
tier: number; // 1 | 2
};
}interface EabBlockRecord {
id: string; // "eab-XXXX"
payload: string;
eab_block_hex: string; // 128 hex chars
node_id: number;
opcode: number;
flags: number;
created_at: string; // ISO 8601 UTC
}// 128 hex chars = 64 bytes total