{
  "openapi": "3.1.0",
  "info": {
    "title": "Infinitum Agencia Digital API",
    "version": "1.0.0",
    "description": "API oficial de Infinitum Agencia Digital para cotizaciones instantáneas de páginas web, SEO local, catálogos WhatsApp y pagos autónomos con Machine Payment Protocol (MPP).",
    "contact": {
      "name": "Infinitum Soporte API",
      "url": "https://infinitumweb.com",
      "email": "soporte@infinitumweb.com"
    }
  },
  "x-service-info": {
    "categories": [
      "web-development",
      "digital-marketing",
      "seo-services",
      "business-services"
    ]
  },
  "servers": [
    {
      "url": "https://infinitumweb.com",
      "description": "Servidor de Producción"
    }
  ],
  "paths": {
    "/api/status": {
      "get": {
        "summary": "Estado de Salud de la API",
        "description": "Retorna el estado operativo de los servicios de la agencia y pasarelas de pago.",
        "responses": {
          "200": {
            "description": "Servicio en línea",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "operational"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/planes": {
      "get": {
        "summary": "Listar Planes y Precios Oficiales",
        "description": "Retorna el catálogo actualizado de soluciones web, correo corporativo y SEO con precios en USD y tasa BCV en Bolívares.",
        "responses": {
          "200": {
            "description": "Listado de planes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nombre": {
                        "type": "string"
                      },
                      "precio_desde_usd": {
                        "type": "number"
                      },
                      "descripcion": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cotizar": {
      "post": {
        "summary": "Generar Cotización Instantánea",
        "description": "Calcula el presupuesto personalizado para proyectos de desarrollo web, hosting NVMe o posicionamiento SEO.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tipo_servicio": {
                    "type": "string",
                    "enum": [
                      "landing_page",
                      "sitio_corporativo",
                      "catalogo_whatsapp",
                      "correo_corporativo"
                    ]
                  },
                  "sector": {
                    "type": "string"
                  },
                  "correo_contacto": {
                    "type": "string",
                    "format": "email"
                  },
                  "whatsapp": {
                    "type": "string"
                  }
                },
                "required": [
                  "tipo_servicio",
                  "whatsapp"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cotización generada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cotizacion_id": {
                      "type": "string"
                    },
                    "monto_estimado_usd": {
                      "type": "number"
                    },
                    "enlace_whatsapp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/checkout/landing-page": {
      "post": {
        "summary": "Contratar Plan Landing Page de Alta Conversión (MPP Enabled)",
        "description": "Inicia la orden de contratación y liquidación para el Plan Landing Page de Ventas.",
        "operationId": "checkoutLandingPage",
        "x-payment-info": {
          "intent": "charge",
          "method": "stripe",
          "amount": 180,
          "currency": "USD",
          "description": "Plan Landing Page de Ventas de Alta Conversión"
        },
        "responses": {
          "200": {
            "description": "Orden generada con instrucciones de pago",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orden_id": {
                      "type": "string"
                    },
                    "estado": {
                      "type": "string",
                      "example": "pending_payment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/checkout/sitio-corporativo": {
      "post": {
        "summary": "Contratar Plan Sitio Web Corporativo (MPP Enabled)",
        "description": "Inicia la orden de contratación y liquidación para el Plan Sitio Web Corporativo 5 Secciones.",
        "operationId": "checkoutSitioCorporativo",
        "x-payment-info": {
          "intent": "charge",
          "method": "stripe",
          "amount": 350,
          "currency": "USD",
          "description": "Plan Sitio Web Corporativo 5 Secciones"
        },
        "responses": {
          "200": {
            "description": "Orden corporativa generada",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orden_id": {
                      "type": "string"
                    },
                    "estado": {
                      "type": "string",
                      "example": "pending_payment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
