Skip to content

API Reference

Overview

Booking Platform uses REST API for connecting with external systems

Base URL

bash
https://api.booking-platform.com/v1

Authentication

Every request must include an API Key in the header:

Authorization: Bearer YOUR_API_KEY

Endpoints

Bookings

GET /bookings

Get all bookings

Query Parameters:

ParameterTypeDescription
pagenumberCurrent page (default: 1)
limitnumberItems per page (default: 20)
statusstringFilter 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

CodeDescription
400Bad Request — Invalid data
401Unauthorized — Invalid API Key
404Not Found — Data not found
429Too Many Requests — Rate limit exceeded
500Internal Server Error — Server error

Rate Limits

  • Default: 100 requests/minute
  • Enterprise: 1000 requests/minute

Previous: Basic Usage

Released under the MIT License.