Docs

12. API Overview

12.1 REST Conventions

  • Base URL: e.g. https://api.slotbook.com/v1 (or /api/v1 on same host).
  • Auth: Authorization: Bearer <access_token> for protected routes.
  • JSON request/response; appropriate HTTP status codes (200, 201, 400, 401, 403, 404, 422, 500).

12.2 Key Endpoint Groups

  • Auth: POST /auth/register, POST /auth/login, POST /auth/refresh, POST /auth/forgot-password, POST /auth/reset-password, POST /auth/logout (optional).
  • Users: GET /users/me, PATCH /users/me (profile).
  • Providers: GET /providers (list), GET /providers/:id|slug (public), POST /providers (create profile), PATCH /providers/me, POST /providers/me/image (upload).
  • Services: GET /providers/:id/services, POST /providers/me/services, PATCH /providers/me/services/:id, DELETE /providers/me/services/:id.
  • Availability: GET /providers/:id/availability?date=YYYY-MM-DD&service_id=....
  • Bookings: POST /bookings, GET /bookings (mine), GET /bookings/:id, PATCH /bookings/:id/cancel.
  • Payments: Stripe Checkout or Payment Element triggered from frontend; webhook POST /webhooks/stripe.
  • Reviews: POST /appointments/:id/review, GET /providers/:id/reviews.
  • Connect: GET /providers/me/connect/onboarding-url, GET /providers/me/connect/status.

Exact paths and request/response shapes to be defined in OpenAPI (FastAPI auto-generates this).