Repository navigation
Accept the daily Guestline uploads #89
Copy link
Copy link
Open
Labels
featureIntroduces a new and complete featureIntroduces a new and complete featurehotel dataGuestline PMS exports, parsers, upload endpoint and checksGuestline PMS exports, parsers, upload endpoint and checks
Description
Daily Rate Analysis and Rate Override were dropped (decision 0037), so this takes three reports: Daily New Reservations, Cancellations, and Actual & Forecast.
Problem
The upload endpoint only accepts one kind of export and asks for a base rate on every upload. The manager will upload several Guestline reports each day, and the rate already belongs to the hotel's room type.
Goal
The manager uploads the day's Guestline reports in one request; each file is recognised, checked and saved, and a bad file explains what's wrong without saving anything.
Scope
- One upload endpoint that takes several CSV files and works out which report each one is from its columns.
- Check every file before saving any; one bad file is a 422 naming the file, the column or row, and how to fix it.
- Save each file through the right parser in a background job, with progress per file.
- Report how many bookings, cancellations and nights each file added or updated.
- Drop the
base_ratefield; use the room type's rate set up during onboarding. - Uploading the same files again changes nothing.
- Not in scope: the upload screen (frontend).
Considerations
- Real exports differ from samples (encoding, date formats, extra or renamed columns). Accept extra columns; reject missing required ones.
- The daily files may overlap earlier uploads; upserts must handle that.
- Large one-off history uploads may need a longer job or chunking.
Acceptance criteria
- Uploading a day's sample files saves each to the right tables and reports counts per file.
- A file missing a required column returns 422 naming the file and column, and nothing is saved.
- An unrecognised file is rejected with a clear message.
- Uploading the same files twice doesn't duplicate data.
- Tests cover each report, mixed uploads and errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureIntroduces a new and complete featureIntroduces a new and complete featurehotel dataGuestline PMS exports, parsers, upload endpoint and checksGuestline PMS exports, parsers, upload endpoint and checks
Activity