Merge range rate data into availability-range and remove old rate endpoint
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s

This commit is contained in:
androidlover5842
2026-02-04 17:38:02 +05:30
parent 2950af3332
commit cb6fb94bf7
3 changed files with 13 additions and 86 deletions

View File

@@ -1004,6 +1004,7 @@ ROOM TYPE + ROOMS + ROOM IMAGES
What it does:
- Returns free rooms in date range.
- Includes per-room-type average rate (`averageRate`, `currency`, `ratePlanCode`).
- Uses forecast logic for active stays: if `toAt` is null, occupancy is considered up to booking `expectedCheckOutAt` (if present).
- Active stays with no expected checkout are treated as occupied.
@@ -1013,34 +1014,6 @@ ROOM TYPE + ROOMS + ROOM IMAGES
Query params:
- from=YYYY-MM-DD
- to=YYYY-MM-DD
- Allowed roles: property member.
Error Codes
- 400 Bad Request (invalid date/range)
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found (property)
- Availability with rate API is this one:
GET /properties/{propertyId}/rooms/available-range-with-rate
What it does:
- Returns available rooms with average rate over date range.
- Uses same forecast occupancy logic as availability-range.
Request body:
- None.
Query params:
- from=YYYY-MM-DD
- to=YYYY-MM-DD
- ratePlanCode (optional)