API Overview
The Booking Platform REST API allows you to connect and manage the booking system from external applications
Base URL
bash
https://api.booking-platform.com/v1For Development:
bash
http://localhost:5173/api/v1Response Format
All responses are in JSON format:
json
{
"success": true,
"data": { ... },
"message": "Operation successful"
}Error Response:
json
{
"success": false,
"error": {
"code": "BOOKING_NOT_FOUND",
"message": "The specified booking was not found",
"details": {}
}
}Pagination
Some endpoints support pagination:
json
{
"success": true,
"data": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8
}
}Query Parameters:
page— Current page (default: 1)limit— Items per page (default: 20, max: 100)
Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | Deleted (no content) |
| 400 | Bad Request — Invalid data |
| 401 | Unauthorized — Login required |
| 403 | Forbidden — No permission |
| 404 | Not Found — Data not found |
| 409 | Conflict — Duplicate data |
| 422 | Unprocessable Entity — Validation error |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Internal Server Error |
Available Endpoints
Bookings
| Method | Endpoint | Description |
|---|---|---|
| GET | /bookings | Get all bookings |
| GET | /bookings/:id | Get booking details |
| POST | /bookings | Create a new booking |
| PATCH | /bookings/:id | Update a booking |
| DELETE | /bookings/:id | Cancel a booking |
Customers
| Method | Endpoint | Description |
|---|---|---|
| GET | /customers | Get customer list |
| GET | /customers/:id | Get customer details |
| POST | /customers | Create a new customer |
| PATCH | /customers/:id | Update customer info |
| DELETE | /customers/:id | Delete a customer |
Services
| Method | Endpoint | Description |
|---|---|---|
| GET | /services | Get service list |
| GET | /services/:id | Get service details |
| POST | /services | Create a new service |
| PATCH | /services/:id | Update a service |
| DELETE | /services/:id | Delete a service |
Staff
| Method | Endpoint | Description |
|---|---|---|
| GET | /staff | Get staff list |
| GET | /staff/:id | Get staff details |
| POST | /staff | Create a new staff member |
| PATCH | /staff/:id | Update staff info |
| DELETE | /staff/:id | Delete a staff member |
Business
| Method | Endpoint | Description |
|---|---|---|
| GET | /business | Get business info |
| PATCH | /business | Update business info |
| GET | /business/settings | Get settings |
| PATCH | /business/settings | Update settings |
Additional APIs
| API | Endpoint Prefix | Description |
|---|---|---|
| Availability | /availability | Available slots and booking times |
| Reviews | /reviews | Reviews and ratings |
| Chat | /chat | Chat system |
| Search | /search | Search for providers |
| Checkout | /checkout | Payments |
| Notifications | /notifications | Notifications |
| Webhooks | /webhooks | Webhook management |
| Loyalty | /loyalty | Points and rewards |
| Partners | /partners | Partner system |
| Support | /support | Support tickets |
| Admin | /admin | Admin system (requires admin role) |
| AI | /ai | AI-powered features and OpenAI integration |
| Blog | /blog | Blog content management |
| Feature Flags | /feature-flags | Feature flag management and evaluation |
| Realtime | /realtime | Real-time updates via Server-Sent Events |
| Social Sharing | /social-sharing | Social sharing link generation |
| Video | /video | Video consultation management |
SDKs & Libraries
Official SDKs
bash
# Node.js
npm install @booking-platform/sdk
# Python
pip install booking-platform
# Go
go get github.com/booking-platform/sdk-goCommunity Libraries
API Documentation
- Authentication — How to authenticate
- Bookings — Manage bookings
- Customers — Manage customers
- Services — Manage services
- Staff — Manage staff
- Availability — Available slots and booking times
- Reviews — Reviews and ratings
- Chat — Chat system
- Search — Search for providers
- Checkout — Payments
- Notifications — Notifications
- Webhooks — Webhook management
- Loyalty — Points and rewards
- Partners — Partner system
- Support — Support tickets
- Admin — Admin system
- AI — AI-powered features and OpenAI integration
- Blog — Blog content management
- Feature Flags — Feature flag management and evaluation
- Realtime — Real-time updates via Server-Sent Events
- Social Sharing — Social sharing link generation
- Video — Video consultation management
- API Reference — API summary
- API Tester — Test API directly