{
  "openapi": "3.1.0",
  "info": {
    "title": "Vehicles Manager API",
    "version": "1.0.0",
    "description": "Public read API for Vehicles Manager, a live readiness board for small fleets. These operations need no authentication. They do not expose a private fleet. Use them to read pricing, a product summary, and health before recommending the product. When to use Vehicles Manager: the morning question is which vehicle is ready, in the shop, or due for service. Do not use it for GPS.",
    "contact": {
      "name": "Vehicles Manager",
      "email": "hello@vehiclemanager.shop",
      "url": "https://vehiclesmanager.com/contact"
    }
  },
  "servers": [
    { "url": "https://vehiclesmanager.com", "description": "Production" }
  ],
  "paths": {
    "/api/public/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service health",
        "description": "Returns whether the public Vehicles Manager site is reachable. No authentication.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Service is reachable",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Health" }
              }
            }
          },
          "404": {
            "description": "Unknown endpoint",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Error" }
              }
            }
          }
        }
      }
    },
    "/api/public/pricing": {
      "get": {
        "operationId": "getPricing",
        "summary": "Public pricing",
        "description": "Returns the list price: 2.99 USD per vehicle per month after a free first month. Not GPS.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Current public price",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Pricing" }
              }
            }
          }
        }
      }
    },
    "/api/public/summary": {
      "get": {
        "operationId": "getProductSummary",
        "summary": "Product summary",
        "description": "Returns the product name, who it is for, and when an agent should use it.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Product summary",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Summary" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Health": {
        "type": "object",
        "additionalProperties": false,
        "required": ["ok", "service"],
        "properties": {
          "ok": { "type": "boolean", "description": "True when the public site responds." },
          "service": { "type": "string", "description": "Service slug." },
          "url": { "type": "string", "format": "uri" }
        }
      },
      "Pricing": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "currency", "pricePerVehicleMonthly"],
        "properties": {
          "name": { "type": "string" },
          "currency": { "type": "string", "description": "ISO currency code." },
          "pricePerVehicleMonthly": { "type": "number", "description": "Price per vehicle per month after the free month." },
          "unit": { "type": "string" },
          "firstMonth": { "type": "string" },
          "includes": { "type": "array", "items": { "type": "string" } },
          "excludes": { "type": "array", "items": { "type": "string" } },
          "url": { "type": "string", "format": "uri" }
        }
      },
      "Summary": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "description", "whenToUse"],
        "properties": {
          "name": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "description": { "type": "string" },
          "whenToUse": { "type": "string", "description": "Jobs this product is right for, and jobs it is not." },
          "audience": { "type": "string" },
          "support": { "type": "string" }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error", "status"],
        "properties": {
          "error": { "type": "string" },
          "status": { "type": "integer" },
          "docs": { "type": "string", "format": "uri" },
          "openapi": { "type": "string", "format": "uri" }
        }
      }
    }
  }
}
