Publieke API
Base path: /api/public
Alle endpoints in deze module zijn zonder authenticatie toegankelijk. Ze worden gebruikt door de online boekingspagina.
GET /public/salon-info
Saloninformatie en boekingsinstellingen ophalen.
Response:
{
"salon_name": "Lumi Salon",
"booking_mode": "direct",
"booking_clients": "all",
"booking_show_prices": true,
"booking_show_duration": true,
"booking_allow_staff_choice": true,
"booking_min_lead_hours": 2,
"booking_max_future_days": 90,
"currency": "EUR"
}
GET /public/services
Beschikbare diensten ophalen (gefilterd op basis van boekingsinstellingen).
GET /public/staff
Beschikbare medewerkers ophalen (alleen als booking_allow_staff_choice actief is).
GET /public/availability
Beschikbare tijdslots ophalen.
Query parameters:
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
date | date | Ja | Datum |
service_id | integer | Ja | Dienst ID |
staff_id | integer | Nee | Medewerker ID (optioneel) |
POST /public/bookings
Nieuwe boeking aanmaken via de publieke pagina.
Request body:
| Veld | Type | Verplicht |
|---|---|---|
service_id | integer | Ja |
staff_id | integer | Nee |
start_at | datetime | Ja |
client_name | string | Ja |
client_email | string | Ja |
client_phone | string | Nee |
notes | string | Nee |
Bij booking_mode=request wordt de boeking als provisional aangemaakt. Bij booking_clients=existing is eerst inloggen vereist.
Klant authenticatie
POST /public/client-login
Klant inloggen met e-mail en wachtwoord.
POST /public/client-magic-link
Magic link e-mail versturen voor klantlogin.
Request body: { "email": "klant@example.nl" }
GET /public/client-verify-magic
Magic link token verifiëren. Token wordt na gebruik verwijderd.
Query parameters: token
Response: { "clientToken": "jwt" }
POST /public/reviews
Beoordeling achterlaten via feedback token.
| Veld | Type | Verplicht |
|---|---|---|
token | string | Ja |
rating | integer (1-5) | Ja |
comment | string | Nee |