{
  "openapi": "3.1.0",
  "info": {
    "title": "Hoosier Cladding services and booking API",
    "version": "1.0.0",
    "summary": "Siding services, prices, open appointment times and free-estimate booking for Hoosier Cladding LLC, South Bend, Indiana.",
    "description": "No API key. Appointment times are 09:00, 11:00, 13:00, 15:00 Monday to Friday, America/Indiana/Indianapolis. Book only after the homeowner confirms the time.",
    "contact": {
      "name": "Hoosier Cladding LLC",
      "email": "David@Hoosier.works",
      "url": "https://www.hoosiercladding.com/for-ai-agents"
    }
  },
  "servers": [
    {
      "url": "https://www.hoosiercladding.com"
    }
  ],
  "paths": {
    "/api/services": {
      "get": {
        "operationId": "listServices",
        "summary": "Returns Hoosier Cladding business details, every siding service with installed price ranges, the free bookable appointments, and the service area.",
        "responses": {
          "200": {
            "description": "Catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/availability": {
      "get": {
        "operationId": "getOpenTimes",
        "summary": "List open times for a free appointment. Times are Monday to Friday in Eastern Time. Each result has a \"start\" value to pass to book_visit.",
        "parameters": [
          {
            "name": "appointment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "free-siding-estimate",
                "storm-damage-inspection",
                "siding-repair-assessment"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 45,
              "default": 14
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Open times",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            }
          }
        }
      }
    },
    "/api/bookings": {
      "post": {
        "operationId": "bookVisit",
        "summary": "Book a free Hoosier Cladding visit at an open time. Only call after the homeowner has confirmed the exact time and agreed to be contacted; set consent to true to record that. Returns a booking reference; the office calls to confirm within one business day.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "appointment": {
                    "type": "string",
                    "enum": [
                      "free-siding-estimate",
                      "storm-damage-inspection",
                      "siding-repair-assessment"
                    ]
                  },
                  "start": {
                    "type": "string",
                    "description": "A \"start\" value returned by get_open_times, e.g. 2026-11-10T09:00:00-05:00."
                  },
                  "name": {
                    "type": "string",
                    "description": "Homeowner full name."
                  },
                  "phone": {
                    "type": "string",
                    "description": "10-digit US phone number."
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "address": {
                    "type": "string",
                    "description": "Street address of the house, with city."
                  },
                  "zip": {
                    "type": "string",
                    "pattern": "^\\d{5}$"
                  },
                  "notes": {
                    "type": "string",
                    "description": "Optional: what the homeowner wants done, siding type, storm date, claim number."
                  },
                  "consent": {
                    "type": "boolean",
                    "const": true,
                    "description": "True only if the homeowner agreed to this booking and to be contacted."
                  }
                },
                "required": [
                  "appointment",
                  "start",
                  "name",
                  "phone",
                  "email",
                  "address",
                  "zip",
                  "consent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Booked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/service-area": {
      "get": {
        "operationId": "checkServiceArea",
        "summary": "Check whether a home ZIP code is inside the Hoosier Cladding service area.",
        "parameters": [
          {
            "name": "zip",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{5}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/faq": {
      "get": {
        "operationId": "searchFaq",
        "summary": "Search Hoosier Cladding’s published answers about siding cost, materials, repair, insurance claims, permits and booking.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching questions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "Slot": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "type": "string"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "Availability": {
        "type": "object",
        "properties": {
          "timezone": {
            "type": "string"
          },
          "open_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Slot"
            }
          },
          "next_open": {
            "$ref": "#/components/schemas/Slot"
          }
        }
      },
      "Booking": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "appointment": {
            "type": "string"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "when": {
            "type": "string"
          },
          "duration_minutes": {
            "type": "integer"
          },
          "price_usd": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested"
            ]
          },
          "next_step": {
            "type": "string"
          }
        }
      }
    }
  }
}