{"openapi":"3.0.0","info":{"title":"API Rest by XPECTRA","description":"API Clients","contact":{"email":"you@your-company.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/APIS-QA/aaaaa/1.0.0"},{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/Xpectra/API_Clients/1.0.0"},{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/GenovaC/API_Clients/1.0.0"},{"description":"API Clients","url":"https://api-qa.nevula.com"}],"security":[{"BearerAuth":[]}],"paths":{"/api/central-station-clients/api-client":{"post":{"security":[{"BearerAuth":[]}],"tags":["New Client"],"summary":"Alta de clientes","description":"Adds a client to the system","requestBody":{"description":"Client to add","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Nombre del titular","example":"Carlos Guevara"},"email":{"type":"string","description":"Email del cliente","example":"carlosguevara@mail.com"},"contacts":{"type":"array","description":"Medios de Contactos","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","MOBILE"],"description":"Tipo de contacto","example":"EMAIL"},"value":{"type":"string","description":"Dato de contacto","example":"5454445454"},"description":{"type":"string","description":"Descripción de contacto","example":"Oscar Perez"}}},"example":[{"type":"EMAIL","value":"oscar@yopmail.com","description":"Email de oscar"},{"type":"PHONE","value":"5454445454","description":"Teléfono de oscar"}]},"renovation_type":{"type":"string","description":"Tipo de renovación","example":"AUTOMATIC","enum":["AUTOMATIC","MANUAL"]},"subscription_plan":{"type":"string","description":"Plan de suscripción","example":"30_DAYS"},"subscription_expiration":{"type":"string","format":"date","description":"Vencimiento de suscripción","example":"2021-07-13"}}}}}},"responses":{"200":{"description":"client created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"idClient":{"type":"string","description":"ID del Cliente","example":"asass-asas-asassas"},"account":{"type":"object","properties":{"name":{"type":"string","example":"Carlos Guevara"},"accountNumber":{"type":"string","example":"4187"},"email":{"type":"string","example":"carlosguevara@mail.com"}}}}}}}},"400":{"description":"Email already exist","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"ERROR_KEY"},"value":{"type":"string","example":"VALUE_SENT"}}}}}},"404":{"description":"Not found."}}},"put":{"security":[{"BearerAuth":[]}],"tags":["Update Client"],"summary":"Actualizar Cliente","description":"update an existing client","requestBody":{"description":"Client to update","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"idClient":{"type":"string","description":"ID del cliente","example":"egsk-epbk-auhj-auhk"},"name":{"type":"string","description":"Nombre del titular","example":"Carlos Guevara"},"email":{"type":"string","description":"Email del cliente","example":"carlosguevara@mail.com"},"contacts":{"type":"array","description":"Medios de Contactos","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","MOBILE"],"description":"Tipo de contacto","example":"EMAIL"},"value":{"type":"string","description":"Dato de contacto","example":"5454445454"},"description":{"type":"string","description":"Descripción de contacto","example":"Oscar Perez"}}},"example":[{"type":"EMAIL","value":"oscar@yopmail.com","description":"Email de oscar"},{"type":"PHONE","value":"5454445454","description":"Teléfono de oscar"}]}}}}}},"responses":{"200":{"description":"client updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"account":{"type":"object","properties":{"name":{"type":"string","example":"Carlos Guevara"},"number":{"type":"string","example":418277},"email":{"type":"string","example":"carlosguevara@mail.com"}}}}}}}},"400":{"description":"Invalid ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"ERROR_KEY"},"value":{"type":"string","example":"VALUE_SENT"}}}}}},"404":{"description":"Not found."}}}},"/api/central-station-clients/api-client/subscription-renewal":{"put":{"security":[{"BearerAuth":[]}],"tags":["Customer Subscription Renewal"],"summary":"Renovar suscripción del cliente","description":"update subscription expiration","requestBody":{"description":"Client to renew","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountNumber":{"type":"string","description":"Número de Cuenta","example":"1234_1234"},"subscription_expiration":{"type":"string","format":"date","description":"Nueva fecha de vencimiento de suscripción","example":"2021-09-13"},"subscription_plan":{"type":"string","description":"Plan de suscripción","example":"30_DAYS"},"renovation_type":{"type":"string","description":"Tipo de renovación","example":"AUTOMATIC","enum":["AUTOMATIC","MANUAL"]}}}}}},"responses":{"200":{"description":"subscription updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"account":{"type":"object","properties":{"accountNumber":{"type":"string","example":418277},"subscription_expiration":{"type":"string","format":"date","description":"Nueva fecha de expiración","example":"2021-09-13"}}}}}}}},"400":{"description":"Invalid ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"ERROR_KEY"},"value":{"type":"string","example":"VALUE_SENT"}}}}}},"404":{"description":"Not found."}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}