{
 "openapi": "3.1.0",
 "info": {
  "title": "RoomPop furniture search",
  "version": "0.1.0",
  "description": "Furniture at real retail sizes, ready-made rooms and space-planning rules from RoomPop. Public, read-only, no key. The same as the MCP server at /mcp.",
  "contact": {
   "email": "hello@roompop.app",
   "url": "https://roompop.app/agents"
  }
 },
 "servers": [
  {
   "url": "https://my.roompop.app"
  }
 ],
 "paths": {
  "/api/catalog/search": {
   "get": {
    "operationId": "searchFurniture",
    "summary": "Search furniture",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "schema": {
       "type": "string",
       "maxLength": 200
      },
      "description": "Words to find"
     },
     {
      "name": "kind",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "Sofas",
        "Chairs and seating",
        "Tables",
        "Storage",
        "Lighting",
        "Plants",
        "Kitchen",
        "Appliances",
        "Rugs",
        "TVs",
        "Beds",
        "Desks and office",
        "Kids and baby",
        "Fitness"
       ]
      }
     },
     {
      "name": "room",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "living",
        "dining",
        "kitchen",
        "bedroom",
        "office",
        "kids",
        "nursery"
       ]
      }
     },
     {
      "name": "max_width_in",
      "in": "query",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "max_depth_in",
      "in": "query",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 25,
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Pieces, best first",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "total": {
           "type": "integer"
          },
          "pieces": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Piece"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/catalog/pieces/{id}": {
   "get": {
    "operationId": "getFurniture",
    "summary": "One piece, by its id or a size's id",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The piece",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Piece"
        }
       }
      }
     },
     "404": {
      "description": "No such piece"
     }
    }
   }
  },
  "/api/catalog/rooms": {
   "get": {
    "operationId": "listReadyRooms",
    "summary": "Ready-made rooms, their sizes and furniture",
    "responses": {
     "200": {
      "description": "Rooms",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/catalog/rules": {
   "get": {
    "operationId": "clearanceRules",
    "summary": "The space-planning rules RoomPop checks",
    "responses": {
     "200": {
      "description": "Rules",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Size": {
    "type": "object",
    "required": [
     "id",
     "label",
     "widthIn",
     "depthIn",
     "heightIn",
     "widthCm",
     "depthCm",
     "heightCm"
    ],
    "properties": {
     "id": {
      "type": "string"
     },
     "label": {
      "type": "string"
     },
     "widthIn": {
      "type": "number",
      "description": "inches"
     },
     "depthIn": {
      "type": "number",
      "description": "inches"
     },
     "heightIn": {
      "type": "number",
      "description": "inches"
     },
     "widthCm": {
      "type": "number",
      "description": "cm"
     },
     "depthCm": {
      "type": "number",
      "description": "cm"
     },
     "heightCm": {
      "type": "number",
      "description": "cm"
     },
     "seatHeightIn": {
      "type": "number",
      "description": "inches"
     }
    }
   },
   "Piece": {
    "type": "object",
    "required": [
     "id",
     "name",
     "kind",
     "rooms",
     "sizes"
    ],
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "kind": {
      "type": "string"
     },
     "style": {
      "type": "string"
     },
     "rooms": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "sizes": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Size"
      }
     },
     "reference": {
      "type": "object",
      "properties": {
       "product": {
        "type": "string"
       },
       "follows": {
        "type": "string"
       },
       "source": {
        "type": "string"
       },
       "published": {
        "type": "string"
       },
       "notes": {
        "type": "object"
       }
      }
     },
     "tags": {
      "type": "string"
     }
    }
   }
  }
 }
}