For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ratehawk

Ratehawk API Integration complete video guide

πŸ“Œ Overview

This guide explains how to integrate the RateHawk API into your PHPTRAVELS-based travel booking system.

The integration allows you to:

  • Search hotels in real-time

  • Display hotel content locally (fast loading)

  • Process bookings with live pricing

  • Manage bookings with PNR confirmation


βš™οΈ 1. API Authentication & Setup

Steps:

  1. Register with RateHawk and get API access

  2. Collect the following credentials:

    • API Key

    • Key ID

    • Key Type

  3. Go to your admin panel:

  1. Enter your API credentials

  2. Click Test API Connection

βœ… Expected Result:

  • Search API working

  • Booking API working

  • Management API working


πŸ—„οΈ 2. Database Configuration

To handle large hotel data, a separate database is required.

Steps:

  1. Create a new database via:

    • CPanel / CloudPanel / Hosting Panel

  2. Save credentials:

    • Database Name

    • Username

    • Password

    • Host

  3. Add these details in your system settings

βœ… This ensures:

  • Secure connection

  • Better performance

  • Scalable data handling


πŸ“₯ 3. Database Import & Content Setup

RateHawk provides a large dataset (30GB+) for hotel content.

Steps:

  1. Download the database file from RateHawk or from our server https://modules.b-cdn.net/db.jsonl

  2. Rename file to:

  1. Upload file to:

  1. Go to Admin Panel β†’ Run Import Tool


⚠️ Important Notes

  • Import process can take 12–24+ hours

  • Depends on server performance

  • Keep process running (do not stop)

  • Recommended: Use VPS or dedicated server


πŸ” 4. Search, Pricing & Booking Flow

Once data is imported:

  • Uses local database for:

    • Hotel names

    • Images

    • Descriptions

    • Locations

πŸ‘‰ Result: Fast loading search results


πŸ’° Pricing & Availability

  • Pulled in real-time from RateHawk API

πŸ‘‰ Result: Accurate live pricing


πŸ›’ Booking Flow

  1. User selects hotel

  2. System fetches live rates

  3. Payment processed (e.g., Stripe)

  4. Booking confirmed

βœ… Output:

  • Booking status: Confirmed

  • PNR generated

  • Stored in admin panel


πŸš€ Best Practices

  • Use high-performance server (8GB+ RAM recommended)

  • Run import via CLI or background process

  • Enable caching for better speed

  • Monitor logs during import


πŸ’‘ Need a Ready Solution?

We provide a complete travel booking system with:

  • Hotels (RateHawk, Hotelbeds, Agoda)

  • Flights (Amadeus, Travelport, Duffel)

  • Tours (Viator, Tiqets)

  • Cars & Transfers

  • B2B + B2C system

πŸ‘‰ Book a free meeting: https://phptravels.com/meeting

Last updated