{
    "openapi": "3.1.0",
    "info": {
        "title": "Camp Bursztynowy Las – availability API",
        "version": "1.0.0",
        "description": "Live availability and prices for Camp Bursztynowy Las, a campsite with cabins, glamping safari tents and camping pitches in a pine forest next to the beach at Górki Zachodnie, Gdańsk, Poland. Read-only. Bookings are completed on the returned booking_url."
    },
    "servers": [
        {
            "url": "https://idomcp.hydron112.com"
        }
    ],
    "paths": {
        "/availability": {
            "get": {
                "operationId": "checkAvailability",
                "summary": "Available accommodation and total prices for given dates and guests",
                "description": "Returns accommodation types that are free for the whole stay and fit the group, with total stay price (non-refundable and refundable rate) and a booking link with dates prefilled. If nothing is available, `reason` explains why (min_stay, unavailable, too_many_guests) and `suggestions` lists nearby dates that work. `message` is a ready-to-use one-sentence summary in the requested language. Minimum stay is 2 nights (3 in July–August and on long weekends); the season runs roughly May to mid-September.",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Arrival date (YYYY-MM-DD)."
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Departure date (YYYY-MM-DD)."
                    },
                    {
                        "name": "adults",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 2
                        },
                        "description": "Adults and teenagers aged 16+."
                    },
                    {
                        "name": "children",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                        },
                        "description": "Children aged 6–15. Paid; each takes a place in the unit."
                    },
                    {
                        "name": "small_children",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                        },
                        "description": "Children aged 0–5. Free; they do not take a place, but at most as many as the unit capacity."
                    },
                    {
                        "name": "lang",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pl",
                                "en",
                                "de"
                            ],
                            "default": "en"
                        },
                        "description": "Language of names, descriptions and the message."
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "html",
                                "md"
                            ],
                            "default": "json"
                        }
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-z0-9_-]{1,40}$"
                        },
                        "description": "Optional name of the calling app (e.g. quickchat, my_gpt), used to attribute bookings."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Availability result",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Availability"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input (message explains)"
                    },
                    "502": {
                        "description": "Booking system temporarily unavailable"
                    }
                }
            }
        },
        "/accommodations": {
            "get": {
                "operationId": "listAccommodations",
                "summary": "All accommodation types with description, capacity, size, photos and starting price per night",
                "parameters": [
                    {
                        "name": "lang",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pl",
                                "en",
                                "de"
                            ],
                            "default": "en"
                        },
                        "description": "Language of names, descriptions and the message."
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "html",
                                "md"
                            ],
                            "default": "json"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Accommodation catalog"
                    }
                }
            }
        },
        "/weather": {
            "get": {
                "operationId": "weatherForecast",
                "summary": "Daily weather forecast at the camp for about the next 9 days",
                "description": "One entry per day (`days`, first = today) with a description, min/max °C, precipitation (mm, chance %) and wind (km/h). Each day has its weekday, a relative label (today/tomorrow/day after tomorrow) and `is_weekend`. `weekend` is the coming Saturday–Sunday (on Sundays: the following one) with `friday_afternoon` (Friday from noon, when guests usually arrive), `next_weekend` the one after, if forecast. Source: MET Norway (yr.no), CC BY 4.0.",
                "parameters": [
                    {
                        "name": "lang",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pl",
                                "en",
                                "de"
                            ],
                            "default": "en"
                        },
                        "description": "Language of names, descriptions and the message."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Forecast"
                    },
                    "502": {
                        "description": "Forecast temporarily unavailable"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Availability": {
                "type": "object",
                "properties": {
                    "available": {
                        "type": "boolean"
                    },
                    "message": {
                        "type": "string",
                        "description": "Human-readable summary to show the guest."
                    },
                    "reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            null,
                            "min_stay",
                            "unavailable",
                            "too_many_guests"
                        ]
                    },
                    "min_nights": {
                        "type": "integer"
                    },
                    "booking_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Checkout with all matching options preselected."
                    },
                    "results": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "category": {
                                    "type": "string",
                                    "enum": [
                                        "amber_cabin",
                                        "safari_tent",
                                        "classic_cabin",
                                        "camping_pitch",
                                        "camper_pitch"
                                    ]
                                },
                                "capacity": {
                                    "type": "integer"
                                },
                                "area_m2": {
                                    "type": [
                                        "number",
                                        "null"
                                    ]
                                },
                                "price": {
                                    "type": "object",
                                    "properties": {
                                        "total": {
                                            "type": "number",
                                            "description": "Lowest total for the whole stay (PLN)."
                                        },
                                        "per_night": {
                                            "type": "number"
                                        },
                                        "nonrefundable_total": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "refundable_total": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "currency": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "image": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "booking_url": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "contact_only": {
                        "type": "array",
                        "description": "Camping and camper pitches: not bookable online, availability not checked here. Tell the guest to book by phone or email (how_to_book).",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "category": {
                                    "type": "string"
                                },
                                "from_price_per_night": {
                                    "type": [
                                        "number",
                                        "null"
                                    ]
                                },
                                "how_to_book": {
                                    "type": "string"
                                },
                                "phone": {
                                    "type": "string"
                                },
                                "email": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "suggestions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "from": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "to": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "nights": {
                                    "type": "integer"
                                },
                                "available_types": {
                                    "type": "integer"
                                },
                                "lowest_price": {
                                    "type": "number"
                                },
                                "url": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}