Skip to content

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/v1

For Development:

bash
http://localhost:5173/api/v1

Response 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

CodeDescription
200Success
201Created
204Deleted (no content)
400Bad Request — Invalid data
401Unauthorized — Login required
403Forbidden — No permission
404Not Found — Data not found
409Conflict — Duplicate data
422Unprocessable Entity — Validation error
429Too Many Requests — Rate limit exceeded
500Internal Server Error

Available Endpoints

Bookings

MethodEndpointDescription
GET/bookingsGet all bookings
GET/bookings/:idGet booking details
POST/bookingsCreate a new booking
PATCH/bookings/:idUpdate a booking
DELETE/bookings/:idCancel a booking

Customers

MethodEndpointDescription
GET/customersGet customer list
GET/customers/:idGet customer details
POST/customersCreate a new customer
PATCH/customers/:idUpdate customer info
DELETE/customers/:idDelete a customer

Services

MethodEndpointDescription
GET/servicesGet service list
GET/services/:idGet service details
POST/servicesCreate a new service
PATCH/services/:idUpdate a service
DELETE/services/:idDelete a service

Staff

MethodEndpointDescription
GET/staffGet staff list
GET/staff/:idGet staff details
POST/staffCreate a new staff member
PATCH/staff/:idUpdate staff info
DELETE/staff/:idDelete a staff member

Business

MethodEndpointDescription
GET/businessGet business info
PATCH/businessUpdate business info
GET/business/settingsGet settings
PATCH/business/settingsUpdate settings

Additional APIs

APIEndpoint PrefixDescription
Availability/availabilityAvailable slots and booking times
Reviews/reviewsReviews and ratings
Chat/chatChat system
Search/searchSearch for providers
Checkout/checkoutPayments
Notifications/notificationsNotifications
Webhooks/webhooksWebhook management
Loyalty/loyaltyPoints and rewards
Partners/partnersPartner system
Support/supportSupport tickets
Admin/adminAdmin system (requires admin role)
AI/aiAI-powered features and OpenAI integration
Blog/blogBlog content management
Feature Flags/feature-flagsFeature flag management and evaluation
Realtime/realtimeReal-time updates via Server-Sent Events
Social Sharing/social-sharingSocial sharing link generation
Video/videoVideo 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-go

Community 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

Released under the MIT License.