Availability & Nightly Rates
Data Source
Nightly rates come from the channel_rate table (synced from PMS/channel manager):
| Column | Type | Description |
|---|---|---|
property_id | string | Property identifier |
channel_id | string | Sales channel |
date | date | Specific night |
nightly_rate | double | Base rate for that night |
inventory | int | Available units on that night |
Resolution Flow
resolveAllAsync(propertyIds, checkIn, checkOut)
↓
Query all rates for all properties in date range
↓
Group by propertyId
↓
For each property:
if nights_with_rates < total_nights_needed → UNAVAILABLE
minInventory = min(inventory across all nights)
if minInventory <= 0 → UNAVAILABLE
else → AVAILABLE with minInventory units and sorted nightly rates
PropertyAvailability
PropertyAvailability {
availableUnits: 4, // minimum inventory across all nights
nightlyRates: [
{ date: "2026-05-15", rate: 8500.0 },
{ date: "2026-05-16", rate: 9000.0 }
]
}
How It Affects Property Selection
- Properties with
availability.isAvailable() == falseare filtered out before strategy runs availableUnitscaps the maximum quantity the strategy can pick- Nightly rates are used for per-night price calculation (instead of static base price)
No Dates = No Availability Check
When no check-in/check-out dates are provided:
- All properties are treated as available
- Static base price is used instead of nightly rates
- No inventory check