API Reference

Complete reference for all BookingAPI endpoints and resources

OpenAPI Specification

This is a placeholder for the full OpenAPI specification. The complete interactive API reference with request/response examples will be available here.

Base URL

https://api.bookingapi.ca/v1

Endpoints

POST/v1/bookings

Create a new booking

GET/v1/bookings/:id

Retrieve a booking

GET/v1/bookings

List all bookings

PATCH/v1/bookings/:id

Update a booking

DELETE/v1/bookings/:id

Cancel a booking

GET/v1/availability

Check availability

POST/v1/services

Create a service

GET/v1/services

List services

POST/v1/webhooks

Create a webhook

GET/v1/webhooks

List webhooks

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Example Request

curl -X POST https://api.bookingapi.ca/v1/bookings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service": "haircut",
    "date": "2024-03-15",
    "time": "14:00",
    "customer": {
      "name": "John Doe",
      "email": "john@example.com",
      "phone": "+1234567890"
    }
  }'

Example Response

{
  "id": "bk_abc123",
  "object": "booking",
  "status": "confirmed",
  "service": "haircut",
  "date": "2024-03-15",
  "time": "14:00",
  "customer": {
    "id": "cus_xyz789",
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+1234567890"
  },
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Ready to Start Building?

Check out our quickstart guide to start integrating BookingAPI.