HEX
Server: Apache
System: Linux 136-243-153-58.cprapid.com 4.18.0-553.81.1.el8_10.x86_64 #1 SMP Mon Oct 27 11:29:19 EDT 2025 x86_64
User: mytest (1001)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/mytest/.trash/BOOKING_MANAGER_API_REFERENCE.md.45
# Booking Manager API Reference

## Overview
Booking Manager API is a standard Web service that enables clients to connect their data with external systems and services and to extend the automation benefits of the Booking Manager System.

## API Documentation
- **Swagger API Documentation**: https://app.swaggerhub.com/apis-docs/mmksystems/bm-api/2.1.4
- **Version**: 2.1.4
- **Protocol**: REST API (OAS 3.0)
- **Support**: https://support.booking-manager.com/

## Base URLs
- **Production**: `https://www.booking-manager.com/api/v2`
- **Beta**: `http://beta.booking-manager.com/api/v2`
- **Mock Server**: `https://virtserver.swaggerhub.com/mmksystems/bm-api/2.0.0`

## Authentication
- **API Key**: Required for all requests
- **How to Get API Key**: https://support.booking-manager.com/hc/en-us/articles/16861265991964-How-to-Get-Your-API-Key-from-Your-Local-Application-Charters-Only
- **Our API Key**: `1eaa-ff679407bf99f24399c72fe3cf5f7309d769f1c5e6ca2481ecb09bafd14862b66b27363fa538d382411345ccdd8c6897194b753c8515ca37e1901d379681b927`

## Key API Endpoints

### Geographic Data
- `GET /countries` - Provides a list of countries
- `GET /country/{id}` - Gets a specific country
- `GET /worldRegions` - Provides a list of world regions
- `GET /worldRegion/{id}` - Gets a specific world region
- `GET /sailingAreas` - Provides a list of sailing areas
- `GET /sailingArea/{id}` - Gets a specific sailing area
- `GET /bases` - Provides a list of bases
- `GET /base/{id}` - Gets a specific base

### Fleet Management
- `GET /companies` - Provides a list of companies
- `GET /company/{id}` - Gets a specific company
- `GET /shipyards` - Provides a list of shipyards
- `GET /shipyard/{id}` - Gets a specific shipyard
- `GET /yachts` - Provides a list of yachts (supports filters: kind, language, inventory, etc.)
- `GET /yacht/{id}` - Gets a specific yacht
- `GET /yachtTypes` - Provides a list of yacht types (kind)
- `GET /equipment` - Provides a list of equipment categories

### Availability & Pricing
- `GET /offers` - Provides a list of available offers
- `GET /specialOffers` - Provides a list of special offers
- `GET /specialOffers/{offerType}` - Provides a list of special offers by type
- `GET /prices` - Provides a list of yacht prices
- `PUT /setWeeklyPrice/{id}` - Set weekly price
- `GET /availability/{year}` - Gets availability for a year
- `GET /shortAvailability/{year}` - Gets short availability for a year

### Reservations
- `POST /reservation` - Create reservation
- `GET /reservation/{reservationId}` - Get reservation
- `PUT /reservation/{reservationId}` - Confirm reservation
- `DELETE /reservation/{reservationId}` - Cancel reservation
- `GET /reservations/{year}` - Retrieves all reservations for a year
- `GET /crewListLink/{reservationId}` - Get crew list link

### Documents
- `POST /addDocument/{itemType}` - Add document on specific item

### User Management
- `GET /users` - Retrieves a list of users with details
- `POST /users` - Creates a new user with given details
- `POST /users/search` - Returns a list of Users based on filter
- `GET /users/{id}` - Retrieves details of the user
- `PUT /users/{id}` - Updates a user with new details

### Skippers
- `GET /skippers` - Retrieves a list of skippers with details (added 14.11.2024)

### Invoicing
- `GET /invoices/{invoiceType}` - Exports all issued invoices or only certain type

### Advanced Data
- `GET /objects/{entity}/properties` - Retrieves all possible properties of the entity type object

## Recent API Changes (2024)

### November 22, 2024
- `GET /reservation` & `GET /reservations` now return `charterReservationId` for agencies

### November 14, 2024
- Added `GET /skippers` - returns a list of skippers

### October 2, 2024
- Added `creationDate` and `confirmationDate` to `ReservationResponse` schema

### August 8, 2024
- `POST /reservation` - added `sendNotification` parameter to request body
- `PUT /reservation` - added `sendNotification` query parameter

### July 10, 2024
- `GET /yacht` & `/yachts` - added `certificate` field to response
- `GET /offers` - added `myReservationId` to response when `showOptions=true`

### April 6, 2024
- `GET /yachts` - added `kind` parameter

### February 22, 2024
- `GET /yacht` & `/yachts` - added `language` parameter for equipment and extras translations

## Important Parameters

### Yacht Endpoints
- `language` - For equipment and extras translations
- `inventory` - Set to `raw` to get `equipmentRaw` field
- `kind` - Filter by yacht type
- `minYearOfBuild` / `maxYearOfBuild` - Filter by year
- `sailingAreaId` - Filter by sailing area

### Offers Endpoints
- `showOptions` - Set to true to include options
- `minYearOfBuild` / `maxYearOfBuild` - Filter by year
- `kind` - Filter by yacht type
- `sailingAreaId` - Filter by sailing area

## Yacht Response Fields
- Basic: id, name, model, kind, year, length, beam, draught
- Capacity: cabins, berths, heads, maxPeopleOnBoard
- Technical: engine, waterCapacity, fuelCapacity, displacement
- Equipment: equipment (with id and value), equipmentRaw, extras
- Pricing: deposit, commissionPercentage, products (with prices)
- Availability: availableInBase, validDateFrom, validDateTo
- Location: bases, validForBases, validSailingAreas
- Charter: minimumCharterDuration, defaultCheckInDay
- Crew: crew (for crewed yachts), crewedByDefault
- Media: images, layout, documents
- Descriptions: description, descriptions (multilingual), wcNote, cabinsNote, berthsNote
- Certificates: certificate

## Reservation Fields
- Basic: reservationId, reservationCode, yachtId, clientId
- Dates: dateFrom, dateTo, creationDate, confirmationDate
- Status: status (option, confirmed, cancelled)
- Pricing: price, extras, obligatoryExtras
- Passengers: passengersOnBoard
- Notifications: sendNotification

## Related Documentation
- **Introduction to REST API**: https://support.booking-manager.com/hc/en-us/articles/360015613639-Introduction-to-REST-API
- **How to start RESTful integration**: https://support.booking-manager.com/hc/en-us/articles/360015601200-How-to-start-the-RESTful-web-service-integration
- **Payment Plan via REST API**: https://support.booking-manager.com/hc/en-us/articles/14771598649628-How-to-view-the-Payment-Plan-via-Rest-API
- **SOAP API Manual**: https://support.booking-manager.com/hc/en-us/articles/360011832159-Booking-Manager-API-User-Manual-SOAP

## Integration Notes
- Use the production URL for live website: `https://www.booking-manager.com/api/v2`
- All requests require API key authentication
- Supports filtering by multiple parameters (sailing area, yacht type, dates, etc.)
- Returns JSON responses
- Supports multilingual content (equipment, extras, descriptions)
- Can create, update, and cancel reservations programmatically
- Provides real-time availability data
- Supports document uploads for reservations

## Implementation for YOLO Charters
1. **Display Yachts**: Use `GET /yachts` with our company filter
2. **Show Availability**: Use `GET /shortAvailability/{year}` for calendar display
3. **Get Pricing**: Use `GET /offers` with date range and yacht filters
4. **Create Booking**: Use `POST /reservation` to create reservations
5. **Yacht Details**: Use `GET /yacht/{id}` to get full yacht information with equipment
6. **Base Information**: Use `GET /bases` to get marina/port details