{"openapi":"3.0.3","info":{"title":"API Recaudos Corresponsalía","version":"1.0.0","description":"API Orquestadora para consulta de obligaciones/productos, aplicación de pagos\ny anulación de pagos para aliados externos.\n\nLineamientos base:\n- HTTPS/TLS 1.2+\n- Autenticación Bearer JWT\n- Trazabilidad por X-Request-UUID\n- Payload opcional cifrado JWE según lineamientos corporativos\n- Respuestas homologadas\n"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/noa-fc0/Corresponsalias/1.0.0"},{"url":"https://api.coltefinanciera.com"}],"tags":[{"name":"Autenticación"},{"name":"Consulta"},{"name":"Pago"},{"name":"Anulación"}],"security":[{"bearerAuth":[]}],"paths":{"/auth/token":{"post":{"tags":["Autenticación"],"summary":"Obtener token JWT","description":"Genera token de autenticación para consumo de endpoints protegidos.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}}},"responses":{"200":{"description":"Token generado correctamente","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/v1/obligaciones/consultar":{"post":{"tags":["Consulta"],"summary":"Consultar obligaciones y productos","description":"Retorna obligaciones/productos asociados al cliente consultado.","parameters":[{"$ref":"#/components/parameters/XRequestUUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultaRequest"}}}},"responses":{"200":{"description":"Consulta exitosa","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultaResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/pagos/aplicar":{"post":{"tags":["Pago"],"summary":"Aplicar pago de obligaciones","description":"Permite pagar una o varias obligaciones del cliente.\nCada obligación se procesa de forma independiente.\n","parameters":[{"$ref":"#/components/parameters/XRequestUUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagoRequest"}}}},"responses":{"200":{"description":"Pago procesado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagoResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/pagos/anular":{"post":{"tags":["Anulación"],"summary":"Anular pago aplicado","description":"Permite reversar una transacción de pago previamente realizada.","parameters":[{"$ref":"#/components/parameters/XRequestUUID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnulacionRequest"}}}},"responses":{"200":{"description":"Anulación procesada","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnulacionResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"XRequestUUID":{"name":"X-Request-UUID","in":"header","required":true,"description":"Identificador único por petición (UUID v4)","schema":{"type":"string","format":"uuid"}}},"responses":{"Unauthorized":{"description":"Token inválido o ausente","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Conflict":{"description":"Conflicto funcional u operación inconsistente","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unprocessable":{"description":"Error de validación de datos enviados","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalError":{"description":"Error interno del servicio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"AuthRequest":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string"},"password":{"type":"string"}}},"AuthResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status"},"data":{"type":"object","properties":{"token":{"type":"string"},"expiration":{"type":"integer","description":"Epoch milliseconds"}}}}},"ConsultaRequest":{"type":"object","required":["identificationType","identificationNumber","originador"],"properties":{"identificationType":{"type":"string","example":"CC"},"identificationNumber":{"type":"string","example":"10203040"},"originador":{"type":"string","example":"EFECTY"},"channel":{"type":"string","example":"WEB"}}},"ConsultaResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status"},"customer":{"type":"object","properties":{"identificationNumber":{"type":"string"}}},"obligations":{"type":"array","items":{"$ref":"#/components/schemas/Obligacion"}}}},"PagoRequest":{"type":"object","required":["originador","transactionId","obligations"],"properties":{"originador":{"type":"string"},"transactionId":{"type":"string"},"totalValue":{"type":"number","format":"double"},"obligations":{"type":"array","items":{"$ref":"#/components/schemas/PagoItem"}}}},"PagoResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status"},"transactionId":{"type":"string"},"processedItems":{"type":"array","items":{"$ref":"#/components/schemas/PagoResultado"}}}},"AnulacionRequest":{"type":"object","required":["originador","originalTransactionId","reason"],"properties":{"originador":{"type":"string"},"originalTransactionId":{"type":"string"},"reason":{"type":"string"}}},"AnulacionResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status"},"originalTransactionId":{"type":"string"},"reversalId":{"type":"string"}}},"Status":{"type":"object","properties":{"code":{"type":"string","example":"00"},"message":{"type":"string","example":"Operación exitosa"}}},"Obligacion":{"type":"object","properties":{"obligationId":{"type":"string"},"productType":{"type":"string"},"balance":{"type":"number","format":"double"},"minPayment":{"type":"number","format":"double"},"currency":{"type":"string","example":"COP"}}},"PagoItem":{"type":"object","required":["obligationId","value"],"properties":{"obligationId":{"type":"string"},"value":{"type":"number","format":"double"}}},"PagoResultado":{"type":"object","properties":{"obligationId":{"type":"string"},"status":{"type":"string","example":"SUCCESS"},"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"status":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}}}}}}