{
  "openapi": "3.0.3",
  "info": {
    "title": "Reno Map Pros Agent Booking API",
    "version": "0.1.0",
    "description": "Draft OpenAPI for agent booking. Today: use GET /api/offer.json and the human /book form (FormSubmit + Netlify Forms mirror). POST /api/leads is reserved. Calendar events for Online/In-person consults are created by a Grok Bot email-routine (status: email-routine). Contact phone: (916) 494-8868."
  },
  "servers": [
    {
      "url": "https://renomappros.com"
    }
  ],
  "paths": {
    "/api/offer.json": {
      "get": {
        "operationId": "getOffer",
        "summary": "Get business offer catalog and booking contract",
        "responses": {
          "200": {
            "description": "Offer catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads": {
      "post": {
        "operationId": "createLead",
        "summary": "Submit a booking lead (PLANNED \u2014 not live yet)",
        "description": "Reserved. Until live, use /book (FormSubmit) or call. Calendar events are created by the email-routine Grok Bot from FormSubmit lead emails.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadRequest"
              }
            }
          }
        },
        "responses": {
          "501": {
            "description": "Not implemented yet \u2014 use /book or phone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotImplemented"
                }
              }
            }
          }
        }
      }
    },
    "/book": {
      "get": {
        "operationId": "getBookPage",
        "summary": "Human booking page (supports query prefill)",
        "parameters": [
          {
            "name": "trade",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "package",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meeting",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Online",
                "In-person"
              ]
            }
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "email"
            }
          },
          {
            "name": "business",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "preferred_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "preferred_time",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML booking page"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "LeadRequest": {
        "type": "object",
        "required": [
          "name",
          "phone",
          "business",
          "trade",
          "city",
          "meeting_preference"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Optional; used as Calendar guest"
          },
          "business": {
            "type": "string"
          },
          "trade": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "package": {
            "type": "string"
          },
          "meeting_preference": {
            "type": "string",
            "enum": [
              "Online",
              "In-person"
            ]
          },
          "preferred_date": {
            "type": "string",
            "format": "date"
          },
          "preferred_time": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "NotImplemented": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "humanUrl": {
            "type": "string",
            "example": "/book"
          },
          "phone": {
            "type": "string",
            "example": "(916) 494-8868"
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "llms.txt",
    "url": "https://renomappros.com/llms.txt"
  }
}
