Blocks & Calendar Sources
Block dates, read your fleet's calendar and connect iCal feeds
Same in API v1.0 and v1.1
/dashboard/calendar/blocksDELETE/dashboard/calendar/blocks/:idGET/dashboard/calendar/availabilityBlock dates on a boat, read what is booked and blocked across your fleet, and connect outside calendars. These are the calls behind the dashboard's calendar.
Authentication
Requires one of:
- API key:
X-API-Keyheader with your API key. This is the way to call it from your own systems. - Session: a signed-in charter.boats session — what the dashboard uses from the browser. Outside charter.boats a request without a key is stopped by bot protection (HTML
403), so integrations should use the key.
Either way, the account must be a member of the company that owns the boat. Calls that take a company_id need your company's id — the company_id on any boat List Your Fleet returns.
Block dates
POST /dashboard/calendar/blocks
| Field | Type | Required | Description |
|---|---|---|---|
boat_id | string | Yes | Boat UUID |
start_at | string | Yes | First day (YYYY-MM-DD) |
end_at | string | Yes | Last day (YYYY-MM-DD) |
reason | string | No | Stored as sent. Default owner_hold |
notes | string | No | A note for yourself |
A block over several days starts at the boat's check-in time on the first day and ends at its check-out time on the last, so the last day stays free for the next check-in; a one-day block holds the whole day. On a boat priced by MMK or Nausys the block is also placed as a hold on that platform; with X-Lock on for your company it is placed on every other partner platform the boat is linked to as well.
The response is the block plus external_holds, one entry per platform a hold was placed on.
Remove a block
DELETE /dashboard/calendar/blocks/:id releases the block's holds on MMK and Nausys first, then deletes it, and answers { "success": true }. When a platform refuses the release the block is kept (502), so you can retry.
Read the fleet calendar
GET /dashboard/calendar/availability?company_id=<id>
Answers { events, boats, last_sync_at } for every boat of the company, from one month back to a year ahead:
| Field | Description |
|---|---|
events | Bookings, blocks, partner reservations and options, and the dates a boat has no price, each with boat_id, start, end, type and label; a block carries its block_id |
boats | The company's boats, with which partner each is linked to (sources) |
last_sync_at | When the calendar last synced from a partner |
iCal sources
/dashboard/calendar/sources?boat_id=POST/dashboard/calendar/sourcesDELETE/dashboard/calendar/sources/:idPOST/dashboard/calendar/sources/:id/syncImport an outside calendar (another booking site, your own calendar) into a boat's availability.
- List —
GET ?boat_id=<id>answers the boat's sources, newest first. - Add —
POSTwithboat_id,source_name,source_url(anhttpsURL) and optionallysource_type(defaultical). The response is the new source. - Sync one now —
POST /dashboard/calendar/sources/:id/syncreads the feed and answers{ success, events_processed, events_created, events_updated, events_removed, errors }. - Remove —
DELETE /dashboard/calendar/sources/:idremoves the source with the events it brought in, and answers{ "success": true }. When a hold placed for those events cannot be released on MMK or Nausys, the source is kept (502).
To send your calendar the other way, subscribe to the iCal export.
Errors
| Status | Message |
|---|---|
400 | boat_id, start_at, and end_at are required |
400 | Block ID required |
400 | company_id is required |
400 | boat_id is required / boat_id, source_name, and source_url are required |
400 | Invalid URL format / Calendar URL must use https / Calendar URL host is not allowed |
400 | Source ID is required |
401 | Invalid API key — a key that belongs to no account |
401 | Invalid API key format — a malformed key |
401 | Authentication required — no key and no signed-in session |
403 | Not a company member — you don't belong to the boat's company |
403 | Source has no associated company |
404 | Boat not found / Block not found / Calendar source not found |
500 | Failed to load availability / Sync failed: … |
502 | Platform cancel failed: … Block retained — retry to cancel again. (or Calendar source retained) |