{
  "openapi": "3.1.0",
  "info": {
    "title": "Villa Verde Miami booking API",
    "version": "1.0.0",
    "description": "Read-only interface for AI assistants and software. List the three Villa Verde Miami rentals in Little Havana, Miami, check dates, get an exact price and create a 30-minute quote. This API cannot book or take payment: the guest completes booking on villaverdemiami.com using book_url from a quote. Public, no key. Rate limited (HTTP 429). Please send X-Agent-Name.",
    "contact": {
      "name": "Villa Verde Miami",
      "url": "https://villaverdemiami.com/contact"
    },
    "license": {
      "name": "Proprietary. Use for assisting guests of Villa Verde Miami."
    }
  },
  "servers": [
    {
      "url": "https://villaverdemiami.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "stays",
      "description": "Find, check and price Villa Verde Miami stays."
    }
  ],
  "paths": {
    "/properties": {
      "get": {
        "operationId": "listProperties",
        "summary": "List the live rentals with facts (no prices or dates)",
        "tags": [
          "stays"
        ],
        "parameters": [
          {
            "name": "X-Agent-Name",
            "in": "header",
            "required": false,
            "description": "Name of your agent or client (recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "X-On-Behalf-Of",
            "in": "header",
            "required": false,
            "description": "Person or organisation you act for (optional, recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PropertyList"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/availability": {
      "get": {
        "operationId": "checkAvailability",
        "summary": "Are these dates open? Answer is available or not only.",
        "tags": [
          "stays"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "villa-verde",
                "guesthouse",
                "private-suite"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Check-in date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "Check-out date (exclusive); at most 90 nights",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "X-Agent-Name",
            "in": "header",
            "required": false,
            "description": "Name of your agent or client (recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "X-On-Behalf-Of",
            "in": "header",
            "required": false,
            "description": "Person or organisation you act for (optional, recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/price": {
      "get": {
        "operationId": "getPrice",
        "summary": "Exact price in cents for a stay (same engine as checkout). Nothing is reserved.",
        "tags": [
          "stays"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "villa-verde",
                "guesthouse",
                "private-suite"
              ]
            }
          },
          {
            "name": "checkIn",
            "in": "query",
            "required": true,
            "description": "Check-in date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "checkOut",
            "in": "query",
            "required": true,
            "description": "Check-out date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "guests",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            }
          },
          {
            "name": "X-Agent-Name",
            "in": "header",
            "required": false,
            "description": "Name of your agent or client (recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "X-On-Behalf-Of",
            "in": "header",
            "required": false,
            "description": "Person or organisation you act for (optional, recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quote": {
      "post": {
        "operationId": "createQuote",
        "summary": "Create a 30-minute quote and a book_url the guest opens to complete booking",
        "tags": [
          "stays"
        ],
        "parameters": [
          {
            "name": "X-Agent-Name",
            "in": "header",
            "required": false,
            "description": "Name of your agent or client (recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "X-On-Behalf-Of",
            "in": "header",
            "required": false,
            "description": "Person or organisation you act for (optional, recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/policies": {
      "get": {
        "operationId": "getPolicies",
        "summary": "Cancellation policy, house rules, check-in and check-out times",
        "tags": [
          "stays"
        ],
        "parameters": [
          {
            "name": "X-Agent-Name",
            "in": "header",
            "required": false,
            "description": "Name of your agent or client (recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "X-On-Behalf-Of",
            "in": "header",
            "required": false,
            "description": "Person or organisation you act for (optional, recorded on quotes).",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Policies"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "examples": [
                  "MIN_STAY",
                  "INVALID_DATE",
                  "RATE_LIMITED"
                ]
              },
              "message": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      },
      "Property": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "url",
          "bedrooms",
          "bathrooms",
          "max_guests",
          "location"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "bedrooms": {
            "type": "integer",
            "description": "0 means studio"
          },
          "bathrooms": {
            "type": "number"
          },
          "beds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "max_guests": {
            "type": "integer"
          },
          "summary": {
            "type": "string"
          },
          "tagline": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "location": {
            "type": "object",
            "properties": {
              "neighborhood": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "check_in_time": {
            "type": "string"
          },
          "check_out_time": {
            "type": "string"
          },
          "amenities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "house_rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "rating": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "average": {
                "type": "number"
              },
              "count": {
                "type": "integer"
              },
              "scale": {
                "type": "integer"
              },
              "source": {
                "type": "string"
              }
            }
          },
          "booking": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "PropertyList": {
        "type": "object",
        "required": [
          "count",
          "properties"
        ],
        "properties": {
          "business": {
            "type": "object",
            "additionalProperties": true
          },
          "count": {
            "type": "integer"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Property"
            }
          },
          "note": {
            "type": "string"
          }
        }
      },
      "Availability": {
        "type": "object",
        "required": [
          "slug",
          "check_in",
          "check_out",
          "nights",
          "available",
          "per_night"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "nights": {
            "type": "integer"
          },
          "available": {
            "type": "boolean"
          },
          "restriction": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "minimum_stay",
              null
            ]
          },
          "minimum_stay_nights": {
            "type": [
              "integer",
              "null"
            ]
          },
          "per_night": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "date",
                "available"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "available": {
                  "type": "boolean"
                }
              }
            }
          },
          "note": {
            "type": "string"
          }
        }
      },
      "Breakdown": {
        "type": "object",
        "required": [
          "nightly",
          "subtotal_cents",
          "cleaning_fee_cents",
          "service_fee_cents",
          "taxes_cents",
          "total_cents"
        ],
        "properties": {
          "nightly": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "date",
                "rate_cents"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "rate_cents": {
                  "type": "integer",
                  "description": "US cents"
                }
              }
            }
          },
          "subtotal_cents": {
            "type": "integer",
            "description": "US cents"
          },
          "discount_cents": {
            "type": "integer",
            "description": "US cents"
          },
          "cleaning_fee_cents": {
            "type": "integer",
            "description": "US cents"
          },
          "service_fee_cents": {
            "type": "integer",
            "description": "US cents"
          },
          "taxes_cents": {
            "type": "integer",
            "description": "US cents"
          },
          "total_cents": {
            "type": "integer",
            "description": "US cents"
          },
          "avg_nightly_rate_cents": {
            "type": "integer",
            "description": "US cents"
          }
        }
      },
      "Price": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Breakdown"
          },
          {
            "type": "object",
            "required": [
              "slug",
              "check_in",
              "check_out",
              "nights",
              "guests",
              "currency"
            ],
            "properties": {
              "slug": {
                "type": "string"
              },
              "check_in": {
                "type": "string",
                "format": "date"
              },
              "check_out": {
                "type": "string",
                "format": "date"
              },
              "nights": {
                "type": "integer"
              },
              "guests": {
                "type": "integer"
              },
              "currency": {
                "type": "string",
                "const": "USD"
              },
              "available": {
                "type": "boolean"
              },
              "note": {
                "type": "string"
              }
            }
          }
        ]
      },
      "QuoteRequest": {
        "type": "object",
        "required": [
          "slug",
          "checkIn",
          "checkOut",
          "guests"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "enum": [
              "villa-verde",
              "guesthouse",
              "private-suite"
            ]
          },
          "checkIn": {
            "type": "string",
            "format": "date"
          },
          "checkOut": {
            "type": "string",
            "format": "date"
          },
          "guests": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          },
          "promoCode": {
            "type": "string"
          }
        }
      },
      "Quote": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Breakdown"
          },
          {
            "type": "object",
            "required": [
              "quote_id",
              "expires_at",
              "book_url",
              "currency"
            ],
            "properties": {
              "quote_id": {
                "type": "string",
                "format": "uuid"
              },
              "slug": {
                "type": "string"
              },
              "property_name": {
                "type": "string"
              },
              "check_in": {
                "type": "string",
                "format": "date"
              },
              "check_out": {
                "type": "string",
                "format": "date"
              },
              "nights": {
                "type": "integer"
              },
              "guests": {
                "type": "integer"
              },
              "currency": {
                "type": "string",
                "const": "USD"
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "book_url": {
                "type": "string",
                "format": "uri",
                "description": "Open in a browser to complete booking and payment on villaverdemiami.com. The price is re-checked there."
              },
              "note": {
                "type": "string"
              }
            }
          }
        ]
      },
      "Policies": {
        "type": "object",
        "properties": {
          "cancellation": {
            "type": "object",
            "properties": {
              "structured": {
                "type": "boolean",
                "description": "false: human wording only, no machine-readable refund rules yet"
              },
              "title": {
                "type": "string"
              },
              "updated": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "text": {
                "type": "string"
              }
            }
          },
          "house_rules": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "per_property": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "contact": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    }
  },
  "security": []
}
