# Contratos objetivo T02: estas rutas aún no están implementadas. # Configurar token y reemplazar IDs/ETags con respuestas reales cuando estén disponibles. @base = http://localhost:8080/api/v1 @flowId = 00000000-0000-0000-0000-000000000456 @requestId = 00000000-0000-0000-0000-000000000123 @executionId = 00000000-0000-0000-0000-000000000789 ### Crear borrador (FLOW_EDITOR); fixture contractual, no flujo completo T14. POST {{base}}/admin/flows Authorization: Bearer {{token}} Content-Type: application/json < ../contracts/flows/scoring.json ### Validar; valid=false se reporta con HTTP 200 y errores JSON Pointer. POST {{base}}/admin/flows/{{flowId}}/validate Authorization: Bearer {{token}} ### Simular sin invocar proveedores. POST {{base}}/admin/flows/{{flowId}}/simulate Authorization: Bearer {{token}} Content-Type: application/json < ../contracts/api/SimulationInput.json ### Publicar: usar ETag del borrador real, no el valor ilustrativo. POST {{base}}/admin/flows/{{flowId}}/publish Authorization: Bearer {{token}} If-Match: "0" ### Activar: el tipo CREDITO debe existir; If-Match corresponde al tipo. PUT {{base}}/admin/request-types/CREDITO/active-flow Authorization: Bearer {{token}} If-Match: "0" Content-Type: application/json {"flowId":"{{flowId}}"} ### Crear solicitud. Repetir la misma clave/comando retorna el mismo recurso. POST {{base}}/requests Authorization: Bearer {{token}} Idempotency-Key: demo-create-001 Content-Type: application/json < ../contracts/api/CreateRequest.json ### Consultar solicitud y obtener ETag. GET {{base}}/requests/{{requestId}} Authorization: Bearer {{token}} ### Obtener tareas disponibles. GET {{base}}/requests/{{requestId}}/available-events Authorization: Bearer {{token}} ### Aceptar evento; body sin resultados de proveedor. POST {{base}}/requests/{{requestId}}/events Authorization: Bearer {{token}} Idempotency-Key: demo-bureau-001 If-Match: "0" Content-Type: application/json {"event":"VALIDAR_BURO","data":{}} ### Consultar ejecución indicada por Location. GET {{base}}/executions/{{executionId}} Authorization: Bearer {{token}} ### Historial paginado. GET {{base}}/requests/{{requestId}}/history?limit=50&kind=EVENT_ACCEPTED Authorization: Bearer {{token}} ### Conciliar sólo RECONCILIATION_REQUIRED y con evidencia realmente verificada. POST {{base}}/admin/executions/{{executionId}}/resolve Authorization: Bearer {{token}} Idempotency-Key: demo-resolution-001 Content-Type: application/json < ../contracts/api/ReconciliationCommand.json