{
  "openapi": "3.1.0",
  "info": {
    "title": "Palm Beach Warehouses listings and tour-request API",
    "version": "1.1.0",
    "description": "Read-only search over the warehouse, industrial and flex space currently listed on palmbeachwarehouses.com, plus a tour-request action for AI assistants. Rows mirror the verified LoopNet company page (LoopNet is the source of truth). Tour requests are tagged source=ai-agent, go to Zachary Vorsteg through the existing inquiry inbox, and do not fire Meta or Google Ads conversions or count toward the homepage form test. Zach confirms tours by phone or email; this is not instant booking.",
    "contact": {
      "name": "Zachary Vorsteg, Florida real estate sales associate (SL3603483), Cornerstone Realty",
      "url": "https://palmbeachwarehouses.com/facts/"
    }
  },
  "servers": [
    {
      "url": "https://palmbeachwarehouses.com"
    }
  ],
  "paths": {
    "/api/listings": {
      "get": {
        "operationId": "searchListings",
        "summary": "Search available warehouse, industrial and flex listings",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact city name, e.g. West Palm Beach, Lantana, Fort Lauderdale"
          },
          {
            "name": "min_sf",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Minimum available square feet"
          },
          {
            "name": "max_sf",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Maximum available square feet"
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "description": "Free-text match on address, city, use and space note"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching listings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid number parameter"
          },
          "503": {
            "description": "Listing feed temporarily held (complete=false); use the homepage listings"
          }
        }
      }
    },
    "/data/listings.json": {
      "get": {
        "operationId": "getAllListings",
        "summary": "Full current listings document (JSON + schema.org ItemList)",
        "responses": {
          "200": {
            "description": "Listings document"
          }
        }
      }
    },
    "/api/tour-request": {
      "get": {
        "operationId": "tourRequestContract",
        "summary": "Describe the tour-request contract (no write)",
        "responses": {
          "200": {
            "description": "JSON contract for POST /api/tour-request"
          }
        }
      },
      "post": {
        "operationId": "requestTour",
        "summary": "Request a tour of a listed space on a person's behalf",
        "description": "Requires the person's explicit consent (principal_consent: true). Delivered to Zachary Vorsteg tagged source=ai-agent. Does not fire advertising conversions. Not an instant booking.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TourRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request received (or honeypot skip / sandbox). Body includes success and a confirmation message; no capi or eventId fields."
          },
          "400": {
            "description": "Validation error (missing consent, unknown listing_id, example.com address, etc.)"
          },
          "413": {
            "description": "Body larger than 8 KB"
          },
          "415": {
            "description": "Content-Type must be application/json"
          },
          "429": {
            "description": "Per-IP or per-email rate limit"
          },
          "502": {
            "description": "Inquiry inbox temporarily unavailable"
          },
          "503": {
            "description": "Listing feed or rate-limit store temporarily unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Listing": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "availableSfMin": {
            "type": [
              "number",
              "null"
            ]
          },
          "availableSfMax": {
            "type": [
              "number",
              "null"
            ]
          },
          "askingRate": {
            "type": [
              "string",
              "null"
            ],
            "description": "As shown on LoopNet, e.g. $19.50/SF/YR or Call for Pricing"
          },
          "use": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "spaceNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "photo": {
            "type": [
              "string",
              "null"
            ]
          },
          "propertyPage": {
            "type": [
              "string",
              "null"
            ]
          },
          "loopnetUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "complete": {
            "type": "boolean"
          },
          "verifiedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "listings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Listing"
            }
          },
          "howToInquire": {
            "type": [
              "object",
              "null"
            ]
          }
        }
      },
      "TourRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "listing_id",
          "preferred_dates",
          "agent_name",
          "principal_consent"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Required if phone is omitted. example.com addresses are rejected outside sandbox."
          },
          "phone": {
            "type": "string",
            "description": "Required if email is omitted."
          },
          "listing_id": {
            "type": "string",
            "description": "Must match an active id from /data/listings.json (e.g. pbw-15)."
          },
          "preferred_dates": {
            "type": "string",
            "maxLength": 500
          },
          "agent_name": {
            "type": "string",
            "maxLength": 200,
            "description": "Which assistant is making the request, e.g. ChatGPT, Claude, Perplexity."
          },
          "principal_consent": {
            "type": "boolean",
            "description": "Must be the boolean true. The person must have explicitly agreed."
          },
          "company": {
            "type": "string",
            "maxLength": 200
          },
          "notes": {
            "type": "string",
            "maxLength": 1000
          },
          "website": {
            "type": "string",
            "description": "Honeypot; leave empty."
          },
          "sandbox": {
            "type": "boolean",
            "description": "When true and the server has sandbox mode enabled, no inquiry is stored."
          }
        }
      }
    }
  }
}
