{
 "openapi": "3.1.0",
 "info": {
  "title": "Atitlán Experience — Agent API",
  "version": "2026-11-28.1",
  "description": "Public, key-less API for AI agents to look up tours on Lake Atitlán (Guatemala), check start times, get an exact price and place a hold. Model: the agent holds, the person pays. Nothing here charges a card or accepts payment data: every response that leads to payment returns a `checkout_url` on the website, where the person pays (card, PayPal, Apple Pay, Google Pay). Prices are in USD. Dates are YYYY-MM-DD and times HH:MM in America/Guatemala (UTC-6, no daylight saving). A hold expires 48 hours after it is created if unpaid, and does not reserve capacity until paid. The same operations are exposed as an MCP server (Streamable HTTP, no authentication) at https://www.atitlanexperience.com/mcp.",
  "contact": {
   "name": "Atitlán Experience",
   "url": "https://www.atitlanexperience.com/en/contacto",
   "email": "hola@atitlanexperience.com"
  }
 },
 "servers": [
  {
   "url": "https://www.atitlanexperience.com"
  }
 ],
 "paths": {
  "/api/agent/tours": {
   "get": {
    "operationId": "listTours",
    "summary": "List bookable tours, or get one tour in detail",
    "description": "Without `id`: every tour with price, group size, start times and how to book it. With `id`: the same plus itinerary and what is included. A tour whose `booking.method` is `route_builder` is priced on its web page and cannot be quoted or held through this API.",
    "parameters": [
     {
      "name": "id",
      "in": "query",
      "schema": {
       "type": "integer"
      },
      "description": "Tour id for the detailed view."
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "es"
       ],
       "default": "en"
      },
      "description": "Language of names, messages and links."
     }
    ],
    "responses": {
     "200": {
      "description": "Catalog or single tour.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "api_version": {
           "type": "string"
          },
          "tours": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Tour"
           }
          },
          "tour": {
           "$ref": "#/components/schemas/Tour"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/agent/availability": {
   "get": {
    "operationId": "getAvailability",
    "summary": "Start times for a tour on a date, or a 120-day calendar",
    "description": "Without `date`: a calendar of the next 120 days (`days[]` with `date`, `available`, `free_start_times`), checked for the tour minimum group size. With `date`: the start times of that day. `availability: checked` means each slot was checked against real bookings. `confirmed_by_team` means the tour has no capacity tracking through the API: the slots are the offered start times and the team confirms after payment.",
    "parameters": [
     {
      "name": "tour_id",
      "in": "query",
      "required": true,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "format": "date"
      },
      "description": "Omit it to get the 120-day calendar."
     },
     {
      "name": "people",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 50
      },
      "description": "Group size. Defaults to the tour minimum."
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "es"
       ],
       "default": "en"
      },
      "description": "Language of names, messages and links."
     }
    ],
    "responses": {
     "200": {
      "description": "Slots of the day, or the calendar when `date` is omitted.",
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "type": "object",
           "properties": {
            "tour_id": {
             "type": "integer"
            },
            "date": {
             "type": "string"
            },
            "people": {
             "type": "integer"
            },
            "availability": {
             "type": "string",
             "enum": [
              "checked",
              "confirmed_by_team"
             ]
            },
            "available": {
             "type": "boolean",
             "description": "True if at least one slot can be booked."
            },
            "slots": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "time": {
                "type": "string",
                "example": "08:00"
               },
               "available": {
                "type": "boolean"
               },
               "reason": {
                "type": "string",
                "description": "Why not: no_capacity or too_late."
               }
              }
             }
            },
            "max_people": {
             "type": [
              "integer",
              "null"
             ],
             "description": "Largest group one booking takes. On a private tour (private_group: true) one group leaves per start time, so a free slot fits any group up to this size."
            },
            "private_group": {
             "type": "boolean"
            }
           }
          },
          {
           "type": "object",
           "properties": {
            "tour_id": {
             "type": "integer"
            },
            "people": {
             "type": "integer"
            },
            "availability": {
             "type": "string",
             "enum": [
              "checked",
              "confirmed_by_team"
             ]
            },
            "from": {
             "type": "string",
             "format": "date"
            },
            "to": {
             "type": "string",
             "format": "date"
            },
            "days": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "date": {
                "type": "string",
                "format": "date"
               },
               "available": {
                "type": "boolean"
               },
               "free_start_times": {
                "type": "integer"
               }
              }
             }
            }
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/agent/quote": {
   "get": {
    "operationId": "getQuote",
    "summary": "Exact price for a group on a date, with a checkout link",
    "description": "Uses the same rules as the website checkout (per-person, per-boat and package prices, child rate, holiday surcharge, price option by group size). Creates nothing. `checkout_url` opens the checkout with everything selected. A group smaller than the tour minimum is NOT rejected: it is quoted at the minimum number of paid tickets, exactly as the checkout charges it, and `quote.minimum_applied` says so (child tickets count toward the minimum; infants do not).",
    "parameters": [
     {
      "name": "tour_id",
      "in": "query",
      "required": true,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "format": "date"
      }
     },
     {
      "name": "adults",
      "in": "query",
      "required": true,
      "schema": {
       "type": "integer",
       "minimum": 1
      }
     },
     {
      "name": "children",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0,
       "default": 0
      }
     },
     {
      "name": "infants",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0,
       "default": 0
      }
     },
     {
      "name": "price_option",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Id from `price.options`. Omit it to get the cheapest option valid for the group size."
     },
     {
      "name": "start_time",
      "in": "query",
      "schema": {
       "type": "string",
       "example": "08:00"
      },
      "description": "Optional. If sent it must be one of the tour start times."
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "es"
       ],
       "default": "en"
      },
      "description": "Language of names, messages and links."
     }
    ],
    "responses": {
     "200": {
      "description": "Quote.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "quote": {
           "$ref": "#/components/schemas/Quote"
          },
          "start_time": {
           "type": [
            "string",
            "null"
           ]
          },
          "checkout_url": {
           "type": "string",
           "format": "uri"
          },
          "payment": {
           "type": "string"
          },
          "cancellation": {
           "$ref": "#/components/schemas/Cancellation"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/agent/bookings": {
   "post": {
    "operationId": "createHold",
    "summary": "Hold a booking for a customer (unpaid)",
    "description": "Creates an unpaid booking and returns `checkout_url`, where the person pays with their details already filled in. The price is computed by the server: do not send amounts. The hold expires in 48 hours if unpaid and does not reserve the departure until paid. Sending the same customer email, tour and date again updates the open hold instead of creating another. No email or message is sent to the customer: give them `checkout_url` yourself. Limited to about 10 requests per minute per IP.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "tour_id",
         "date",
         "start_time",
         "adults",
         "customer"
        ],
        "properties": {
         "tour_id": {
          "type": "integer"
         },
         "date": {
          "type": "string",
          "format": "date"
         },
         "start_time": {
          "type": "string",
          "example": "08:00"
         },
         "adults": {
          "type": "integer",
          "minimum": 1
         },
         "children": {
          "type": "integer",
          "minimum": 0
         },
         "infants": {
          "type": "integer",
          "minimum": 0
         },
         "price_option": {
          "type": "string"
         },
         "customer": {
          "type": "object",
          "required": [
           "name",
           "email"
          ],
          "properties": {
           "name": {
            "type": "string"
           },
           "email": {
            "type": "string",
            "format": "email",
            "description": "Needed later to read the booking status."
           },
           "phone": {
            "type": "string",
            "description": "With country code, e.g. +15551234567."
           }
          }
         },
         "notes": {
          "type": "string",
          "maxLength": 300,
          "description": "Allergies, special occasion, hotel."
         },
         "lang": {
          "type": "string",
          "enum": [
           "en",
           "es"
          ]
         },
         "agent": {
          "type": "string",
          "maxLength": 40,
          "description": "Name of the assistant making the request. Informational only."
         }
        }
       },
       "example": {
        "tour_id": 1,
        "date": "2026-12-10",
        "start_time": "08:00",
        "adults": 2,
        "children": 1,
        "customer": {
         "name": "Jane Doe",
         "email": "jane@example.com",
         "phone": "+15551234567"
        },
        "agent": "ExampleAssistant"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Hold created.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "reused": {
           "type": "boolean"
          },
          "booking": {
           "$ref": "#/components/schemas/Booking"
          },
          "next_step": {
           "type": "string"
          },
          "cancellation": {
           "$ref": "#/components/schemas/Cancellation"
          }
         }
        }
       }
      }
     },
     "200": {
      "description": "An open hold for the same email, tour and date was updated."
     },
     "400": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "That departure is already booked (`no_capacity`). Offer another time or date.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Too many requests (`rate_limited`). Retry after a minute.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/agent/bookings/{code}": {
   "get": {
    "operationId": "getBooking",
    "summary": "Status of a booking",
    "description": "Needs both the booking code and the customer email used to create it; otherwise it answers 404. Returns status, date, people, totals and, while it can still be paid, `checkout_url`. Never returns name, phone or notes.",
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "example": "AX-2612-AB12"
      }
     },
     {
      "name": "email",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "format": "email"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "es"
       ],
       "default": "en"
      },
      "description": "Language of names, messages and links."
     }
    ],
    "responses": {
     "200": {
      "description": "Booking.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "booking": {
           "$ref": "#/components/schemas/Booking"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "The request cannot be fulfilled as sent. Read `code`.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/agent/route-quote": {
   "get": {
    "operationId": "getRouteQuote",
    "summary": "Private boat by the hour: price a custom route",
    "description": "Prices a private boat with captain for a custom route from Panajachel (the Private Lake Day). The price is per boat, not per person, for up to 19 people, by the total time of the route including sailing and stops. With no `stops` it returns the villages you can use, the start window and `price_from_by_hours` (the from-price for 2, 3, 4, 6 and 8 hours). With `stops` it returns `quote` with the exact total, hours, return time and, when a bookable date is given, `checkout_url`. `quote.bookable` false comes with `reason` and `reason_message`. Creates nothing. This tour cannot be held with POST /api/agent/bookings.",
    "parameters": [
     {
      "name": "stops",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Comma-separated village slugs in visiting order, e.g. santa-cruz-la-laguna,san-marcos-la-laguna. Omit to list villages and rules."
     },
     {
      "name": "adults",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      }
     },
     {
      "name": "children",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      },
      "description": "Ages 5-11."
     },
     {
      "name": "infants",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      },
      "description": "Ages 0-4, free."
     },
     {
      "name": "guide",
      "in": "query",
      "schema": {
       "type": "boolean",
       "default": false
      },
      "description": "Add a bilingual guide (Spanish and English)."
     },
     {
      "name": "meal",
      "in": "query",
      "schema": {
       "type": "boolean",
       "default": false
      },
      "description": "Add lunch."
     },
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "format": "date"
      },
      "description": "Needed to get `checkout_url`. Bookable from tomorrow."
     },
     {
      "name": "start_time",
      "in": "query",
      "schema": {
       "type": "string",
       "example": "08:00"
      },
      "description": "Within `start_window`. Default 08:00."
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "es"
       ],
       "default": "en"
      },
      "description": "Language of names, messages and links."
     }
    ],
    "responses": {
     "200": {
      "description": "Rules, and the quote when stops are given.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "tour_id": {
           "type": "integer",
           "const": 2
          },
          "currency": {
           "type": "string",
           "const": "USD"
          },
          "starts_and_ends": {
           "type": "string"
          },
          "max_seats": {
           "type": "integer"
          },
          "price_from_by_hours": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "hours": {
              "type": "number"
             },
             "from_usd": {
              "type": "number"
             }
            }
           },
           "description": "From-price per boat by total route time. The exact total is `quote.total_usd`."
          },
          "start_window": {
           "type": "object",
           "properties": {
            "earliest": {
             "type": "string"
            },
            "latest": {
             "type": "string"
            },
            "return_by": {
             "type": "string"
            }
           }
          },
          "towns": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "slug": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "visit_minutes": {
              "type": "integer"
             }
            }
           }
          },
          "not_included": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "builder_url": {
           "type": "string",
           "format": "uri"
          },
          "quote": {
           "type": [
            "object",
            "null"
           ],
           "properties": {
            "bookable": {
             "type": "boolean"
            },
            "reason": {
             "type": [
              "string",
              "null"
             ]
            },
            "reason_message": {
             "type": [
              "string",
              "null"
             ]
            },
            "stops": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "stop_names": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "hours": {
             "type": "number"
            },
            "return_time": {
             "type": [
              "string",
              "null"
             ]
            },
            "km": {
             "type": "number"
            },
            "total_usd": {
             "type": [
              "number",
              "null"
             ],
             "description": "Total for the boat."
            },
            "per_person_usd": {
             "type": [
              "number",
              "null"
             ]
            },
            "includes": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "checkout_url": {
             "type": [
              "string",
              "null"
             ],
             "format": "uri"
            },
            "builder_url": {
             "type": "string",
             "format": "uri"
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/agent/transfer-quote": {
   "get": {
    "operationId": "getTransferQuote",
    "summary": "Private ground transfer: routes, vehicles and the price of a trip",
    "description": "Private car with a driver between Lake Atitlán (Panajachel), Antigua, Guatemala City and La Aurora airport. Only the group rides; the price is per vehicle, not per person. With no `from`/`to` it returns the named places, the fixed routes with their price per vehicle (one way and round trip) and the vehicles. With both ends it returns the exact price of that trip, measured by road with the same rules as the website. `from` and `to` are a place id from `places` or coordinates `lat,lng`; free-text addresses are not accepted. With `date` and `time` it checks that a car is free and, if not, returns `alternatives`. Creates nothing: the person books and pays at `book_url`. A transfer cannot be held with POST /api/agent/bookings.",
    "parameters": [
     {
      "name": "from",
      "in": "query",
      "schema": {
       "type": "string",
       "example": "antigua"
      },
      "description": "Pickup: a place id or `lat,lng`. Omit both `from` and `to` to list places and routes."
     },
     {
      "name": "to",
      "in": "query",
      "schema": {
       "type": "string",
       "example": "panajachel"
      },
      "description": "Drop-off: a place id or `lat,lng`."
     },
     {
      "name": "passengers",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 60,
       "default": 1
      }
     },
     {
      "name": "large_bags",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0,
       "maximum": 60,
       "default": 0
      }
     },
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string",
       "format": "date"
      },
      "description": "Pickup date. Goes together with `time`."
     },
     {
      "name": "time",
      "in": "query",
      "schema": {
       "type": "string",
       "example": "09:00"
      },
      "description": "Pickup time, HH:MM. Goes together with `date`."
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "es"
       ],
       "default": "en"
      },
      "description": "Language of names, messages and links."
     }
    ],
    "responses": {
     "200": {
      "description": "The catalog (no from/to) or the quote for one trip.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "api_version": {
           "type": "string"
          },
          "service": {
           "type": "string",
           "const": "private_ground_transfer"
          },
          "currency": {
           "type": "string",
           "const": "USD"
          },
          "price_unit": {
           "type": "string",
           "const": "vehicle"
          },
          "page_url": {
           "type": "string",
           "description": "Catalog only."
          },
          "places": {
           "type": "array",
           "description": "Catalog only. Ids usable as `from`/`to`.",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lng": {
              "type": "number"
             }
            }
           }
          },
          "routes": {
           "type": "array",
           "description": "Catalog only. Fixed routes, priced one way to the centre of the destination.",
           "items": {
            "type": "object",
            "properties": {
             "between": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "name": {
              "type": "string"
             },
             "prices": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "vehicle": {
                 "type": "string"
                },
                "passengers": {
                 "type": "integer"
                },
                "one_way_usd": {
                 "type": "number"
                },
                "round_trip_usd": {
                 "type": "number",
                 "description": "Both ways booked together (the return leg carries the discount)."
                }
               }
              }
             },
             "from_usd": {
              "type": "number"
             },
             "book_url": {
              "type": "string"
             }
            }
           }
          },
          "vehicles": {
           "type": "array",
           "description": "Catalog only.",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "passengers": {
              "type": "integer",
              "description": "With hand luggage only."
             },
             "passengers_with_large_bags": {
              "type": "integer",
              "description": "Largest group that travels with large suitcases. Lower than `passengers` when the vehicle has folding rear seats over the trunk."
             },
             "large_bags": {
              "type": "integer",
              "description": "Large suitcases with the folding seats stowed."
             }
            }
           }
          },
          "max_passengers": {
           "type": "integer",
           "description": "Catalog only. Largest group the fleet carries in one trip."
          },
          "return_discount_pct": {
           "type": "number",
           "description": "Catalog only. Discount on the return leg when both ways are booked together."
          },
          "from": {
           "type": "object",
           "description": "Quote only."
          },
          "to": {
           "type": "object",
           "description": "Quote only."
          },
          "distance_km": {
           "type": "number"
          },
          "drive_minutes": {
           "type": "number"
          },
          "pricing": {
           "type": "string",
           "enum": [
            "fixed_route",
            "by_distance"
           ],
           "nullable": true
          },
          "pickup_at": {
           "type": "string",
           "nullable": true
          },
          "bookable": {
           "type": "boolean"
          },
          "availability": {
           "type": "string",
           "enum": [
            "checked",
            "not_checked"
           ],
           "description": "`checked` only when date and time were given."
          },
          "blocked": {
           "type": "string",
           "description": "Why it cannot be booked: same_place, out_of_area, too_many_pax, no_rates, no_vehicle_at_time, pickup_out_of_window, too_soon."
          },
          "message": {
           "type": "string",
           "description": "Text for the person when `blocked` is set."
          },
          "options": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "vehicles": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "name": {
                 "type": "string"
                },
                "units": {
                 "type": "integer"
                }
               }
              }
             },
             "passengers": {
              "type": "integer",
              "description": "People that fit in this option together with the requested large bags."
             },
             "large_bags": {
              "type": "integer",
              "description": "Large suitcases that fit in this option together with the requested passengers."
             },
             "price_usd": {
              "type": "number",
              "description": "Total for the option, per vehicle set, not per person."
             },
             "available": {
              "type": "boolean",
              "description": "False when no car of that kind is free at the requested date and time."
             }
            }
           }
          },
          "from_usd": {
           "type": "number",
           "nullable": true,
           "description": "Cheapest available option."
          },
          "alternatives": {
           "type": "object",
           "properties": {
            "times": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "dates": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           },
           "description": "Nearby free times that day and nearby days with a car at that time."
          },
          "book_url": {
           "type": "string",
           "description": "Where the person books and pays. Carries the route when both ends are named places."
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "vehicle": {
           "type": "string",
           "enum": [
            "named",
            "assigned_by_team"
           ],
           "description": "Quote only. `named`: fixed route, the vehicle is the one in each option. `assigned_by_team`: route priced by distance; options read \"Private vehicle\" and the team confirms which vehicle goes after booking. Do not name a make or model."
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Unknown place or invalid parameter.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "The route could not be measured right now.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Pricing temporarily unavailable.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error",
     "code"
    ],
    "properties": {
     "error": {
      "type": "string",
      "description": "Human-readable message, safe to show the person."
     },
     "code": {
      "type": "string",
      "description": "Stable machine-readable reason, e.g. past_date, invalid_time, too_late, no_capacity, below_minimum, above_maximum, invalid_people, price_option_not_for_group, use_route_builder, tour_not_found, rate_limited."
     }
    }
   },
   "Cancellation": {
    "type": "object",
    "properties": {
     "family": {
      "type": "string",
      "enum": [
       "tour",
       "celebration",
       "custom"
      ]
     },
     "summary": {
      "type": "string",
      "description": "The policy for this tour in one line."
     },
     "url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "Tour": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "category": {
      "type": [
       "string",
       "null"
      ]
     },
     "summary": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "duration": {
      "type": [
       "string",
       "null"
      ]
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "group": {
      "type": "object",
      "properties": {
       "min_people": {
        "type": "integer",
        "description": "Minimum paying travelers."
       },
       "max_people": {
        "type": "integer"
       },
       "private": {
        "type": "boolean",
        "description": "Present and true when only your group travels (not shared with other travellers). Absent means it is not stated, not that the tour is shared."
       }
      }
     },
     "price": {
      "type": "object",
      "properties": {
       "currency": {
        "type": "string",
        "const": "USD"
       },
       "from_usd": {
        "type": "number"
       },
       "unit": {
        "type": "string",
        "enum": [
         "person",
         "vehicle",
         "package"
        ],
        "description": "vehicle = the price is for the whole boat or vehicle; package = fixed-price package."
       },
       "child_usd": {
        "type": [
         "number",
         "null"
        ],
        "description": "null = no child rate; children pay the adult price."
       },
       "infants": {
        "type": "string",
        "const": "free"
       },
       "options": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "id": {
           "type": [
            "string",
            "null"
           ]
          },
          "label": {
           "type": [
            "string",
            "null"
           ]
          },
          "description": {
           "type": [
            "string",
            "null"
           ]
          },
          "amount_usd": {
           "type": "number"
          },
          "unit": {
           "type": "string"
          },
          "min_people": {
           "type": [
            "integer",
            "null"
           ]
          },
          "max_people": {
           "type": [
            "integer",
            "null"
           ]
          }
         }
        }
       }
      }
     },
     "start_times": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "default_start_time": {
      "type": [
       "string",
       "null"
      ]
     },
     "same_day_notice_hours": {
      "type": "integer",
      "description": "Hours of notice required to book for today. 0 = none."
     },
     "availability": {
      "type": "string",
      "enum": [
       "checked",
       "confirmed_by_team",
       "route_builder"
      ]
     },
     "booking": {
      "type": "object",
      "properties": {
       "method": {
        "type": "string",
        "enum": [
         "api",
         "route_builder"
        ]
       },
       "url": {
        "type": "string",
        "format": "uri"
       },
       "note": {
        "type": "string"
       }
      }
     },
     "cancellation": {
      "$ref": "#/components/schemas/Cancellation"
     },
     "format": {
      "type": [
       "string",
       "null"
      ]
     },
     "includes": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "itinerary": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "time": {
         "type": "string"
        },
        "activity": {
         "type": "string"
        }
       }
      }
     }
    }
   },
   "Quote": {
    "type": "object",
    "properties": {
     "tour_id": {
      "type": "integer"
     },
     "date": {
      "type": "string"
     },
     "people": {
      "type": "object",
      "properties": {
       "adults": {
        "type": "integer"
       },
       "children": {
        "type": "integer",
        "description": "Ages 5-11."
       },
       "infants": {
        "type": "integer",
        "description": "Ages 0-4, free, do not count toward the minimum."
       },
       "total": {
        "type": "integer"
       }
      }
     },
     "price_option": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "id": {
        "type": [
         "string",
         "null"
        ]
       },
       "label": {
        "type": [
         "string",
         "null"
        ]
       }
      }
     },
     "unit": {
      "type": "string",
      "enum": [
       "person",
       "vehicle",
       "package"
      ]
     },
     "unit_price_usd": {
      "type": "number"
     },
     "child_price_usd": {
      "type": [
       "number",
       "null"
      ]
     },
     "holiday_surcharge": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "label": {
        "type": "string"
       },
       "percent": {
        "type": "number"
       }
      }
     },
     "boat_minimum": {
      "type": [
       "object",
       "null"
      ],
      "description": "On high-demand dates (Dec 25, Jan 1, Holy Thursday to Holy Saturday) anything that goes out on a boat costs at least this total per booking, add-ons apart. Present only on those dates.",
      "properties": {
       "label": {
        "type": "string"
       },
       "usd": {
        "type": "number"
       }
      }
     },
     "total_usd": {
      "type": "number"
     },
     "currency": {
      "type": "string",
      "const": "USD"
     }
    }
   },
   "Booking": {
    "type": "object",
    "properties": {
     "code": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "held",
       "expired",
       "confirmed",
       "completed",
       "cancelled"
      ],
      "description": "held = unpaid and still payable; confirmed = paid in full or with a deposit."
     },
     "tour_id": {
      "type": "integer"
     },
     "tour": {
      "type": "string"
     },
     "date": {
      "type": "string"
     },
     "start_time": {
      "type": [
       "string",
       "null"
      ]
     },
     "timezone": {
      "type": "string"
     },
     "people": {
      "type": "object",
      "properties": {
       "adults": {
        "type": "integer"
       },
       "children": {
        "type": "integer",
        "description": "Ages 5-11."
       },
       "infants": {
        "type": "integer",
        "description": "Ages 0-4, free, do not count toward the minimum."
       },
       "total": {
        "type": "integer"
       }
      }
     },
     "total_usd": {
      "type": "number"
     },
     "paid_usd": {
      "type": "number"
     },
     "balance_usd": {
      "type": "number"
     },
     "currency": {
      "type": "string"
     },
     "hold_expires_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "checkout_url": {
      "type": [
       "string",
       "null"
      ],
      "format": "uri",
      "description": "Where the person pays. null when nothing can be paid."
     },
     "status_url": {
      "type": "string",
      "format": "uri"
     }
    }
   }
  }
 }
}
