{
    "openapi": "3.1.0",
    "info": {
        "title": "EL-HYDRO API – informacje i cennik",
        "version": "1.4.0",
        "description": "Bezpłatny odczyt publicznych danych firmy. Ceny minimalne nie są cenami końcowymi. Brak rezerwacji i płatności."
    },
    "servers": [
        {
            "url": "https://www.hydraulika.zgora.pl/wp-content/uploads/el-hydro-dla-agentow"
        }
    ],
    "paths": {
        "/informacje.json": {
            "get": {
                "operationId": "pobierzInformacjeELHYDRO",
                "summary": "Pełny profil i szczegółowy cennik",
                "responses": {
                    "200": {
                        "description": "Aktualne publiczne dane EL-HYDRO.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Informacje"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/cennik.json": {
            "get": {
                "operationId": "pobierzCennikELHYDRO",
                "summary": "Zwięzły cennik usług i koszty dojazdu",
                "responses": {
                    "200": {
                        "description": "Aktualne publiczne dane EL-HYDRO.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Cennik"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/prices": {
            "servers": [
                {
                    "url": "https://www.hydraulika.zgora.pl/wp-json/elh-agent/v1"
                }
            ],
            "get": {
                "operationId": "elhAgentV1Prices",
                "summary": "Pobierz zwięzły cennik",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Dane publiczne z ostatniej publikacji.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Cennik"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Przekroczono wspólny limit 120 zapytań na minutę.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Liczba sekund do ponowienia."
                            }
                        }
                    },
                    "503": {
                        "description": "Dane lub API chwilowo niedostępne.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/search": {
            "servers": [
                {
                    "url": "https://www.hydraulika.zgora.pl/wp-json/elh-agent/v1"
                }
            ],
            "get": {
                "operationId": "elhAgentV1Search",
                "summary": "Wyszukaj pozycję cennika",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Dane publiczne z ostatniej publikacji.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Wyniki"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Przekroczono wspólny limit 120 zapytań na minutę.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Liczba sekund do ponowienia."
                            }
                        }
                    },
                    "503": {
                        "description": "Dane lub API chwilowo niedostępne.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Nieprawidłowe parametry wyszukiwania.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "description": "Słowa wyszukiwania: co najmniej jedna litera lub cyfra rozpoznawana przez wyszukiwarkę, maks. 120 bajtów UTF-8. maxLength ogranicza liczbę znaków, dodatkowy limit bajtów sprawdza serwer.",
                        "schema": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                        },
                        "example": "wodomierz"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 30,
                            "default": 10
                        }
                    }
                ]
            }
        },
        "/travel": {
            "servers": [
                {
                    "url": "https://www.hydraulika.zgora.pl/wp-json/elh-agent/v1"
                }
            ],
            "get": {
                "operationId": "elhAgentV1Travel",
                "summary": "Pobierz koszty dojazdu",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Dane publiczne z ostatniej publikacji.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/KosztyDojazdu"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Przekroczono wspólny limit 120 zapytań na minutę.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Liczba sekund do ponowienia."
                            }
                        }
                    },
                    "503": {
                        "description": "Dane lub API chwilowo niedostępne.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/hours": {
            "servers": [
                {
                    "url": "https://www.hydraulika.zgora.pl/wp-json/elh-agent/v1"
                }
            ],
            "get": {
                "operationId": "elhAgentV1Hours",
                "summary": "Pobierz godziny pracy",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Dane publiczne z ostatniej publikacji.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Godziny"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Przekroczono wspólny limit 120 zapytań na minutę.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Liczba sekund do ponowienia."
                            }
                        }
                    },
                    "503": {
                        "description": "Dane lub API chwilowo niedostępne.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/company": {
            "servers": [
                {
                    "url": "https://www.hydraulika.zgora.pl/wp-json/elh-agent/v1"
                }
            ],
            "get": {
                "operationId": "elhAgentV1Company",
                "summary": "Pobierz dane firmy i kontakt",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Dane publiczne z ostatniej publikacji.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Firma"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Przekroczono wspólny limit 120 zapytań na minutę.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Liczba sekund do ponowienia."
                            }
                        }
                    },
                    "503": {
                        "description": "Dane lub API chwilowo niedostępne.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/services": {
            "servers": [
                {
                    "url": "https://www.hydraulika.zgora.pl/wp-json/elh-agent/v1"
                }
            ],
            "get": {
                "operationId": "elhAgentV1Services",
                "summary": "Pobierz zakres usług",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Dane publiczne z ostatniej publikacji.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Oferta"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Przekroczono wspólny limit 120 zapytań na minutę.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Liczba sekund do ponowienia."
                            }
                        }
                    },
                    "503": {
                        "description": "Dane lub API chwilowo niedostępne.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/health": {
            "servers": [
                {
                    "url": "https://www.hydraulika.zgora.pl/wp-json/elh-agent/v1"
                }
            ],
            "get": {
                "operationId": "elhAgentV1Health",
                "summary": "Sprawdź dostępność zestawów danych",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Dane publiczne z ostatniej publikacji.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Stan"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Przekroczono wspólny limit 120 zapytań na minutę.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Liczba sekund do ponowienia."
                            }
                        }
                    },
                    "503": {
                        "description": "Dane lub API chwilowo niedostępne.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Blad"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Cena": {
                "type": "object",
                "required": [
                    "tekst",
                    "jednostka",
                    "rodzaj"
                ],
                "properties": {
                    "tekst": {
                        "type": "string"
                    },
                    "jednostka": {
                        "type": "string"
                    },
                    "rodzaj": {
                        "type": "string",
                        "enum": [
                            "stała",
                            "od",
                            "przedział",
                            "wycena indywidualna",
                            "po oględzinach",
                            "brak kwoty"
                        ]
                    },
                    "waluta": {
                        "type": "string",
                        "enum": [
                            "PLN"
                        ]
                    },
                    "kwota": {
                        "type": "number",
                        "minimum": 0
                    },
                    "od": {
                        "type": "number",
                        "minimum": 0
                    },
                    "do": {
                        "type": "number",
                        "minimum": 0
                    },
                    "podatek": {
                        "type": "string",
                        "enum": [
                            "netto",
                            "brutto"
                        ]
                    }
                }
            },
            "Dojazd": {
                "type": "object",
                "required": [
                    "miejscowosc",
                    "kwota_pln"
                ],
                "properties": {
                    "miejscowosc": {
                        "type": "string"
                    },
                    "kwota_pln": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    }
                }
            },
            "Usluga": {
                "type": "object",
                "required": [
                    "usluga",
                    "kategoria",
                    "cena"
                ],
                "properties": {
                    "usluga": {
                        "type": "string"
                    },
                    "kategoria": {
                        "type": "string"
                    },
                    "cena": {
                        "$ref": "#/components/schemas/Cena"
                    },
                    "opis": {
                        "type": "string"
                    },
                    "strona_uslugi": {
                        "type": "string",
                        "format": "uri"
                    }
                }
            },
            "UslugaPelna": {
                "type": "object",
                "required": [
                    "usluga",
                    "kategoria",
                    "cena"
                ],
                "properties": {
                    "usluga": {
                        "type": "string"
                    },
                    "kategoria": {
                        "type": "string"
                    },
                    "cena": {
                        "$ref": "#/components/schemas/Cena"
                    },
                    "opis": {
                        "type": "string"
                    },
                    "strona_uslugi": {
                        "type": "string",
                        "format": "uri"
                    },
                    "szczegoly": {
                        "type": "string"
                    },
                    "obejmuje": {
                        "type": "string"
                    },
                    "nie_obejmuje": {
                        "type": "string"
                    },
                    "czynniki_ceny": {
                        "type": "string"
                    },
                    "rozliczenie": {
                        "type": "string"
                    },
                    "wycena": {
                        "type": "string"
                    },
                    "rozgraniczenie": {
                        "type": "string"
                    }
                }
            },
            "Cennik": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "status_cennika",
                    "zasady_wyceny",
                    "cennik_ogolny",
                    "cennik_szczegolowy",
                    "dojazd",
                    "inne_miejscowosci",
                    "pozycje_cennika"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "status_cennika": {
                        "type": "string",
                        "enum": [
                            "aktywny",
                            "niedostępny"
                        ]
                    },
                    "zasady_wyceny": {
                        "type": "string"
                    },
                    "cennik_ogolny": {
                        "type": "string",
                        "format": "uri"
                    },
                    "cennik_szczegolowy": {
                        "type": "string",
                        "format": "uri"
                    },
                    "dojazd": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Dojazd"
                        }
                    },
                    "inne_miejscowosci": {
                        "type": "string"
                    },
                    "pozycje_cennika": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Usluga"
                        }
                    }
                }
            },
            "Informacje": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "status_cennika",
                    "zasady_wyceny",
                    "cennik_ogolny",
                    "cennik_szczegolowy",
                    "dojazd",
                    "inne_miejscowosci",
                    "pozycje_cennika",
                    "firma",
                    "kontakt",
                    "godziny",
                    "awarie",
                    "oferta"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "status_cennika": {
                        "type": "string",
                        "enum": [
                            "aktywny",
                            "niedostępny"
                        ]
                    },
                    "zasady_wyceny": {
                        "type": "string"
                    },
                    "cennik_ogolny": {
                        "type": "string",
                        "format": "uri"
                    },
                    "cennik_szczegolowy": {
                        "type": "string",
                        "format": "uri"
                    },
                    "dojazd": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Dojazd"
                        }
                    },
                    "inne_miejscowosci": {
                        "type": "string"
                    },
                    "pozycje_cennika": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/UslugaPelna"
                        }
                    },
                    "firma": {
                        "type": "object"
                    },
                    "kontakt": {
                        "type": "object"
                    },
                    "godziny": {
                        "type": "object"
                    },
                    "awarie": {
                        "type": "string"
                    },
                    "oferta": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    }
                }
            },
            "Blad": {
                "type": "object",
                "required": [
                    "code",
                    "message",
                    "data"
                ],
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "status"
                        ],
                        "properties": {
                            "status": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "Wyniki": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "q",
                    "limit",
                    "zasady_wyceny",
                    "cennik_szczegolowy",
                    "liczba_dopasowan",
                    "wyniki"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "q": {
                        "type": "string"
                    },
                    "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                    },
                    "zasady_wyceny": {
                        "type": "string"
                    },
                    "cennik_szczegolowy": {
                        "type": "string"
                    },
                    "liczba_dopasowan": {
                        "type": "integer"
                    },
                    "wyniki": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Usluga"
                        }
                    }
                }
            },
            "KosztyDojazdu": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "dojazd",
                    "inne_miejscowosci"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "dojazd": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Dojazd"
                        }
                    },
                    "inne_miejscowosci": {
                        "type": "string"
                    }
                }
            },
            "Godziny": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "godziny",
                    "awarie"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "godziny": {
                        "type": "object",
                        "required": [
                            "strefa",
                            "poniedzialek_piatek",
                            "sobota",
                            "niedziela"
                        ],
                        "properties": {
                            "strefa": {
                                "type": "string"
                            },
                            "poniedzialek_piatek": {
                                "type": "string"
                            },
                            "sobota": {
                                "type": "string"
                            },
                            "niedziela": {
                                "type": "string"
                            }
                        }
                    },
                    "awarie": {
                        "type": "string"
                    }
                }
            },
            "Firma": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "firma",
                    "kontakt"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "firma": {
                        "type": "object",
                        "required": [
                            "nazwa",
                            "nazwa_prawna",
                            "strona"
                        ],
                        "properties": {
                            "nazwa": {
                                "type": "string"
                            },
                            "nazwa_prawna": {
                                "type": "string"
                            },
                            "strona": {
                                "type": "string"
                            }
                        }
                    },
                    "kontakt": {
                        "type": "object",
                        "required": [
                            "telefon",
                            "url"
                        ],
                        "properties": {
                            "telefon": {
                                "type": "string"
                            },
                            "url": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Oferta": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "oferta"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "oferta": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "nazwa",
                                "url"
                            ],
                            "properties": {
                                "nazwa": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "Stan": {
                "type": "object",
                "required": [
                    "wersja_formatu",
                    "aktualizacja_utc",
                    "status",
                    "api",
                    "status_cennika"
                ],
                "properties": {
                    "wersja_formatu": {
                        "type": "integer"
                    },
                    "aktualizacja_utc": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "ok"
                        ]
                    },
                    "api": {
                        "type": "string",
                        "enum": [
                            "v1"
                        ]
                    },
                    "status_cennika": {
                        "type": "string"
                    }
                }
            }
        }
    }
}
