{
  "openapi": "3.1.0",
  "info": {
    "title": "StoneBridge Solutions Appointment Booking",
    "version": "1.0.0",
    "description": "Check open 1-hour video consultation slots with Carl at StoneBridge Solutions (website design for small businesses, Clemmons, NC) and request one. A request is held as pending until Carl confirms it by email. Weekday slots (kind instant) are Monday to Thursday 1:30 PM to 6:30 PM and Friday 1:30 PM, 2:30 PM, 3:30 PM, and 4:00 PM Eastern, one hour long, and are held as soon as requested. Carl usually works on client websites on weekends, so weekend slots (kind request) are Saturday 9:00 AM to 4:00 PM and Sunday 1:00 PM to 5:30 PM Eastern start times and are special requests: submit two different weekend slots (start and altStart) plus a reason in notes, and Carl confirms one if it works. All times are returned as UTC ISO 8601 timestamps.",
    "contact": { "name": "StoneBridge Solutions", "email": "contact@stonebridgesolutions.io", "url": "https://stonebridgesolutions.io/contact.html" }
  },
  "servers": [{ "url": "https://n8n.stonebridgesolutions.io/webhook" }],
  "paths": {
    "/booking-availability": {
      "get": {
        "operationId": "getAvailability",
        "summary": "List open appointment slots",
        "description": "Returns open 1-hour slots from 24 hours from now up to 21 days ahead. Pending and confirmed slots are excluded.",
        "responses": {
          "200": {
            "description": "Open slots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": { "type": "boolean" },
                    "timezone": { "type": "string", "example": "America/New_York" },
                    "durationMinutes": { "type": "integer", "example": 30 },
                    "slots": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "start": { "type": "string", "format": "date-time", "description": "Pass this exact value as start when requesting the slot." },
                          "end": { "type": "string", "format": "date-time" },
                          "date": { "type": "string", "description": "Calendar date in Eastern Time." },
                          "label": { "type": "string", "description": "Human-readable time in Eastern Time." },
                          "kind": { "type": "string", "enum": ["instant", "request"], "description": "instant: held when requested. request: weekend special request that needs a second choice (altStart)." }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/booking-request": {
      "post": {
        "operationId": "requestAppointment",
        "summary": "Request an appointment slot",
        "description": "Creates a pending request for one slot returned by getAvailability (or two weekend slots, start and altStart). The requester receives an acknowledgment email now and a confirmation email after Carl approves. Only submit details the person has asked you to share, and tell them the slot is not final until they receive the confirmation email.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "start"],
                "properties": {
                  "name": { "type": "string", "maxLength": 100 },
                  "email": { "type": "string", "format": "email", "maxLength": 200 },
                  "start": { "type": "string", "format": "date-time", "description": "A start value from getAvailability." },
                  "altStart": { "type": "string", "format": "date-time", "description": "Required when start is a kind request (weekend) slot: a different kind request slot as the second choice." },
                  "phone": { "type": "string", "maxLength": 40 },
                  "notes": { "type": "string", "maxLength": 1000, "description": "What the person wants to discuss, or a link to their current website. Required (at least 10 characters) for weekend slots: the reason the person needs a weekend time." }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Request received and pending confirmation by Carl. Body: ok true, status pending." },
          "400": { "description": "Invalid details, a start time that is not an open slot, or a weekend request without two different times (error: invalid, invalid_slot, need_two_times, or reason_required)." },
          "409": { "description": "The slot was just taken (error: slot_taken). Call getAvailability again." },
          "429": { "description": "Too many pending requests (error: rate_limited)." }
        }
      }
    }
  }
}
