API v1
REST API pro integraci rezervacniho systemu Zarezervujto do vasich aplikaci.
Zakladni informace
| Vlastnost | Hodnota |
|---|---|
| Base URL | https://api.zarezervujto.cz/api/v1 |
| Format | JSON |
| Autentizace | API klic v headeru |
Struktura URL
Vsechny endpointy nasleduji format:
https://api.zarezervujto.cz/api/v1/:slug/:endpoint
:slug- Unikatni identifikator vaseho projektu (napr.restaurace-u-jana):endpoint- Konkretni endpoint (napr.info,reservations)
Prehled endpointu
Verejne informace (zadne specialni opravneni)
| Metoda | Endpoint | Popis |
|---|---|---|
| GET | /:slug/info | Zakladni informace o projektu |
| GET | /:slug/services | Seznam sluzeb |
| GET | /:slug/schedule | Oteviraci doba |
| GET | /:slug/availability | Dostupne terminy |
| GET | /:slug/tables | Seznam stolu |
Rezervace (vyzaduje opravneni)
| Metoda | Endpoint | Opravneni | Popis |
|---|---|---|---|
| GET | /:slug/reservations | Cteni | Seznam rezervaci |
| GET | /:slug/reservations/:id | Cteni | Detail rezervace |
| POST | /:slug/reservations | Zapis | Vytvoreni rezervace |
| PATCH | /:slug/reservations/:id/status | Zapis | Zmena statusu |
| DELETE | /:slug/reservations/:id | Mazani | Zruseni rezervace |
Media (vyzaduje opravneni Media)
| Metoda | Endpoint | Popis |
|---|---|---|
| GET | /:slug/gallery | Fotky z galerie |
| GET | /:slug/reviews | Recenze |
Format odpovedi
Vsechny odpovedi jsou ve formatu JSON:
{
"success": true,
"data": { ... }
}
V pripade chyby:
{
"error": "Error Type",
"message": "Popis chyby",
"code": "ERROR_CODE"
}
Rate limiting
API ma nasledujici limity:
- 100 pozadavku za minutu na API klic
- 1000 pozadavku za hodinu na API klic
Pri prekroceni limitu obdrzite odpoved 429 Too Many Requests.