Přeskočit na hlavní obsah

API v1

REST API pro integraci rezervacniho systemu Zarezervujto do vasich aplikaci.

Zakladni informace

VlastnostHodnota
Base URLhttps://api.zarezervujto.cz/api/v1
FormatJSON
AutentizaceAPI 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)

MetodaEndpointPopis
GET/:slug/infoZakladni informace o projektu
GET/:slug/servicesSeznam sluzeb
GET/:slug/scheduleOteviraci doba
GET/:slug/availabilityDostupne terminy
GET/:slug/tablesSeznam stolu

Rezervace (vyzaduje opravneni)

MetodaEndpointOpravneniPopis
GET/:slug/reservationsCteniSeznam rezervaci
GET/:slug/reservations/:idCteniDetail rezervace
POST/:slug/reservationsZapisVytvoreni rezervace
PATCH/:slug/reservations/:id/statusZapisZmena statusu
DELETE/:slug/reservations/:idMazaniZruseni rezervace

Media (vyzaduje opravneni Media)

MetodaEndpointPopis
GET/:slug/galleryFotky z galerie
GET/:slug/reviewsRecenze

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.

Dalsi kroky

  1. Nastavte autentizaci
  2. Prozkoumejte endpointy
  3. Seznamte se s chybovymi kody