# Room Rates Push
The Room Rates Push service allows you to receive real-time updates about room rates and availability directly from hotels. This service is part of our Smart Feed API and provides instant notifications when rates change.
# Authentication & Authorization
It follows standard UBIO authentication and authorization process. Please refer to the authentication documentation for more details.
# Common Response Codes
200 OK- Request successful400 Bad Request- Invalid request parameters401 Unauthorized- Invalid or missing authentication403 Forbidden- Valid authentication but insufficient permissions404 Not Found- Resource not found500 Server Error- Internal server error
# Push Request Structure
| Field | Type | Description |
|---|---|---|
hotelId | string | Unique identifier for the hotel |
checkIn | string | Check-in date in YYYY-MM-DD format |
nights | number | Number of nights for the stay |
guests | array | Array of guest numbers for each room |
rooms | array | Array of room objects with updated rates |
# How It Works
- Hotels send real-time updates about room rates and availability
- Updates are pushed to your configured endpoint
- Your system processes the updates and updates its database
- Changes are immediately reflected in your application
# Client Requirements
- Must have a publicly accessible HTTPS endpoint
- Must respond within 5 seconds
- Must handle concurrent requests
- Must implement proper error handling
- Must validate incoming data
- Must acknowledge receipt of updates
# Important Data Handling Guidelines
- Complete State Updates: Each push request contains the complete state for the specified hotel and date range
- Empty Room Sets: An empty rooms array indicates no availability
- Rate Changes: All rate changes must be processed immediately
- Data Validation: Validate all incoming data before processing
- Error Handling: Implement proper error handling for malformed requests
- Idempotency: Handle duplicate updates gracefully
- Concurrency: Process concurrent updates correctly
- Data Persistence: Store updates reliably
# Request Format
# Headers
Authorization(string, required): The basic authorization header to authorize against the API.- Format:
Authorization: Basic {base64_encoded_credentials} - Example:
Authorization: Basic QVBJX0tFWTo=
Note: You must include valid API credentials encoded in base64 format. Contact your system administrator for proper authentication credentials.
- Format:
# Request Body
{
"hotelId": "string",
"checkIn": "string",
"nights": "number",
"guests": ["number"],
"rooms": [
{
"name": "string",
"id": "string",
"description": "string",
"capacity": "number",
"rates": [
{
"rateId": "string",
"price": "number",
"currency": "string",
"cancellationPolicy": "string",
"boardBasis": "string",
"available": "boolean"
}
]
}
]
}
# Example Push Request
{
"hotelId": "hotel-id-333",
"checkIn": "2024-03-20",
"nights": 2,
"guests": [2],
"rooms": [
{
"name": "Deluxe Room",
"id": "room-123",
"description": "Spacious room with city view",
"capacity": 2,
"rates": [
{
"rateId": "rate-456",
"price": 150.00,
"currency": "USD",
"cancellationPolicy": "Free cancellation until 24h before check-in",
"boardBasis": "Room Only",
"available": true
}
]
}
]
}
# Response Requirements
Your endpoint must respond with:
- HTTP 200 OK for successful processing
- HTTP 400 Bad Request for invalid data
- HTTP 500 Server Error for processing failures
# Example Success Response
{
"status": "success",
"message": "Update processed successfully"
}
# Example Error Response
{
"status": "error",
"message": "Invalid request data",
"details": {
"field": "price",
"error": "Price must be greater than 0"
}
}
# Related Endpoints
- List of Hotels - Get all available hotels
- Single Hotel - Get detailed information about a specific hotel
- Room Rates - Get pricing information for hotel rooms
- Hotel Bookings - Make and manage hotel bookings