feat: add bookable flag to product export rooms
This commit is contained in:
1 parent
2b27b9809d
commit
0ff312c0c0
10 files changed
+126
-28
No files matched your search
@@ -268,6 +268,13 @@ page-consistency rule as `GET /api/exports/travels` above; only the rows differ.
|
||||
`Buchungsstop` rooms and services, rooms without a price and boarding points with id `0` are all emitted. Which of
|
||||
them a website shows, and how, is the client's rule, not this endpoint's.
|
||||
|
||||
**Which rooms can be booked.** Each room carries `bookable`, the one derived field: `true` exactly when the
|
||||
booking flow offers the room for a new booking. That is status `Frei` with `available` above 0. A room on request
|
||||
(`Anfrage`) is not bookable even with rooms left, because booking it would only produce an inquiry; neither is a
|
||||
room with `available` 0 or `null`. Show a room that is not bookable as sold out and do not count it towards places
|
||||
or the "ab" price. Read `bookable` rather than deriving it from `status` and `available`, so a change to the rule
|
||||
reaches you without a client change.
|
||||
|
||||
At current volumes the export is ~420 rows and ~3.8 MB of JSON (a row is 4–24 kB), so the default `perPage=500`
|
||||
returns it in one page.
|
||||
|
||||
@@ -313,6 +320,7 @@ returns it in one page.
|
||||
"price": 229,
|
||||
"available": 24,
|
||||
"status": "Frei",
|
||||
"bookable": true,
|
||||
"boardCode": "Lt. Auss.",
|
||||
"boardBusProId": 2
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user