Pruébelo · API Explorer
Ejemplos de solicitudes y respuestas simuladas
Demo ilustrativa · Datos sintéticos · AnonimizadoAbrir en pantalla completa
API Explorer — Factoría
Catálogo completo de endpoints de ejemplo. Sin llaves reales ni llamadas externas.
POST
/v1/timestampsGenera un sello de tiempo cualificado (TST) sobre un hash.
curl -X POST https://api.factoria.example/v1/timestamps \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"correlation_id": "corr-abc-001",
"hash_sha256": "a1b2c3d4e5f6...64chars",
"policy": "eIDAS-qualified",
"idempotency_key": "idem-tst-001"
}'RESPONSE
{
"tst_id": "tst_7f8a9b0c",
"gen_time": "2026-03-02T10:15:30Z",
"serial_number": "482910",
"policy": "1.3.6.1.4.1.XXXXX.1.1",
"status": "granted",
"message_imprint": {
"algorithm": "SHA-256",
"hash": "a1b2c3d4e5f6...64chars"
}
}POST
/v1/evidence/snapshotsSella un snapshot HTML/PDF de una pantalla o documento.
curl -X POST https://api.factoria.example/v1/evidence/snapshots \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"expediente_id": "EXP-2026-A-001",
"step_id": "step_3",
"correlation_id": "corr-abc-001",
"content_type": "text/html",
"content_hash": "b2c3d4e5f6a7...64chars",
"idempotency_key": "idem-snap-003",
"metadata": {
"phase": "Lectura de condiciones",
"user_agent": "Mozilla/5.0..."
}
}'RESPONSE
{
"event_id": "evt_3c4d5e6f",
"status": "sealed",
"hash_sha256": "b2c3d4e5f6a7...64chars",
"prev_hash": "a1b2c3d4e5f6...64chars",
"timestamp_token_ref": "tst_8g9h0i1j",
"correlation_id": "corr-abc-001"
}POST
/v1/evidence/packsSella un paquete completo de solvencia (inputs + reglas versionadas + score + decisión).
curl -X POST https://api.factoria.example/v1/evidence/packs \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"expediente_id": "EXP-2026-D-001",
"correlation_id": "corr-def-001",
"pack_type": "solvency",
"inputs_hash": "c3d4e5f6a7b8...64chars",
"rules_version": "v2.3.1",
"score": 720,
"decision": "approved",
"idempotency_key": "idem-pack-001"
}'RESPONSE
{
"event_id": "evt_4d5e6f7g",
"status": "sealed",
"pack_hash": "d4e5f6a7b8c9...64chars",
"timestamp_token_ref": "tst_9h0i1j2k"
}POST
/v1/evidence/conversations/certifyCertifica una conversación completa (transcript + metadatos del agente) como evidencia.
curl -X POST https://api.factoria.example/v1/evidence/conversations/certify \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"expediente_id": "EXP-2026-E-001",
"correlation_id": "corr-agent-001",
"transcript_hash": "e5f6a7b8c9d0...64chars",
"turn_count": 14,
"language": "es",
"model_version": "(ejemplo) GPT-4o",
"agent_policy_version": "(ejemplo) v1.2",
"idempotency_key": "idem-conv-001"
}'RESPONSE
{
"event_id": "evt_5e6f7g8h",
"certificate_id": "cert_conv_a1b2",
"status": "certified",
"transcript_hash": "e5f6a7b8c9d0...64chars",
"timestamp_token_ref": "tst_0i1j2k3l"
}POST
/v1/evidence/certificatesGenera el certificado final global del expediente probatorio.
curl -X POST https://api.factoria.example/v1/evidence/certificates \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"expediente_id": "EXP-2026-A-001",
"correlation_id": "corr-abc-001",
"include_annexes": [
"notification",
"signature",
"custody"
],
"branding": "cobranded",
"idempotency_key": "idem-cert-001"
}'RESPONSE
{
"certificate_id": "cert_final_x9y8",
"status": "issued",
"pdf_ref": "cert_final_EXP-2026-A-001.pdf",
"ledger_hash": "f6a7b8c9d0e1...64chars",
"evidence_count": 12,
"issued_at": "2026-03-02T12:00:00Z"
}