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). Every call carries your key.
- Places & Data — reference data anyone with a key can read (locations, POIs, passages, sea routing, conditions).
Base URL
Authentication
Send your key in the X-API-Key header on every call outside the Discovery API — reads (boats, pricing, fees, locations, POIs, passages, sea routing, features, manufacturers) as well as the two writes (POST /import/boat, DELETE /boats/:id):
- No key — the request is stopped by our bot protection before it reaches the API: you get an HTML
403page, not JSON. - A key that isn't real —
401 {"message": "Invalid API key"}. - The iCal feeds (
/calendar/:boatId/export.ics,/calendar/company/:companyId/export.ics) are the exception: calendar apps can't send headers, so they need no key. - The Discovery API (
/api/ai/*) and the MCP server need no key — see below.
Every keyed call is recorded against your account — that is how we can see your traffic when you ask about limits, and tell it apart from an anonymous scraper's. Writes additionally check that you own the boat or company.
Call from your server: browser requests from another website are not supported (no CORS headers), with the single exception of GET /api/locations. Generate your key from Dashboard → Settings → API. See Authentication for the full rules.
Identifying yourself on open endpoints
The Discovery API (/api/ai/*) and /mcp are open: no key needed. A key is optional there, and we recommend it for any production integration. A valid API key is recorded against your account and makes the boat links in the response carry your affiliate ref (when your account has an active affiliate profile), so bookings that start from your integration are credited to you. Nothing else about the response changes, and a missing or invalid key is served exactly like an anonymous call — never a 401.
All /api/ai/* endpoints share one rate-limit budget; past it you get 429 with a Retry-After header.
Response Format
Endpoints return data directly as JSON. Errors come back as a JSON object — read statusCode and message; statusMessage is not meaningful:
A block by our bot protection (no key sent) is an HTML page with status 403, not this JSON shape.
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. Every call carries your X-API-Key.
Boats
| Method | Endpoint | Description |
|---|---|---|
GET | /boats | List boats with filters and search |
GET | /boats/:id | Get boat details |
GET | /boats/availability | Blocked nights for a date range, or one date |
GET | /features | Equipment vocabulary for the features filter |
GET | /manufacturers | List makes |
GET | /manufacturers/:slug | Get one make |
GET | /manufacturers/:slug/models | Models a make sells — values for the makes filter |
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 you can use to build on the platform. Same rule as the Operator API: send your key on every call.
Locations & POIs
| Method | Endpoint | Description |
|---|---|---|
GET | /locations | List locations with optional filters |
GET | /locations/search | Typeahead search by name |
GET | /locations/:id | Get location details with nearby POIs |
GET | /locations/:id/card | Compact summary: how a place is used, where boats go next, nearest charter base |
GET | /locations/:id/market | Boats available and average weekly price per charter week |
GET | /locations/map | Places inside a map viewport, ranked by vessel traffic |
GET | /pois/search | Search points of interest |
GET | /pois/:id | Get POI details |
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 -- the API key isn't valid (messages listed under Authentication) |
403 | Forbidden -- key not allowed to touch this resource (JSON), or no key sent at all: our bot protection answers with an HTML page, not JSON |
404 | Not Found |
409 | Conflict -- duplicate resource |
429 | Too Many Requests -- Discovery API (/api/ai/*) rate limit; wait the number of seconds in the Retry-After header |
500 | Server Error |
502 | Bad Gateway -- the sea-routing backend failed (/searoute/route) |