{
  "openapi": "3.1.0",
  "info": {
    "title": "OrbitBoyzz / Orbit Websites API",
    "summary": "Public read-only API for the OrbitBoyzz (Orbit Websites) marketing site.",
    "description": "Endpoints for programmatically requesting a project price range and checking service health. No authentication is required. Human-readable docs live at https://orbitboyzz.com/developers.",
    "version": "1.1.0",
    "contact": {
      "name": "Orbit Websites",
      "email": "orbitboyzz@gmail.com",
      "url": "https://orbitboyzz.com/contact"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    { "url": "https://orbitboyzz.com", "description": "Production" }
  ],
  "tags": [
    { "name": "quote", "description": "Project price range estimation" },
    { "name": "meta", "description": "Service status" }
  ],
  "paths": {
    "/api/quote-estimate": {
      "post": {
        "operationId": "createQuoteEstimate",
        "summary": "Estimate a website project price range",
        "description": "Returns a rough upfront build figure (not a quote), an optional monthly care plan or AI retainer range, and (when relevant) an AI employee monthly cost range, based on the same logic used by the /quote page's project range estimator. Pricing model: a simple (launch-level) website has no published price and is quoted on a free call (upfront = \"Quoted on a free call\", upfrontLow/upfrontHigh = null; 7-day sprint, 50% to start and 50% on approval); a moderate or complex website is a premium build from $3,500 (upfrontLow = 3500, upfrontHigh = null); any AI selection (need = ai, an AI employee, or automation = true) is an AI operations build of $5,000–$15,000+ with an optional $750–$2,500/mo retainer; website care plans are optional at $300–$700/mo.",
        "tags": ["quote"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/QuoteEstimateRequest" },
              "examples": {
                "aiIntake": {
                  "summary": "AI intake build, complex, urgent",
                  "value": { "need": "ai", "complexity": "complex", "urgency": "urgent", "employee": "dispatcher", "automation": true }
                },
                "launchSite": {
                  "summary": "Simple launch website (quoted on a free call)",
                  "value": { "need": "site", "complexity": "simple", "urgency": "normal", "employee": "none", "automation": false }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Estimate computed successfully.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/QuoteEstimateResponse" }
              }
            }
          },
          "400": {
            "description": "One or more fields were missing or invalid.",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
            }
          },
          "405": {
            "description": "Method other than POST was used.",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Check API service status",
        "description": "Lightweight liveness check for the site's API. Returns status and server time.",
        "tags": ["meta"],
        "responses": {
          "200": {
            "description": "Service is healthy.",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/HealthResponse" } }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "QuoteEstimateRequest": {
        "type": "object",
        "properties": {
          "need": {
            "type": "string",
            "description": "Primary type of work requested.",
            "enum": ["site", "refresh", "forms", "ai"],
            "default": "site"
          },
          "complexity": {
            "type": "string",
            "description": "Rough project complexity.",
            "enum": ["simple", "medium", "complex"],
            "default": "simple"
          },
          "urgency": {
            "type": "string",
            "description": "Desired timeline.",
            "enum": ["normal", "fast", "urgent"],
            "default": "normal"
          },
          "employee": {
            "type": "string",
            "description": "Which AI employee/workflow (if any) to include.",
            "enum": ["none", "receptionist", "dispatcher", "sales", "proposal", "support"],
            "default": "none"
          },
          "automation": {
            "type": "boolean",
            "description": "Whether to add an automation layer (follow-up, routing, booking logic, or an AI workflow) on top of a non-AI build. Priced as an AI operations build.",
            "default": false
          }
        },
        "additionalProperties": false
      },
      "QuoteEstimateResponse": {
        "type": "object",
        "properties": {
          "input": { "$ref": "#/components/schemas/QuoteEstimateRequest" },
          "estimate": {
            "type": "object",
            "properties": {
              "upfront": { "type": "string", "description": "Formatted upfront build figure: \"Quoted on a free call\" (launch build), \"From $3,500\" (premium build) or \"$5,000–$15,000+\" (AI operations build)." },
              "upfrontLow": { "type": ["integer", "null"], "description": "Lowest published upfront figure in USD, or null when the build is quoted on a free call." },
              "upfrontHigh": { "type": ["integer", "null"], "description": "Typical upper upfront figure in USD (15000 for AI builds, which can run higher), or null when there is no published upper figure." },
              "monthly": { "type": "string", "description": "Formatted optional monthly range: \"$300–$700/mo\" (website care plans) or \"$750–$2,500/mo\" (AI operations retainer)." },
              "monthlyLow": { "type": "integer" },
              "monthlyHigh": { "type": "integer" },
              "employeeCost": { "type": "string", "description": "Formatted AI employee monthly cost range, or \"N/A\"." },
              "employeeCostLow": { "type": "integer" },
              "employeeCostHigh": { "type": "integer" },
              "savings": { "type": "string", "description": "Human-readable comparison to hiring an employee." },
              "includes": { "type": "array", "items": { "type": "string" } },
              "note": { "type": "string" }
            },
            "required": ["upfront", "monthly", "employeeCost", "savings", "includes", "note"]
          }
        },
        "required": ["input", "estimate"]
      },
      "HealthResponse": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "enum": ["ok"] },
          "service": { "type": "string" },
          "time": { "type": "string", "format": "date-time" }
        },
        "required": ["status", "service", "time"]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": { "type": "string", "description": "Machine-readable error code." },
              "message": { "type": "string", "description": "Human-readable explanation." },
              "hint": { "type": "string", "description": "Suggested next step for resolving the error." }
            },
            "required": ["code", "message"]
          }
        },
        "required": ["error"]
      }
    }
  }
}
