API Reference
Complete endpoint reference for the Charter Boats platform
The Charter Boats API is organized by who's calling:
- Discovery API (
/api/ai/*) — public, no key. Conversational search for guests, AI assistants, and agents (also via MCP / Custom GPT). - Agent API (
/api/agent/*) — for approved charter agents. Reveals platform, deeplinks, and per-week activity the public search hides. Needs a logged-in agent session. - Operator API — for owners and partners managing their own listings (boats, pricing, fees, calendar). Writes need a key.
- Places & Data — public reference data anyone can read (locations, POIs, passages, sea routing, conditions).
Base URL
Authentication
The Discovery API and all read endpoints are open to server-side callers — no key needed for curl or a backend. Only the two write actions (POST /import/boat, DELETE /boats/:id) require your key in the X-API-Key header:
Generate your key from Dashboard → Settings → API. See Authentication for the full rules (including the cross-origin browser case).
Response Format
Endpoints return data directly as JSON. Error responses include a status code and message:
The boat import endpoint (POST /import/boat) is an exception -- it wraps its response in {"success": true, "boat": {...}}.
Discovery API · guests & agents
Public, no key. Compact, fuzzy-matched results tuned for conversation. See the overview.
| Method | Endpoint | Description |
|---|---|---|
GET | /ai/boats | Search boats by location, type, dates, budget |
GET | /ai/locations | Search destinations |
GET | /ai/pois | Find restaurants, fuel, shops near a place |
GET | /ai/routes | Find sailing passages |
GET | /ai/trips | Search curated itineraries |
GET | /ai/content | Search articles, guides, FAQs |
Agent API · approved agents
Agent-authenticated search that reveals source platform, per-yacht deeplinks, per-week availability/options, and a commission preview. Requires a logged-in agent session — see the overview.
| Method | Endpoint | Description |
|---|---|---|
GET | /agent/boats | Dense agent search with platform, deeplinks, and activity |
Operator API · owners & partners
Manage your own listings.
Boats
| Method | Endpoint | Description |
|---|---|---|
GET | /boats | List boats with filters and search |
GET | /boats/:id | Get boat details |
GET | /boats/defaults | Get smart defaults for boat forms |
POST | /import/boat | Import a new boat listing |
DELETE | /boats/:id | Delete a boat |
Editing an existing listing's details, prices, fees, and availability is done in the dashboard -- those actions are tied to your logged-in session and aren't exposed as keyed API endpoints. The API covers import, delete, and read.
Pricing & Fees
| Method | Endpoint | Description |
|---|---|---|
GET | /boats/:id/pricing | Resolve effective price per day for a date range |
GET | /boats/:id/prices | List seasonal pricing rules |
GET | /boats/:id/fees | List boat fees |
Calendar
| Method | Endpoint | Description |
|---|---|---|
GET | /calendar/:boatId/export.ics | Export one boat's calendar as iCal |
GET | /calendar/company/:companyId/export.ics | Export a whole company's calendar as iCal |
Places & Data · public reference
Read-only catalog data anyone can use to build on the platform.
Locations & POIs
| Method | Endpoint | Description |
|---|---|---|
GET | /locations | List locations with optional filters |
GET | /locations/search | Search locations by name or coordinates |
GET | /locations/:id | Get location details with nearby POIs |
GET | /pois/search | Search points of interest |
GET | /pois/:id | Get POI details |
GET | /pois/categories | List available POI categories |
Passages & Sea Routing
| Method | Endpoint | Description |
|---|---|---|
GET | /passages | List sailing passages |
GET | /passages/:slug | Get passage details |
GET | /passages/by-location/:id | Get passages from a location |
GET | /searoute/route | Calculate sea route between two points |
Conditions
| Method | Endpoint | Description |
|---|---|---|
| — | — | Sailing conditions / wind (no first-party endpoint yet) |
Looking for booking or content endpoints?
- Booking a boat (reserve + pay) runs through the charter.boats checkout UI, not a public API -- it needs a logged-in guest session and Stripe Elements on the page.
- Articles & FAQs are searchable via the Discovery API's
/ai/content.
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request -- invalid parameters |
401 | Unauthorized -- missing or invalid API key |
403 | Forbidden -- key not allowed to touch this resource |
404 | Not Found |
409 | Conflict -- duplicate resource |
500 | Server Error |