🌊 Red Sea Dreams Dokumentation
Klicken Sie auf "Als PDF drucken" um diese Seite als PDF zu speichern.

📚 Red Sea Dreams - API Referenz

Base URL

Production: https://www.redseadreams.com/api
Preview: https://dream-journey-v2.preview.emergentagent.com/api

🔓 Öffentliche Endpoints

Hotels

GET /api/hotels

Alle aktiven Hotels abrufen.

Response:

[
  {
    "id": "uuid",
    "name": "Red Sea Resort & Spa",
    "name_en": "Red Sea Resort & Spa",
    "location": "Marsa Alam",
    "stars": 5,
    "rating": 4.8,
    "reviews_count": 127,
    "amenities": ["Pool", "Spa", "Restaurant"],
    "media": [{"type": "image", "url": "https://..."}],
    "rooms": [...]
  }
]

GET /api/hotels/{hotel_id}

Einzelnes Hotel mit allen Details.

Parameter: - hotel_id (path): Hotel UUID

Response:

{
  "id": "uuid",
  "name": "Red Sea Resort & Spa",
  "description": "Luxuriöses 5-Sterne Resort...",
  "rooms": [
    {
      "id": "room-uuid",
      "name": "Deluxe Meerblick",
      "price_per_night": 150,
      "capacity": 2
    }
  ]
}

Aktivitäten

GET /api/activities

Alle aktiven Aktivitäten.

Response:

[
  {
    "id": "uuid",
    "name": "Schnorchel-Tour",
    "name_en": "Snorkeling Tour",
    "category": "water",
    "location": "Marsa Alam",
    "duration": "4h",
    "price": 35,
    "media": [...]
  }
]

GET /api/activities/{activity_id}

Einzelne Aktivität mit Details.

Response:

{
  "id": "uuid",
  "name": "Schnorchel-Tour",
  "description": "Entdecken Sie die Unterwasserwelt...",
  "highlights": ["Korallenriffe", "Tropische Fische"],
  "includes": ["Ausrüstung", "Mittagessen", "Guide"]
}

Transfers

GET /api/transfers

Alle verfügbaren Transfers.

Response:

[
  {
    "id": "hrg-marsa",
    "name": "Flughafen Hurghada → Marsa Alam",
    "from_location": "Hurghada Airport (HRG)",
    "to_location": "Marsa Alam Hotels",
    "vehicle_type": "private_car",
    "capacity": 4,
    "price": 85,
    "duration": "3h"
  }
]

Währungen

GET /api/currencies/rates

Aktuelle Wechselkurse.

Response:

{
  "base": "EUR",
  "rates": {
    "EUR": 1.0,
    "CHF": 0.95,
    "USD": 1.08
  },
  "updated_at": "2026-01-21T12:00:00Z"
}

Bewertungen

GET /api/hotels/{hotel_id}/reviews

Freigegebene Bewertungen für ein Hotel.

Response:

[
  {
    "id": "uuid",
    "customer_name": "Max M.",
    "rating": 5,
    "comment": "Tolles Hotel!",
    "hotel_response": "Vielen Dank!",
    "created_at": "2026-01-10T00:00:00Z"
  }
]

📝 Buchungs-Endpoints

POST /api/bookings

Neue Buchung erstellen.

Request Body:

{
  "booking_type": "package",
  "item_id": "hotel-uuid",
  "item_name": "Red Sea Resort - Deluxe (7 Nächte)",
  "customer_name": "Max Mustermann",
  "customer_email": "max@example.com",
  "customer_phone": "+49123456789",
  "customer_address": {
    "street": "Musterstraße 123",
    "postal_code": "12345",
    "city": "Berlin",
    "country": "Deutschland"
  },
  "check_in": "2026-02-01",
  "check_out": "2026-02-08",
  "guests": 2,
  "total_price": 1285,
  "notes": "Hochzeitstag",
  "extras": {
    "transfer": {
      "id": "hrg-marsa",
      "name": "Flughafen Hurghada → Marsa Alam",
      "price": 85,
      "flight_details": {
        "arrival_date": "2026-02-01",
        "arrival_time": "14:30",
        "flight_number": "LH1234"
      }
    },
    "activities": [
      {
        "id": "activity-uuid",
        "name": "Schnorchel-Tour",
        "participants": 2,
        "price": 35,
        "total": 70
      }
    ]
  }
}

Response:

{
  "id": "booking-uuid",
  "status": "pending",
  "created_at": "2026-01-21T10:30:00Z"
}

POST /api/payments/create-checkout

Stripe Checkout Session erstellen.

Request Body:

{
  "booking_id": "booking-uuid",
  "amount": 1285,
  "currency": "eur",
  "description": "Red Sea Resort - Deluxe (7 Nächte) + Transfer",
  "customer_email": "max@example.com"
}

Response:

{
  "checkout_url": "https://checkout.stripe.com/c/pay/...",
  "session_id": "cs_..."
}

👤 Kunden-Endpoints

POST /api/customers/register

Neuen Kunden registrieren.

Request Body:

{
  "email": "kunde@example.com",
  "password": "sicheresPasswort123",
  "first_name": "Max",
  "last_name": "Mustermann",
  "phone": "+49123456789"
}

Response:

{
  "id": "customer-uuid",
  "email": "kunde@example.com",
  "token": "eyJhbGciOiJIUzI1NiIs..."
}

POST /api/customers/login

Kunden-Login.

Request Body:

{
  "email": "kunde@example.com",
  "password": "sicheresPasswort123"
}

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "customer": {
    "id": "customer-uuid",
    "email": "kunde@example.com",
    "first_name": "Max"
  }
}

GET /api/customers/bookings

Buchungshistorie des eingeloggten Kunden.

Headers:

Authorization: Bearer <token>

Response:

[
  {
    "id": "booking-uuid",
    "item_name": "Red Sea Resort - Deluxe",
    "check_in": "2026-02-01",
    "check_out": "2026-02-08",
    "total_price": 1285,
    "status": "confirmed"
  }
]

POST /api/reviews

Neue Bewertung erstellen (Auth erforderlich).

Headers:

Authorization: Bearer <token>

Request Body:

{
  "hotel_id": "hotel-uuid",
  "rating": 5,
  "comment": "Fantastisches Hotel, toller Service!"
}

Response:

{
  "id": "review-uuid",
  "status": "pending",
  "message": "Bewertung wird nach Freigabe veröffentlicht"
}

🏨 Hotel-Admin Endpoints

POST /api/hotel-admin/login

Hotel-Admin Login.

Request Body:

{
  "email": "admin@hotel.com",
  "password": "adminPasswort"
}

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "hotel_id": "hotel-uuid",
  "hotel_name": "Red Sea Resort"
}

GET /api/hotel-admin/hotel

Hotel-Daten des eingeloggten Admins.

Headers:

Authorization: Bearer <token>

POST /api/hotel-admin/rooms

Neues Zimmer erstellen.

Headers:

Authorization: Bearer <token>

Request Body:

{
  "name": "Superior Zimmer",
  "name_en": "Superior Room",
  "room_type": "sea_view",
  "capacity": 2,
  "price_per_night": 180,
  "description": "Elegantes Zimmer mit Meerblick",
  "amenities": ["AC", "TV", "Minibar", "Balkon"]
}

GET /api/hotel-admin/occupancy-stats/{hotel_id}

Auslastungs-Statistiken.

Response:

{
  "total_rooms": 50,
  "occupied_today": 35,
  "occupancy_rate": 70,
  "revenue_this_month": 45000,
  "bookings_this_month": 120
}

POST /api/hotel-admin/forgot-password

Passwort-Reset anfordern.

Request Body:

{
  "email": "admin@hotel.com"
}

👑 Super-Admin Endpoints

POST /api/super-admin/login

Super-Admin Login.

Request Body:

{
  "email": "admin@redseadreams.com",
  "password": "admin123"
}

PUT /api/super-admin/hotels/{hotel_id}/block

Hotel blockieren/freischalten.

Request Body:

{
  "blocked": true
}

PUT /api/super-admin/hotels/{hotel_id}/reset-password

Hotel-Admin Passwort zurücksetzen.

Request Body:

{
  "new_password": "neuesPasswort123"
}

🤖 AI Chatbot

POST /api/chatbot

Chat-Nachricht an AI senden.

Request Body:

{
  "message": "Welche Hotels empfehlen Sie in Marsa Alam?",
  "conversation_history": [
    {"role": "user", "content": "Hallo"},
    {"role": "assistant", "content": "Willkommen bei Red Sea Dreams!"}
  ]
}

Response:

{
  "response": "In Marsa Alam empfehle ich Ihnen das Red Sea Resort & Spa..."
}

❌ Fehler-Codes

Code Bedeutung
400 Bad Request - Ungültige Daten
401 Unauthorized - Nicht authentifiziert
403 Forbidden - Keine Berechtigung
404 Not Found - Ressource nicht gefunden
422 Validation Error - Validierungsfehler
500 Internal Server Error

Fehler-Format:

{
  "detail": "Beschreibung des Fehlers"
}

API Dokumentation erstellt: 21. Januar 2026