# Developer Guide

The purpose of this document is to provide the technical API specifications required for demand partners to integrate with the RG SMART Distribution system.

The Smart Distribution API by RateGain provides a robust, scalable, and real-time interface for accessing hotel inventory, pricing, and reservation functionality. Designed for travel companies, OTAs, wholesalers, and B2B booking engines, it enables seamless integration with RateGain’s Smart Distribution platform to perform operations like destination search, hotel discovery, product availability, booking, and cancellations.

***

### **Core Features**

* **Destination Search**: Retrieve a list of available destinations using `getDestinations`.
* **Hotel Search**: Get the best available properties and pricing in a destination (`getBestProperty`).
* **Product Retrieval**: Access room types, rates, and amenities for a specific hotel (`getproducts`).
* **Reservation Management**: Make bookings (`CreateReservation`) and cancel them (`CancelReservation`) programmatically.
* **Secure Access**: API Key-based authentication ensures secure and authorized access to endpoints.

***

### **Integration Workflow**

1. Authenticate using the provided `ApiKey` and `ApiSecret`.
2. Fetch Destinations using `getDestinations`.
3. Search Hotels in a specific destination using `getBestProperty`.
4. Retrieve Room Products for a selected property using `getproducts`.
5. Create Reservation with traveler and payment details.
6. Cancel Booking if needed using `CancelReservation`.

***

### **Benefits**

* Real-time availability and pricing
* Flexible search based on dates and occupancy
* Simplified reservation flow
* Reliable response structure for easy integration
* Scalable architecture for high-volume travel applications


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.rategain.com/our-products/smart-distribution/developer-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
