Documentation
Complete guide to integrating and using the Cruise Cash booking platform
Overview
Welcome to the Cruise Cash API documentation. This platform provides a comprehensive booking system for cruise vacations with member benefits and referral rewards.
Note: This is a demo application. All API endpoints are for demonstration purposes only.
Getting Started
Follow these steps to integrate with the Monster Cruise Club platform and start booking cruises for your users.
1Create an Account
Start by creating a Cruise Cash account. You can sign up at the signup page to get access to the platform.
POST /api/auth/signup2Authenticate Your Requests
All API requests require authentication via JWT tokens. Include your token in the Authorization header of each request.
Authorization: Bearer YOUR_JWT_TOKEN3Browse Available Cruises
Query the cruise catalog to find available destinations, dates, and pricing information.
GET /api/cruises4Make a Booking
Submit a booking request with passenger details and selected cruise information to complete the reservation.
POST /api/bookingsAuthentication
The Cruise Cash API uses JWT (JSON Web Tokens) for authentication. Tokens are issued upon successful login and must be included in all subsequent requests.
Login Endpoint
POST /api/auth/loginToken Format
{"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user" : {...}}API Reference
Complete API documentation with endpoints, request/response formats, and parameters.
Authentication Endpoints
/api/auth/signupCreate a new user account
/api/auth/loginAuthenticate and receive JWT token
Cruise Endpoints
/api/cruisesList all available cruises
/api/cruises/:idGet details for a specific cruise
Booking Endpoints
/api/bookingsCreate a new cruise booking
/api/bookingsList user's bookings
Coming Soon: Complete API documentation with detailed request/response examples, error codes, and rate limiting information will be available soon.
Code Examples
Sample code snippets to help you get started quickly.
Example: User Login
fetch('/api/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'user@example.com',
password: 'yourpassword'
})
})
.then(res => res.json())
.then(data => {
const token = data.token;
});Example: Fetch Available Cruises
fetch('/api/cruises', {
headers: {
'Authorization': 'Bearer ' + token
}
})
.then(res => res.json())
.then(data => {
console.log('Available cruises:', data);
});Support
Need help? We're here to assist you with any questions or issues.
