{
  "openapi": "3.1.0",
  "info": {
    "title": "PacePlace Services booking API",
    "version": "1.1.0",
    "summary": "Check arrival windows and book holiday assembly, repairs and lawn care in Wichita, Kansas.",
    "description": "PacePlace Services LLC is locally owned and operated in Wichita, Kansas. This API books the arrival windows the owner offers (his days and times are in GET /api/v1/services), in Wichita time (America/Chicago). Holiday furniture & gift assembly is $95/hr for time on site.\n\nNo API key is needed. Confirm every detail with the person before POST /api/v1/bookings, and send an Idempotency-Key so a retry can't book twice.\n\nCan't make HTTP calls? Build a link instead: GET /book with the same fields as query parameters opens the booking page filled in, and the person presses Confirm. See /llms.txt.\n\nMCP clients: the same operations are tools at /mcp (Streamable HTTP, no auth).",
    "contact": {
      "name": "PacePlace Services",
      "email": "info@paceplaceservices.com",
      "url": "https://paceplaceservices.com"
    }
  },
  "servers": [
    {
      "url": "https://paceplaceservices.com"
    }
  ],
  "externalDocs": {
    "description": "How to book with an AI assistant",
    "url": "https://paceplaceservices.com/agents"
  },
  "security": [],
  "tags": [
    {
      "name": "booking",
      "description": "Arrival windows, estimates and bookings"
    }
  ],
  "paths": {
    "/api/v1/services": {
      "get": {
        "operationId": "listServices",
        "tags": [
          "booking"
        ],
        "summary": "Services, prices, assembly item types, arrival windows and rules",
        "responses": {
          "200": {
            "description": "The catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/availability": {
      "get": {
        "operationId": "checkAvailability",
        "tags": [
          "booking"
        ],
        "summary": "Open arrival windows for a job",
        "description": "Pass the items for assembly: a longer job holds several back-to-back windows, so only earlier starts are open for it. Returns up to 14 days unless `to` is given (max 62).",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "holiday-assembly",
                "lawn-mow-edge",
                "hedge-trim",
                "mulch-beds",
                "weed-control",
                "light-repairs",
                "handyman-block",
                "drywall-repair",
                "punch-list",
                "gutter-clean"
              ],
              "default": "holiday-assembly"
            }
          },
          {
            "name": "items",
            "in": "query",
            "description": "Comma list of type:qty, e.g. \"bike:2,crib\". Plain words work too (\"2 bikes, a crib\").",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hours",
            "in": "query",
            "description": "Hold this many hours instead of estimating from items.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "YYYY-MM-DD. Defaults to the first bookable day.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "YYYY-MM-DD.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Availability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/estimate": {
      "get": {
        "operationId": "estimateJob",
        "tags": [
          "booking"
        ],
        "summary": "Estimated hours and cost",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "holiday-assembly",
                "lawn-mow-edge",
                "hedge-trim",
                "mulch-beds",
                "weed-control",
                "light-repairs",
                "handyman-block",
                "drywall-repair",
                "punch-list",
                "gutter-clean"
              ],
              "default": "holiday-assembly"
            }
          },
          {
            "name": "items",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "e.g. \"bike:2,trampoline\""
          }
        ],
        "responses": {
          "200": {
            "description": "Estimate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "estimate": {
                      "$ref": "#/components/schemas/Estimate"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bookings": {
      "post": {
        "operationId": "createBooking",
        "tags": [
          "booking"
        ],
        "summary": "Book an arrival window",
        "description": "Books a real appointment. Only call this after the person confirmed the details. Returns the booking with a private manage_url to give them.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any unique string. A retry with the same key returns the same booking.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Already booked with this Idempotency-Key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingCreated"
                }
              }
            }
          },
          "201": {
            "description": "Booked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingCreated"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "409": {
            "description": "That window isn't open; here are the next open ones",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unavailable"
                }
              }
            }
          },
          "429": {
            "description": "Too many bookings in the last hour",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bookings/{id}": {
      "get": {
        "operationId": "getBooking",
        "tags": [
          "booking"
        ],
        "summary": "A booking's details and status",
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingId"
          },
          {
            "$ref": "#/components/parameters/Token"
          }
        ],
        "responses": {
          "200": {
            "description": "The booking",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "booking": {
                      "$ref": "#/components/schemas/Booking"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bookings/{id}/reschedule": {
      "post": {
        "operationId": "rescheduleBooking",
        "tags": [
          "booking"
        ],
        "summary": "Move a booking to another open window",
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "date",
                  "window"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "window": {
                    "type": "string",
                    "description": "An arrival window id from /api/v1/availability (\"17-19\" is 5–7 PM), a start time (\"5pm\"), or morning / afternoon / evening / any for the first open window in that part of the day."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Moved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "booking": {
                      "$ref": "#/components/schemas/Booking"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Not open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unavailable"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bookings/{id}/cancel": {
      "post": {
        "operationId": "cancelBooking",
        "tags": [
          "booking"
        ],
        "summary": "Cancel a booking",
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "booking": {
                      "$ref": "#/components/schemas/Booking"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "BookingId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^PP-[0-9A-Z]{6}$"
        }
      },
      "Token": {
        "name": "t",
        "in": "query",
        "required": true,
        "description": "The t= value from manage_url (or send Authorization: Bearer <token>).",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Item": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "bike",
              "ride-on",
              "play-kitchen",
              "crib",
              "bunk-bed",
              "bed-frame",
              "dresser",
              "bookcase",
              "desk",
              "chair",
              "tv-stand",
              "wardrobe",
              "table",
              "trampoline",
              "playset",
              "playhouse",
              "basketball-hoop",
              "fitness",
              "grill",
              "other"
            ]
          },
          "qty": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 1
          },
          "label": {
            "type": "string",
            "maxLength": 80,
            "description": "What it is, when that adds detail."
          }
        }
      },
      "BookingRequest": {
        "type": "object",
        "required": [
          "service",
          "date",
          "window",
          "name",
          "phone",
          "address",
          "zip"
        ],
        "properties": {
          "service": {
            "type": "string",
            "enum": [
              "holiday-assembly",
              "lawn-mow-edge",
              "hedge-trim",
              "mulch-beds",
              "weed-control",
              "light-repairs",
              "handyman-block",
              "drywall-repair",
              "punch-list",
              "gutter-clean"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "Required for holiday-assembly. A string like \"bike:2,crib\" also works."
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD, Wichita calendar date: a day /api/v1/availability shows open."
          },
          "window": {
            "type": "string",
            "description": "An arrival window id from /api/v1/availability (\"17-19\" is 5–7 PM), a start time (\"5pm\"), or morning / afternoon / evening / any for the first open window in that part of the day."
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "phone": {
            "type": "string",
            "description": "10-digit US mobile number; the crew texts it."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Optional. Gets the confirmation and the manage link."
          },
          "address": {
            "type": "string",
            "maxLength": 200
          },
          "city": {
            "type": "string",
            "default": "Wichita"
          },
          "zip": {
            "type": "string",
            "pattern": "^\\d{5}$"
          },
          "recipient_name": {
            "type": "string",
            "description": "Booking for someone else: who will be at the address."
          },
          "recipient_phone": {
            "type": "string"
          },
          "surprise": {
            "type": "boolean",
            "description": "It's a gift: don't spoil it."
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "maxItems": 5,
            "description": "Product pages or manuals."
          },
          "agent": {
            "type": "string",
            "description": "Your assistant's name, e.g. chatgpt."
          }
        }
      },
      "Estimate": {
        "type": "object",
        "properties": {
          "hoursLow": {
            "type": "number"
          },
          "hoursHigh": {
            "type": "number"
          },
          "windows": {
            "type": "integer",
            "description": "Job length in 2-hour blocks (its high estimate)."
          },
          "costLow": {
            "type": "number"
          },
          "costHigh": {
            "type": "number"
          },
          "ratePerHour": {
            "type": "number"
          },
          "memberCostLow": {
            "type": "number"
          },
          "memberCostHigh": {
            "type": "number"
          },
          "summary": {
            "type": "string"
          },
          "mayNeedSecondVisit": {
            "type": "boolean"
          }
        }
      },
      "Slot": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "window": {
            "type": "string",
            "pattern": "^\\d{2}-\\d{2}$",
            "description": "Arrival window id, start and end hour in Wichita time: \"17-19\" is 5–7 PM."
          },
          "label": {
            "type": "string"
          }
        }
      },
      "Availability": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          },
          "timezone": {
            "type": "string",
            "const": "America/Chicago"
          },
          "windows_needed": {
            "type": "integer"
          },
          "hold_hours": {
            "type": "integer",
            "description": "Hours the job holds the crew, from the start of its arrival window."
          },
          "windows": {
            "type": "array",
            "description": "The owner's arrival windows, earliest first. Each day lists the ones it offers.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^\\d{2}-\\d{2}$",
                  "description": "Arrival window id, start and end hour in Wichita time: \"17-19\" is 5–7 PM."
                },
                "label": {
                  "type": "string"
                },
                "start_hour": {
                  "type": "integer"
                },
                "end_hour": {
                  "type": "integer"
                }
              }
            }
          },
          "estimate": {
            "$ref": "#/components/schemas/Estimate"
          },
          "first_bookable": {
            "type": "string",
            "format": "date"
          },
          "last_bookable": {
            "type": "string",
            "format": "date"
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "weekday": {
                  "type": "string"
                },
                "closed": {
                  "type": "boolean"
                },
                "reason": {
                  "type": "string"
                },
                "windows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^\\d{2}-\\d{2}$",
                        "description": "Arrival window id, start and end hour in Wichita time: \"17-19\" is 5–7 PM."
                      },
                      "label": {
                        "type": "string"
                      },
                      "start": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "end": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "available": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          },
          "next_available": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Slot"
            }
          }
        }
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "booked",
              "cancelled"
            ]
          },
          "test": {
            "type": "boolean"
          },
          "service": {
            "type": "string"
          },
          "service_name": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "date_label": {
            "type": "string"
          },
          "window": {
            "type": "string"
          },
          "window_label": {
            "type": "string"
          },
          "arrival_start": {
            "type": "string",
            "format": "date-time"
          },
          "arrival_end": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            }
          },
          "estimate": {
            "$ref": "#/components/schemas/Estimate"
          },
          "manage_url": {
            "type": "string",
            "format": "uri",
            "description": "Private: lets the holder reschedule or cancel."
          },
          "ics_url": {
            "type": "string",
            "format": "uri"
          },
          "google_calendar_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "BookingCreated": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "replayed": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "booking": {
            "$ref": "#/components/schemas/Booking"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "error": {
            "type": "string",
            "const": "invalid"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Unavailable": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "error": {
            "type": "string",
            "const": "window_unavailable"
          },
          "message": {
            "type": "string"
          },
          "alternatives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Slot"
            }
          }
        }
      }
    }
  }
}