openapi: 3.0.3 info: title: 'API AvilaCash' description: '' version: 1.0.0 servers: - url: 'https://api.avilacash.net' tags: - name: Auth description: "\nAutenticación en el API" - name: Bareca description: "\nAPI para integración con Bareca - Venta de pólizas de seguro\n\nEsta API permite:\n- Consultar información y saldo de usuarios\n- Procesar ventas de pólizas (bloqueo de saldo)\n- Confirmar ventas procesadas\n- Cancelar ventas pendientes" - name: Endpoints description: '' components: securitySchemes: default: type: http scheme: bearer description: 'You can retrieve your token by using the login endpoint.' security: - default: [] paths: /api/login: post: summary: Login operationId: login description: 'Permite iniciar sesión en el API con las credenciales del aliado' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: token_type: Bearer expires_in: 31536000 access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjQyNDYzOWZhNDVjZDgyNzhhMzIwYTgzNDFmZDExZWU4NjUyMzNkNGM2MGUzODg4NWY1OWNhNWNiYmUwNTcxM2U0YjU3OWYxMTRiNDhjMTk0In0.eyJhdWQiOiIyIiwianRpIjoiNDI0NjM5ZmE0NWNkODI3OGEzMjBhODM0MWZkMTFlZTg2NTIzM2Q0YzYwZTM4ODg1ZjU5Y2E1Y2JiZTA1NzEzZTRiNTc5ZjExNGI0OGMxOTQiLCJpYXQiOjE1ODkwMzQ5OTgsIm5iZiI6MTU4OTAzNDk5OCwiZXhwIjoxNjIwNTcwOTk4LCJzdWIiOiIxMCIsInNjb3BlcyI6WyIqIl19.I_R9IDKsnZ04vJpkYKpyQ8-a7B6nPMQmwUmx4ZguG8grl15e6L5am8XMZ2WKFHm2PRxzRKLlCArDLIhRumRyYheJxiLeZ9Y0OVkC7SlVHU-NFASgiKGuo1ps1w3hSk-RcKqKxyqGhl5yrAuvZCnu4-wwriagMnv4F0EAj1835KVLPEdA1G53j39DMKziG9BwcGafPTgkui726e2P_4iro-EiImGokQCMAnFDrsm6CDDvtg0fLvZHrSsjqfPFR8ibeoLXBlJBQguThGylIJsj3FwVXue03FLFCrsflEncFpuRnaAEVWmdcsGuFm-Xh-Yx-2G_ekOpMq4DMuzK_gPbIgY3CCCUUWWzszLiw2IH-tt3poTTcMDXemKMyQdF7PqwhNZdtjT9z1Zl63zyvKWFJtjjyyVLjVBWfyl2wKLVFgXlmreLwggsgFgeS_xVX8x6urAMofBNKQGljYeqkXYnCjhCO_3LWWuAGBLPqELUAI93GmfMBECbqHfuyhF_mDRWAFf8iHhuMvcKGkJuY2u83Sd4y3JhvEgLq1ZJy6bAZNavArN3e7lBPX-owBfYkxDyT9-TPORq-Y35XMy4jyn-tfNzzw5d0Pz6z_Hg9iLWqXMLeKeYvQ9QUA-uaBtcmeRgiwjLakMmpC72GM2spoMCLq1KXWr-_TflCWsmQroOLuQ refresh_token: def5020025f4648bd9831f69d469c4e8e28a6e48f08581a4be433d5713dad472770fb32f9703744684309b4a7b20522b39016d2060ad63d4cfac0bc4c92434ad4456f6551f5b32751ea662f15b36c88a081502acf6f622150cb12a167fc131f0008685e19cb0697a0e6e3c1bbe2918263a366d938c3b57d4452ffca61c1cca1d76bfab927f4ed7a2672c6baddb18cf8c579ddb428e70ec4dd99ec777ca013080b59e667fef0b272e958aac0f777053586492e52cda8a3aa95a49589937a79e46191f7cafb3d7d272a857c8e4e8eb90b95f054df7b28dc42a8fa5dd6adf30a13eb12817b2401fdd4900a1176be12ce3db3f488a835cc0ef21bb7b6b2551342f1dab100a3c9744092f47df7b9daef5b7f4445673c4ff0ec3cf478b21a1aeb9513c26e6987fe61a3b0d8b8a6342b0404eb621aaff7f1f56bb845012bef167e24c6e896c849f8b6dd627f72d382b3522a61deaa1d478b279ff7cdbaffc1d799af7df5bb9523394 properties: token_type: type: string example: Bearer expires_in: type: integer example: 31536000 access_token: type: string example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjQyNDYzOWZhNDVjZDgyNzhhMzIwYTgzNDFmZDExZWU4NjUyMzNkNGM2MGUzODg4NWY1OWNhNWNiYmUwNTcxM2U0YjU3OWYxMTRiNDhjMTk0In0.eyJhdWQiOiIyIiwianRpIjoiNDI0NjM5ZmE0NWNkODI3OGEzMjBhODM0MWZkMTFlZTg2NTIzM2Q0YzYwZTM4ODg1ZjU5Y2E1Y2JiZTA1NzEzZTRiNTc5ZjExNGI0OGMxOTQiLCJpYXQiOjE1ODkwMzQ5OTgsIm5iZiI6MTU4OTAzNDk5OCwiZXhwIjoxNjIwNTcwOTk4LCJzdWIiOiIxMCIsInNjb3BlcyI6WyIqIl19.I_R9IDKsnZ04vJpkYKpyQ8-a7B6nPMQmwUmx4ZguG8grl15e6L5am8XMZ2WKFHm2PRxzRKLlCArDLIhRumRyYheJxiLeZ9Y0OVkC7SlVHU-NFASgiKGuo1ps1w3hSk-RcKqKxyqGhl5yrAuvZCnu4-wwriagMnv4F0EAj1835KVLPEdA1G53j39DMKziG9BwcGafPTgkui726e2P_4iro-EiImGokQCMAnFDrsm6CDDvtg0fLvZHrSsjqfPFR8ibeoLXBlJBQguThGylIJsj3FwVXue03FLFCrsflEncFpuRnaAEVWmdcsGuFm-Xh-Yx-2G_ekOpMq4DMuzK_gPbIgY3CCCUUWWzszLiw2IH-tt3poTTcMDXemKMyQdF7PqwhNZdtjT9z1Zl63zyvKWFJtjjyyVLjVBWfyl2wKLVFgXlmreLwggsgFgeS_xVX8x6urAMofBNKQGljYeqkXYnCjhCO_3LWWuAGBLPqELUAI93GmfMBECbqHfuyhF_mDRWAFf8iHhuMvcKGkJuY2u83Sd4y3JhvEgLq1ZJy6bAZNavArN3e7lBPX-owBfYkxDyT9-TPORq-Y35XMy4jyn-tfNzzw5d0Pz6z_Hg9iLWqXMLeKeYvQ9QUA-uaBtcmeRgiwjLakMmpC72GM2spoMCLq1KXWr-_TflCWsmQroOLuQ refresh_token: type: string example: def5020025f4648bd9831f69d469c4e8e28a6e48f08581a4be433d5713dad472770fb32f9703744684309b4a7b20522b39016d2060ad63d4cfac0bc4c92434ad4456f6551f5b32751ea662f15b36c88a081502acf6f622150cb12a167fc131f0008685e19cb0697a0e6e3c1bbe2918263a366d938c3b57d4452ffca61c1cca1d76bfab927f4ed7a2672c6baddb18cf8c579ddb428e70ec4dd99ec777ca013080b59e667fef0b272e958aac0f777053586492e52cda8a3aa95a49589937a79e46191f7cafb3d7d272a857c8e4e8eb90b95f054df7b28dc42a8fa5dd6adf30a13eb12817b2401fdd4900a1176be12ce3db3f488a835cc0ef21bb7b6b2551342f1dab100a3c9744092f47df7b9daef5b7f4445673c4ff0ec3cf478b21a1aeb9513c26e6987fe61a3b0d8b8a6342b0404eb621aaff7f1f56bb845012bef167e24c6e896c849f8b6dd627f72d382b3522a61deaa1d478b279ff7cdbaffc1d799af7df5bb9523394 400: description: '' content: application/json: schema: type: object example: error: invalid_request error_description: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.' hint: 'Check the `username` parameter' message: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.' properties: error: type: string example: invalid_request error_description: type: string example: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.' hint: type: string example: 'Check the `username` parameter' message: type: string example: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.' tags: - Auth requestBody: required: true content: application/json: schema: type: object properties: username: type: string description: 'Identificación del aliado en la plataforma' example: architecto nullable: false password: type: string description: 'Contraseña del aliado' example: '|]|{+-' nullable: false required: - username - password security: [] /api/refresh: post: summary: '' operationId: postApiRefresh description: '' parameters: [] responses: { } tags: - Auth requestBody: required: true content: application/json: schema: type: object properties: refresh_token: type: string description: '' example: architecto nullable: false required: - refresh_token /api/logout: get: summary: '' operationId: getApiLogout description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Auth /api/bareca/user-info: post: summary: 'Obtener información del usuario' operationId: obtenerInformacinDelUsuario description: 'Devuelve los datos básicos y el saldo disponible de un usuario.' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: nombre: Juan apellido: Pérez cedula: V12345678 email: juan@example.com telefono_1: '04121234567' direccion: 'Caracas, Venezuela' balance: 1500.5 properties: success: type: boolean example: true data: type: object properties: nombre: type: string example: Juan apellido: type: string example: Pérez cedula: type: string example: V12345678 email: type: string example: juan@example.com telefono_1: type: string example: '04121234567' direccion: type: string example: 'Caracas, Venezuela' balance: type: number example: 1500.5 403: description: '' content: application/json: schema: type: object example: success: false message: 'No tienes permisos.' properties: success: type: boolean example: false message: type: string example: 'No tienes permisos.' 500: description: '' content: application/json: schema: type: object example: success: false message: 'Ha ocurrido un error al obtener la información del usuario.' properties: success: type: boolean example: false message: type: string example: 'Ha ocurrido un error al obtener la información del usuario.' tags: - Bareca requestBody: required: true content: application/json: schema: type: object properties: user_id: type: integer description: 'ID del usuario a consultar.' example: 12345 nullable: false required: - user_id /api/bareca/process-sale: post: summary: 'Procesar venta de póliza' operationId: procesarVentaDePliza description: "Crea una transacción pendiente y bloquea el saldo del usuario.\nLa venta queda en estado \"pendiente\" hasta que se confirme o cancele." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Transacción realizada exitosamente' data: hash: $2y$10$... uuid: V12345678_0001 status: 'Saldo bloqueado' transaction_id: 123456 properties: success: type: boolean example: true message: type: string example: 'Transacción realizada exitosamente' data: type: object properties: hash: type: string example: $2y$10$... uuid: type: string example: V12345678_0001 status: type: string example: 'Saldo bloqueado' transaction_id: type: integer example: 123456 403: description: '' content: application/json: schema: type: object example: success: false message: 'El usuario no dispone de saldo suficiente para realizar la venta' properties: success: type: boolean example: false message: type: string example: 'El usuario no dispone de saldo suficiente para realizar la venta' 422: description: '' content: application/json: schema: type: object example: success: false message: 'Error de validación' errors: { } properties: success: type: boolean example: false message: type: string example: 'Error de validación' errors: type: object properties: { } tags: - Bareca requestBody: required: true content: application/json: schema: type: object properties: user_id: type: integer description: 'ID del usuario sobre el que se valida y descuenta saldo (puede ser cliente final o el integrador).' example: 12345 nullable: false amount: type: numeric description: 'Monto en Bs de la póliza.' example: '150.00' nullable: false amount_usd: type: numeric description: 'Monto en USD de la póliza.' example: '5.00' nullable: false product: type: string description: 'Tipo de póliza: rcv, salud, vida, vehiculo.' example: rcv nullable: false uuid: type: string description: 'Identificador único de la transacción (formato: cedula_id).' example: V12345678_0001 nullable: false destino: type: string description: 'Información adicional del destino/beneficiario.' example: 'Placa ABC123' nullable: false required: - user_id - amount - amount_usd - product - uuid /api/bareca/confirm-sale: post: summary: 'Confirmar venta' operationId: confirmarVenta description: "Confirma una venta pendiente y marca la transacción como completada.\nUna vez confirmada, el saldo queda debitado permanentemente." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Venta confirmada exitosamente' data: uuid: V12345678_0001 status: Completada confirmed_at: '2024-01-15T10:30:00-04:00' properties: success: type: boolean example: true message: type: string example: 'Venta confirmada exitosamente' data: type: object properties: uuid: type: string example: V12345678_0001 status: type: string example: Completada confirmed_at: type: string example: '2024-01-15T10:30:00-04:00' 400: description: '' content: application/json: schema: type: object example: success: false message: 'La transacción ya fue procesada anteriormente' properties: success: type: boolean example: false message: type: string example: 'La transacción ya fue procesada anteriormente' 404: description: '' content: application/json: schema: type: object example: success: false message: 'No se encontró la transacción con el UUID proporcionado' properties: success: type: boolean example: false message: type: string example: 'No se encontró la transacción con el UUID proporcionado' tags: - Bareca requestBody: required: true content: application/json: schema: type: object properties: uuid: type: string description: 'UUID de la transacción a confirmar.' example: V12345678_0001 nullable: false reference: type: string description: 'Referencia externa de la póliza emitida.' example: POL-2024-001234 nullable: false required: - uuid /api/bareca/cancel-sale: post: summary: 'Cancelar venta' operationId: cancelarVenta description: "Cancela una venta pendiente y devuelve el saldo bloqueado al usuario.\nSolo se pueden cancelar transacciones en estado pendiente." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Venta cancelada exitosamente' data: uuid: V12345678_0001 status: Cancelada refunded_amount: 150.0 new_balance: 1650.5 cancelled_at: '2024-01-15T10:30:00-04:00' properties: success: type: boolean example: true message: type: string example: 'Venta cancelada exitosamente' data: type: object properties: uuid: type: string example: V12345678_0001 status: type: string example: Cancelada refunded_amount: type: number example: 150.0 new_balance: type: number example: 1650.5 cancelled_at: type: string example: '2024-01-15T10:30:00-04:00' 400: description: '' content: application/json: schema: type: object example: success: false message: 'Solo se pueden cancelar transacciones pendientes' properties: success: type: boolean example: false message: type: string example: 'Solo se pueden cancelar transacciones pendientes' 404: description: '' content: application/json: schema: type: object example: success: false message: 'No se encontró la transacción con el UUID proporcionado' properties: success: type: boolean example: false message: type: string example: 'No se encontró la transacción con el UUID proporcionado' tags: - Bareca requestBody: required: true content: application/json: schema: type: object properties: uuid: type: string description: 'UUID de la transacción a cancelar.' example: V12345678_0001 nullable: false reason: type: string description: 'Motivo de la cancelación.' example: 'Cliente desistió de la compra' nullable: false required: - uuid /api/bareca/transaction-status: post: summary: 'Consultar estado de transacción' operationId: consultarEstadoDeTransaccin description: 'Obtiene el estado actual de una transacción por su UUID.' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: uuid: V12345678_0001 status: Pendiente status_code: 1 amount: 150.0 product: rcv user_id: 12345 created_at: '2024-01-15T10:00:00-04:00' updated_at: '2024-01-15T10:00:00-04:00' properties: success: type: boolean example: true data: type: object properties: uuid: type: string example: V12345678_0001 status: type: string example: Pendiente status_code: type: integer example: 1 amount: type: number example: 150.0 product: type: string example: rcv user_id: type: integer example: 12345 created_at: type: string example: '2024-01-15T10:00:00-04:00' updated_at: type: string example: '2024-01-15T10:00:00-04:00' 404: description: '' content: application/json: schema: type: object example: success: false message: 'No se encontró la transacción con el UUID proporcionado' properties: success: type: boolean example: false message: type: string example: 'No se encontró la transacción con el UUID proporcionado' tags: - Bareca requestBody: required: true content: application/json: schema: type: object properties: uuid: type: string description: 'UUID de la transacción a consultar.' example: V12345678_0001 nullable: false required: - uuid /api/sms/send: post: summary: sendSms operationId: sendSms description: 'Envia un SMS al numero de destino indicado' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Mensaje enviado' recipient: 'numero de destino' properties: success: type: boolean example: true message: type: string example: 'Mensaje enviado' recipient: type: string example: 'numero de destino' 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo enviar el mensaje' recipient: 'numero de destino' properties: success: type: boolean example: false message: type: string example: 'No se pudo enviar el mensaje' recipient: type: string example: 'numero de destino' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: numero: type: string description: 'El número de teléfono destino' example: architecto nullable: false message: type: string description: 'Must be at least 10 characters. Must not be greater than 160 characters.' example: g nullable: false mensaje: type: string description: 'El mensaje a enviar, no debe superar los 160 caracteres' example: architecto nullable: false required: - numero - message - mensaje /api/avilacash/send-sms-batch: post: summary: sendSmsBatch operationId: sendSmsBatch description: 'Envia un lote de SMS y procesa el envío en cola.' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: message: type: string description: 'Mensaje a enviar (10-160 caracteres)' example: architecto nullable: false numbers: type: array description: 'Lista de números destino (máximo 5000)' example: - architecto items: type: string required: - message - numbers /api/avilacash/recarga-celular: post: summary: recargaCelular operationId: recargaCelular description: 'Realiza la recarga OTA (Over The Air) al número indicado' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Recarga procesada' data: codigo_aprobacion: '0959400415' code: '00' uuid: '1234_56789' properties: success: type: boolean example: true message: type: string example: 'Recarga procesada' data: type: object properties: codigo_aprobacion: type: string example: '0959400415' code: type: string example: '00' uuid: type: string example: '1234_56789' 403: description: '' content: application/json: schema: type: object example: success: false message: errors: numero: [] monto: [] uuid: [] properties: success: type: boolean example: false message: type: object properties: errors: type: object properties: numero: type: array example: [] monto: type: array example: [] uuid: type: array example: [] 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo realizar la recarga' uuid: '1234_56789' properties: success: type: boolean example: false message: type: string example: 'No se pudo realizar la recarga' uuid: type: string example: '1234_56789' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: numero: type: string description: 'El número de teléfono a recargar' example: architecto nullable: false monto: type: number description: 'El monto a recargar' example: 4326.41688 nullable: false uuid: type: string description: 'Identificador único para la transacción, debe estar compuesto por el nombre de usuario seguido de una cadena unica. Ejm: 1234567_0000012345' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false required: - numero - monto - uuid /api/avilacash/recarga-celular-pos: post: summary: '' operationId: postApiAvilacashRecargaCelularPos description: '' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: numero: type: string description: '' example: architecto nullable: false monto: type: string description: 'Must be between 0 and 999999.99 characters.' example: 'n' nullable: false uuid: type: string description: '' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false operadora: type: string description: '' example: movilnet_postpago nullable: false enum: - movilnet_postpago - digitel_postpago required: - numero - monto - uuid - operadora /api/avilacash/recarga-movil-internacional: post: summary: recargaMovilInternacional operationId: recargaMovilInternacional description: 'Realiza la recarga OTA (Over The Air) de móviles internacionales' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Recarga procesada' data: codigo_aprobacion: '0959400415' code: '00' uuid: '1234_56789' properties: success: type: boolean example: true message: type: string example: 'Recarga procesada' data: type: object properties: codigo_aprobacion: type: string example: '0959400415' code: type: string example: '00' uuid: type: string example: '1234_56789' 403: description: '' content: application/json: schema: type: object example: success: false message: errors: abonado: [] monto: [] uuid: [] properties: success: type: boolean example: false message: type: object properties: errors: type: object properties: abonado: type: array example: [] monto: type: array example: [] uuid: type: array example: [] 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo realizar la recarga' uuid: '1234_56789' properties: success: type: boolean example: false message: type: string example: 'No se pudo realizar la recarga' uuid: type: string example: '1234_56789' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: numero: type: integer description: 'El número de teléfono a recargar' example: 16 nullable: false monto: type: number description: 'El monto a recargar' example: 4326.41688 nullable: false operadora: type: integer description: 'El identificador de la operadora a recargar' example: 16 nullable: false pais: type: integer description: 'El identificador del país de la operadora' example: 16 nullable: false uuid: type: string description: 'Identificador único para la transacción, debe estar compuesto por el nombre de usuario seguido de una cadena unica. Ejm: 1234567_0000012345' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false product: type: string description: 'The id of an existing record in the products table.' example: null nullable: false required: - numero - monto - operadora - pais - uuid /api/avilacash/recarga-tv: post: summary: recargaTV operationId: recargaTV description: 'Realiza la recarga OTA (Over The Air) de TV por suscripción' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Recarga procesada' data: codigo_aprobacion: '0959400415' code: '00' uuid: '1234_56789' properties: success: type: boolean example: true message: type: string example: 'Recarga procesada' data: type: object properties: codigo_aprobacion: type: string example: '0959400415' code: type: string example: '00' uuid: type: string example: '1234_56789' 403: description: '' content: application/json: schema: type: object example: success: false message: errors: abonado: [] monto: [] uuid: [] properties: success: type: boolean example: false message: type: object properties: errors: type: object properties: abonado: type: array example: [] monto: type: array example: [] uuid: type: array example: [] 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo realizar la recarga' uuid: '1234_56789' properties: success: type: boolean example: false message: type: string example: 'No se pudo realizar la recarga' uuid: type: string example: '1234_56789' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: abonado: type: integer description: 'El número de contrato o SmartCard a recargar' example: 16 nullable: false monto: type: number description: 'El monto a recargar' example: 4326.41688 nullable: false uuid: type: string description: 'Identificador único para la transacción, debe estar compuesto por el nombre de usuario seguido de una cadena unica. Ejm: 1234567_0000012345' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false operadora: type: string description: 'El nombre de la operadora a recargar (simple, cantv, intercable)' example: architecto nullable: false required: - abonado - monto - uuid - operadora /api/avilacash/consulta-simpletv: post: summary: 'Consulta Simple' operationId: consultaSimple description: 'Devuelve información sobre la smartcard indicada para la operadora Simple TV' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Consulta exitosa' extra: balance: 123456.78 days_left: 365 month_bill: 123456.78 properties: success: type: boolean example: true message: type: string example: 'Consulta exitosa' extra: type: object properties: balance: type: number example: 123456.78 days_left: type: integer example: 365 month_bill: type: number example: 123456.78 500: description: '' content: application/json: schema: type: object example: success: false message: 'El número de tarjeta de acceso es inválido. Por favor ingrese a nuestra página web www.simple.com.ve' properties: success: type: boolean example: false message: type: string example: 'El número de tarjeta de acceso es inválido. Por favor ingrese a nuestra página web www.simple.com.ve' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: smartcard: type: string description: 'El número de SmartCard a consultar' example: architecto nullable: false required: - smartcard /api/avilacash/consulta-saldo: post: summary: 'Consulta de saldo Inter y Cantv' operationId: consultaDeSaldoInterYCantv description: 'Devuelve información sobre el contrato indicado para la operadora Inter' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: abonado: type: string description: 'El número de contrato / telefono a consultar' example: architecto nullable: false operadora: type: string description: 'El nombre de la operadora a consultar' example: architecto nullable: false required: - abonado - operadora /api/avilacash/recarga-fijo: post: summary: recargaFijo operationId: recargaFijo description: 'Realiza la recarga OTA (Over The Air) al número fijo indicado' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Recarga procesada' data: codigo_aprobacion: '0959400415' code: '00' uuid: '1234_56789' properties: success: type: boolean example: true message: type: string example: 'Recarga procesada' data: type: object properties: codigo_aprobacion: type: string example: '0959400415' code: type: string example: '00' uuid: type: string example: '1234_56789' 403: description: '' content: application/json: schema: type: object example: success: false message: errors: numero: [] monto: [] uuid: [] properties: success: type: boolean example: false message: type: object properties: errors: type: object properties: numero: type: array example: [] monto: type: array example: [] uuid: type: array example: [] 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo realizar la recarga' uuid: '1234_56789' properties: success: type: boolean example: false message: type: string example: 'No se pudo realizar la recarga' uuid: type: string example: '1234_56789' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: numero: type: string description: 'El número de teléfono a recargar' example: architecto nullable: false monto: type: number description: 'El monto a recargar' example: 4326.41688 nullable: false uuid: type: string description: 'Identificador único para la transacción, debe estar compuesto por el nombre de usuario seguido de una cadena unica. Ejm: 1234567_0000012345' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false operadora: type: string description: 'El nombre de la operadora a recargar (digitel_fijo, movistar_fijo)' example: architecto nullable: false required: - numero - monto - uuid - operadora /api/avilacash/recarga-pin: post: summary: recargaPin operationId: recargaPin description: 'Realiza la compra de un pin de servicio' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "{\n\"success\": true,\n\"data\": [\n{\n\"uuid\": \"1234_56789\",\n\"operadora\": \"netflix\",\n\"monto\": \"20000\",\n\"code\": \"2509071547497847\",\n\"message\": \"Recarga exitosa\"\n\"url\": \"https://www.netflix.com/redeem\"\n}\n]\n}" 403: description: '' content: application/json: schema: type: object example: success: false message: errors: operadora: [] pin: [] uuid: [] properties: success: type: boolean example: false message: type: object properties: errors: type: object properties: operadora: type: array example: [] pin: type: array example: [] uuid: type: array example: [] 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo realizar la recarga' uuid: '1234_56789' properties: success: type: boolean example: false message: type: string example: 'No se pudo realizar la recarga' uuid: type: string example: '1234_56789' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: pin: type: string description: 'El pin a comprar' example: architecto nullable: false operadora: type: string description: 'El nombre de la operdora del pin' example: architecto nullable: false uuid: type: string description: 'Identificador único para la transacción, debe estar compuesto por el nombre de usuario seguido de una cadena unica. Ejm: 1234567_0000012345' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false required: - pin - operadora - uuid /api/avilacash/transaction: get: summary: getTransactionByUUID operationId: getTransactionByUUID description: "Obtiene el detalle de la transaccion dada\n\nEste método acepta solo un parámetro, el UUID de la transacción" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: details: external_uuid: '4444' destino: '04168647870' producto: movilnet_pin monto: '5000.00' dateTime: '2020-01-16 18:32:35' code: '1104426271668729' barcode: '0000005160250778' mensaje: null status: aprobado properties: success: type: boolean example: true data: type: object properties: details: type: object properties: external_uuid: type: string example: '4444' destino: type: string example: '04168647870' producto: type: string example: movilnet_pin monto: type: string example: '5000.00' dateTime: type: string example: '2020-01-16 18:32:35' code: type: string example: '1104426271668729' barcode: type: string example: '0000005160250778' mensaje: type: string example: null status: type: string example: aprobado 404: description: '' content: application/json: schema: type: object example: success: false data: transaction: 'La transacción solicitada no existe' properties: success: type: boolean example: false data: type: object properties: transaction: type: string example: 'La transacción solicitada no existe' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: uuid: type: string description: 'UUID de la transacción' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false required: - uuid /api/avilacash/recarga-amazon: post: summary: recargaAmazonPrime operationId: recargaAmazonPrime description: 'Realiza la recarga OTA (Over The Air) de Amazon Prime Video' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Recarga procesada' data: url: 'https://is.gd/123456' code: '00' uuid: '1234_56789' properties: success: type: boolean example: true message: type: string example: 'Recarga procesada' data: type: object properties: url: type: string example: 'https://is.gd/123456' code: type: string example: '00' uuid: type: string example: '1234_56789' 403: description: '' content: application/json: schema: type: object example: success: false message: errors: numero: [] uuid: [] properties: success: type: boolean example: false message: type: object properties: errors: type: object properties: numero: type: array example: [] uuid: type: array example: [] 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo realizar la recarga' uuid: '1234_56789' properties: success: type: boolean example: false message: type: string example: 'No se pudo realizar la recarga' uuid: type: string example: '1234_56789' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: numero: type: string description: 'El número de telefono con el 0 al inicio, a asociar o ya asociado a la suscripción de Prime Video' example: architecto nullable: false uuid: type: string description: 'Identificador único para la transacción, debe estar compuesto por el nombre de usuario seguido de una cadena unica. Ejm: 1234567_0000012345' example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed nullable: false required: - numero - uuid '/api/avilacash/get-rate/{iso}': get: summary: getRate operationId: getRate description: 'Retorna la tasa de cambio actual para los servicios internacionales' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Tasa de cambio obtenida' currency: COP|USD rate: 1234.56 client_rate: 1234.56 properties: success: type: boolean example: true message: type: string example: 'Tasa de cambio obtenida' currency: type: string example: COP|USD rate: type: number example: 1234.56 client_rate: type: number example: 1234.56 403: description: '' content: application/json: schema: type: object example: success: false message: errors: iso: [] properties: success: type: boolean example: false message: type: object properties: errors: type: object properties: iso: type: array example: [] 500: description: '' content: application/json: schema: type: object example: success: false message: 'No se pudo obtener la tasa de cambio' uuid: '1234_56789' properties: success: type: boolean example: false message: type: string example: 'No se pudo obtener la tasa de cambio' uuid: type: string example: '1234_56789' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: iso: type: string description: 'el ISO de la moneda a consultar (COP, USD)' example: architecto nullable: false required: - iso parameters: - in: path name: iso description: '' example: architecto required: true schema: type: string '/api/avilacash/get-services/{country}': get: summary: getServices operationId: getServices description: 'Obtiene los servicios disponibles para recarga' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "{\n\"success\": true,\n\"message\": \"Servicios disponibles\",\ndata\": [\n{\n\"id\": 6,\n\"country_id\": 2,\n\"active\": 1,\n \"name\": \"Movistar Colombia\",\n \"slug\": \"movistar_co\",\n \"description\": \"Movilnet Móvil Colombia\",\n\"image\": \"\",\n \"icon\": \"\",\n \"created_at\": \"2023-06-21T00:26:57.000000Z\",\n \"updated_at\": \"2023-06-21T00:26:57.000000Z\",\n \"transaction_type_id\": 4,\n \"products\": [\n {\n \"id\": 47,\n \"product\": \"Movistar Prepago Colombia\",\n \"slug\": \"movistar_co\",\n \"description\": \"Movistar Prepago Colombia\",\n \"image\": \"\",\n \"icon\": \"\",\n \"active\": 1,\n \"service_id\": 6,\n \"country_id\": 2,\n \"currency_id\": 1,\n \"price\": \"0.00\",\n \"sell_price\": \"0.00\",\n \"type\": \"mobile\",\n \"product_code\": \"movistar_co\",\n \"created_at\": \"2023-06-24T04:32:32.000000Z\",\n \"updated_at\": \"2023-06-24T04:32:32.000000Z\",\n \"min\": \"1000.00\",\n \"max\": \"50000.00\",\n \"multiplo\": \"1000.00\"\n }\n ],\n\"country\": {\n \"id\": 2,\n \"sortname\": \"COL\",\n \"name\": \"Colombia\",\n \"created_at\": \"2023-06-20T18:09:17.000000Z\",\n \"updated_at\": \"2023-06-20T18:09:17.000000Z\",\n \"active\": 1,\n \"currency_id\": 1,\n \"flag\": null,\n \"currency\": {\n \"id\": 1,\n \"iso\": \"COP\",\n \"currency\": \"Peso Colombiano\",\n \"rate\": \"119\",\n \"rate_p\": \"0.00\",\n \"created_at\": \"2020-05-16T16:34:00.000000Z\",\n \"updated_at\": \"2023-06-23T23:39:57.000000Z\"\n }\n }\n},\n]" tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: country: type: string description: 'optional El código del país, en caso de no incluirlo se devolverá la lista completa de servicios disponibles para cada país' example: architecto nullable: false parameters: - in: path name: country description: 'Optional parameter.' required: true schema: type: string examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: architecto /api/avilacash/user: get: summary: '' operationId: getApiAvilacashUser description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: profile: null properties: profile: type: string example: null tags: - Endpoints /api/avilacash/saldo: get: summary: fetchBalance operationId: fetchBalance description: 'Devuelve el saldo disponible del aliado basado en su token de autenticación' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: balance: 123456.78 properties: success: type: boolean example: true data: type: object properties: balance: type: number example: 123456.78 500: description: '' content: application/json: schema: type: object example: success: false message: 'Error interno al obtener el balance' properties: success: type: boolean example: false message: type: string example: 'Error interno al obtener el balance' tags: - Endpoints