You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the manager opens a night, they need to see why it's priced the way it is to trust or challenge it. The range route deliberately leaves out the explanation to stay small.
Goal
One endpoint returns everything about one night: the rate, its range, the factors behind it in euros, and the events affecting it.
Scope
A night detail endpoint, e.g. GET /hotels/{id}/recommendations/{date}.
The response:
rate, interval low and high, model version and when the snapshot was made;
the factor breakdown in €, with the base rate, so the factors add up to the rate;
the events affecting the night, in full;
the previous snapshot's rate and the change;
the manager's own rate and latest feedback, if any.
404 when the hotel has no trained model.
Descriptions and examples in the API docs.
Considerations
Factor names must make sense to a hotel manager (e.g. "Concert at 3Arena", "Saturday", "Rain"), not model column names.
Many small factors make the explanation hard to read; consider grouping those under a threshold into one "Other factors" line, keeping the total.
Acceptance criteria
The endpoint returns the rate, range, factors and events for a night.
Factors plus the base rate equal the rate.
The figures match the saved snapshot for that night.
Tests cover a night with and without events, and no trained model.
Activity