API Reference
Overview
Booking Platform uses REST API for connecting with external systems
Base URL
bash
https://api.booking-platform.com/v1Authentication
Every request must include an API Key in the header:
Authorization: Bearer YOUR_API_KEYEndpoints
Bookings
GET /bookings
Get all bookings
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
page | number | Current page (default: 1) |
limit | number | Items per page (default: 20) |
status | string | Filter by status |
Response:
json
{
"data": [
{
"id": "bk_123456",
"customerName": "John Doe",
"service": "Haircut",
"dateTime": "2024-01-15T10:00:00Z",
"status": "confirmed"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150
}
}POST /bookings
Create a new booking
Request Body:
json
{
"customerId": "cust_123",
"serviceId": "svc_456",
"staffId": "staff_789",
"dateTime": "2024-01-15T10:00:00Z",
"notes": "Special appointment request"
}PATCH /bookings/:id
Update booking status
DELETE /bookings/:id
Cancel a booking
Customers
GET /customers
Get customer list
POST /customers
Create a new customer
Services
GET /services
Get service list
POST /services
Create a new service
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request — Invalid data |
| 401 | Unauthorized — Invalid API Key |
| 404 | Not Found — Data not found |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Internal Server Error — Server error |
Rate Limits
- Default: 100 requests/minute
- Enterprise: 1000 requests/minute
Previous: Basic Usage