{
  "openapi": "3.1.0",
  "info": {
    "title": "Chris Brown Homes Public API",
    "version": "2.1.0",
    "summary": "Public read-only company, available-home, floor-plan, community, and API-discovery data.",
    "description": "Public read-only REST API for Chris Brown Homes. The API provides machine-readable information about the company, published available homes, floor plans, featured communities, communities where Chris Brown Homes builds, and API discovery resources. Pricing, availability, lot status, construction status, and other time-sensitive information should be confirmed using the live website or directly with Chris Brown Homes.",
    "termsOfService": "https://chrisbrownhomes.com/ai/",
    "contact": {
      "name": "Chris Brown Homes",
      "url": "https://chrisbrownhomes.com/contact-us/",
      "email": "Chris@ChrisBrownHomes.com"
    }
  },
  "servers": [
    {
      "url": "https://chrisbrownhomes.com",
      "description": "Chris Brown Homes production website"
    }
  ],
  "externalDocs": {
    "description": "Chris Brown Homes AI and API documentation",
    "url": "https://chrisbrownhomes.com/ai/"
  },
  "tags": [
    {
      "name": "Company",
      "description": "Company, contact, address, and service-area information."
    },
    {
      "name": "Available Homes",
      "description": "Published available-home listings and individual available-home records."
    },
    {
      "name": "Floor Plans",
      "description": "Published Chris Brown Homes floor-plan designs and individual floor-plan records."
    },
    {
      "name": "Communities",
      "description": "Published featured-community records and other communities where Chris Brown Homes builds."
    },
    {
      "name": "Discovery",
      "description": "Public API discovery and catalog resources."
    }
  ],
  "paths": {
    "/wp-json/cbh-ai/v1/company": {
      "get": {
        "operationId": "getCompany",
        "summary": "Get company information",
        "description": "Returns machine-readable company, contact, address, and service-area information for Chris Brown Homes.",
        "tags": [
          "Company"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Company information returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          }
        }
      }
    },
    "/wp-json/cbh-ai/v1/available-homes": {
      "get": {
        "operationId": "listAvailableHomes",
        "summary": "List available homes",
        "description": "Returns published available-home listings. Results may be filtered by maximum price, minimum bedroom count, or property status.",
        "tags": [
          "Available Homes"
        ],
        "security": [],
        "parameters": [
          {
            "name": "max_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Maximum numeric listing price in U.S. dollars."
          },
          {
            "name": "min_beds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Minimum bedroom count."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Published property-status term. The comparison is case-insensitive."
          }
        ],
        "responses": {
          "200": {
            "description": "Available-home feed returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableHomesFeed"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/wp-json/cbh-ai/v1/available-homes/{slug}": {
      "get": {
        "operationId": "getAvailableHome",
        "summary": "Get one available home",
        "description": "Returns one published available-home record identified by its WordPress slug.",
        "tags": [
          "Available Homes"
        ],
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/Slug"
          }
        ],
        "responses": {
          "200": {
            "description": "Available-home record returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableHome"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/wp-json/cbh-ai/v1/floorplans": {
      "get": {
        "operationId": "listFloorPlans",
        "summary": "List floor plans",
        "description": "Returns published Chris Brown Homes floor-plan designs. Results may be filtered using a WordPress text search.",
        "tags": [
          "Floor Plans"
        ],
        "security": [],
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "WordPress text search applied to published floor-plan records."
          }
        ],
        "responses": {
          "200": {
            "description": "Floor-plan feed returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FloorPlansFeed"
                }
              }
            }
          }
        }
      }
    },
    "/wp-json/cbh-ai/v1/floorplans/{slug}": {
      "get": {
        "operationId": "getFloorPlan",
        "summary": "Get one floor plan",
        "description": "Returns one published floor-plan record identified by its WordPress slug.",
        "tags": [
          "Floor Plans"
        ],
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/Slug"
          }
        ],
        "responses": {
          "200": {
            "description": "Floor-plan record returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FloorPlan"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/wp-json/cbh-ai/v1/communities": {
      "get": {
        "operationId": "listCommunities",
        "summary": "List communities",
        "description": "Returns published featured-community records and communities where Chris Brown Homes builds.",
        "tags": [
          "Communities"
        ],
        "security": [],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "featured_community",
                "community_we_build_in"
              ]
            },
            "description": "Filters results by community record type. Use featured_community for featured communities or community_we_build_in for other communities where Chris Brown Homes builds."
          }
        ],
        "responses": {
          "200": {
            "description": "Community feed returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunitiesFeed"
                }
              }
            }
          }
        }
      }
    },
    "/wp-json/cbh-ai/v1/communities/{slug}": {
      "get": {
        "operationId": "getCommunity",
        "summary": "Get one community",
        "description": "Returns one published featured-community or community-we-build-in record identified by its WordPress slug.",
        "tags": [
          "Communities"
        ],
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/Slug"
          }
        ],
        "responses": {
          "200": {
            "description": "Community record returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Community"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/wp-json/cbh-ai/v1/api-catalog": {
      "get": {
        "operationId": "getApiCatalog",
        "summary": "Get the generated API catalog",
        "description": "Returns a generated catalog of Chris Brown Homes public endpoints and machine-readable discovery resources.",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "API catalog returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCatalog"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "Slug": {
        "name": "slug",
        "in": "path",
        "required": true,
        "description": "WordPress post slug for the requested record.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9-]+$"
        }
      }
    },
    "responses": {
      "NotFound": {
        "description": "The requested record was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The Houzez property post type is temporarily unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "FeedEnvelope": {
        "type": "object",
        "required": [
          "name",
          "description",
          "website",
          "generated_at",
          "total",
          "items"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {}
          }
        },
        "additionalProperties": true
      },
      "MediaItem": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "alt": {
            "type": [
              "string",
              "null"
            ]
          },
          "caption": {
            "type": [
              "string",
              "null"
            ]
          },
          "width": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          }
        },
        "additionalProperties": true
      },
      "Company": {
        "type": "object",
        "properties": {
          "@context": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "telephone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "address": {
            "$ref": "#/components/schemas/PostalAddress"
          },
          "areaServed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "PostalAddress": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          },
          "streetAddress": {
            "type": "string"
          },
          "addressLocality": {
            "type": "string"
          },
          "addressRegion": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "addressCountry": {
            "$ref": "#/components/schemas/Country"
          }
        },
        "additionalProperties": true
      },
      "AvailableHomesFeed": {
        "allOf": [
          {
            "$ref": "#/components/schemas/FeedEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AvailableHome"
                }
              }
            }
          }
        ]
      },
      "AvailableHome": {
        "type": "object",
        "properties": {
          "@context": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "main_image": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MediaItem"
              },
              {
                "type": "null"
              }
            ]
          },
          "gallery": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaItem"
            }
          },
          "price_usd": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "price_display": {
            "type": [
              "string",
              "null"
            ]
          },
          "bedrooms": {
            "type": [
              "string",
              "null"
            ]
          },
          "bathrooms": {
            "type": [
              "string",
              "null"
            ]
          },
          "garage_spaces": {
            "type": [
              "string",
              "null"
            ]
          },
          "square_feet": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "property_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "year_built": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "virtual_tour_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "property_type": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "community": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mortgage_calculator_url": {
            "type": "string",
            "format": "uri"
          },
          "date_published": {
            "type": "string",
            "format": "date-time"
          },
          "date_modified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "FloorPlansFeed": {
        "allOf": [
          {
            "$ref": "#/components/schemas/FeedEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FloorPlan"
                }
              }
            }
          }
        ]
      },
      "FloorPlan": {
        "type": "object",
        "properties": {
          "@context": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "main_image": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MediaItem"
              },
              {
                "type": "null"
              }
            ]
          },
          "bedrooms": {
            "type": [
              "string",
              "null"
            ]
          },
          "bathrooms": {
            "type": [
              "string",
              "null"
            ]
          },
          "stories": {
            "type": [
              "string",
              "null"
            ]
          },
          "garage_spaces": {
            "type": [
              "string",
              "null"
            ]
          },
          "square_feet": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "matterport_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "floorplan_gallery": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaItem"
            }
          },
          "interior_exterior_gallery": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaItem"
            }
          },
          "mortgage_calculator_url": {
            "type": "string",
            "format": "uri"
          },
          "date_published": {
            "type": "string",
            "format": "date-time"
          },
          "date_modified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "CommunitiesFeed": {
        "allOf": [
          {
            "$ref": "#/components/schemas/FeedEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Community"
                }
              }
            }
          }
        ]
      },
      "Community": {
        "type": "object",
        "properties": {
          "@context": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "community_type": {
            "type": "string",
            "enum": [
              "featured_community",
              "community_we_build_in"
            ]
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "image": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MediaItem"
              },
              {
                "type": "null"
              }
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_modified": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "street": {
            "type": [
              "string",
              "null"
            ]
          },
          "specific_location": {
            "type": [
              "string",
              "null"
            ]
          },
          "lot_map": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LotMap"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true
      },
      "LotMap": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "data_type": {
            "type": "string"
          },
          "availability_note": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "ApiCatalog": {
        "type": "object",
        "additionalProperties": true
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "Country": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string",
            "example": "Country"
          },
          "name": {
            "type": "string",
            "example": "US"
          }
        },
        "additionalProperties": true
      }
    }
  }
}