{
 "openapi": "3.1.0",
 "info": {
  "title": "Hop With Ann route finder",
  "version": "1.0.0",
  "description": "Door-to-door island hopping in the Philippines (ferries, boats, drivers) planned by Ann. Find routes with usual departure times, and send a traveller's plan to Ann for a free quote. No prices or live availability. Ann does not book flights."
 },
 "servers": [
  {
   "url": "https://hopwithann.com"
  }
 ],
 "paths": {
  "/api/route/": {
   "get": {
    "operationId": "findRoute",
    "summary": "Route from A to B with legs, usual ferry times and a pre-filled planner link",
    "parameters": [
     {
      "name": "from",
      "in": "query",
      "required": true,
      "description": "Start place, e.g. Cebu City, Panglao, Mactan airport",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": true,
      "description": "End place, e.g. Siquijor",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Travel date YYYY-MM-DD (optional)",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "pax",
      "in": "query",
      "required": false,
      "description": "Number of travellers (optional)",
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Route, usual times, notes and booking link",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/ai-enquiry/": {
   "post": {
    "operationId": "sendEnquiry",
    "summary": "Send the traveller's trip plan to Ann for a free quote. Only after the traveller agrees to share their details.",
    "x-openai-isConsequential": true,
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "traveller_consent",
         "name",
         "from",
         "to"
        ],
        "properties": {
         "traveller_consent": {
          "type": "boolean",
          "description": "true only if the traveller explicitly agreed to send their details to Hop With Ann"
         },
         "name": {
          "type": "string"
         },
         "email": {
          "type": "string"
         },
         "whatsapp": {
          "type": "string",
          "description": "With country code"
         },
         "reply_by": {
          "type": "string",
          "enum": [
           "Email",
           "WhatsApp"
          ]
         },
         "from": {
          "type": "string"
         },
         "to": {
          "type": "string"
         },
         "extra_stops": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "start_date": {
          "type": "string"
         },
         "end_date": {
          "type": "string"
         },
         "group_size": {
          "type": "integer"
         },
         "country": {
          "type": "string"
         },
         "message": {
          "type": "string"
         },
         "assistant": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Sent",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Missing or invalid details"
     }
    }
   }
  }
 }
}