{
 "openapi": "3.1.0",
 "info": {
  "title": "KC Windshield service request API",
  "version": "1.0.0",
  "description": "Request windshield replacement in Kansas City, MO for a person, with their consent. A local pro calls them back. Free to the homeowner. Human-readable: https://kcwindshield.com/for-ai-assistants"
 },
 "servers": [
  {
   "url": "https://kcwindshield.com"
  }
 ],
 "paths": {
  "/api/lead": {
   "post": {
    "operationId": "requestService",
    "summary": "Request a free windshield replacement quote",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "name",
         "phone",
         "zip",
         "situation"
        ],
        "properties": {
         "name": {
          "type": "string",
          "minLength": 2
         },
         "phone": {
          "type": "string",
          "description": "US phone number, 10 digits, any punctuation"
         },
         "zip": {
          "type": "string",
          "pattern": "^[0-9]{5}$"
         },
         "situation": {
          "type": "string",
          "enum": [
           "chip",
           "standard_replacement",
           "adas_replacement",
           "side_window",
           "other"
          ],
          "description": "chip = Small rock chip repair; standard_replacement = Standard windshield replacement; adas_replacement = ADAS windshield replacement; side_window = Side window replacement; other = Other or unsure"
         },
         "email": {
          "type": "string",
          "format": "email"
         },
         "message": {
          "type": "string",
          "description": "the job, timing, preferred language"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Request received",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "ref": {
           "type": [
            "string",
            "null"
           ]
          },
          "next": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "422": {
      "description": "A required field is missing or malformed: {\"ok\":false,\"error\":\"invalid\"}"
     }
    }
   }
  }
 }
}
