How modifiers are applied
When you run a search, the pricing engine processes each modifier in ascendingsort_order. Modifiers that add surcharges (day-of-week, last-minute, extra-guest) are always applied. Discount modifiers (length-of-stay and early-bird) follow one rule:
Only one discount fires per booking — whichever eligible discount has the lowest sort_order wins. Any other eligible discount is skipped entirely.
This means if a rate plan offers both an early-bird discount and a length-of-stay discount, and you qualify for both, you’ll receive exactly one — the one configured with the lower sort order number.
Adjustment amounts come in two forms:
| Adjustment type | Meaning |
|---|---|
flat | A fixed amount in the room’s currency |
percent | A percentage of the applicable base price |
length_of_stay, early_bird), percent is calculated against the running subtotal (base prices plus any per-night surcharges already applied). For per-night modifiers (day_of_week, last_minute, extra_guest), percent is calculated against each night’s individual base_price.
The total_price in every search result reflects all applied modifiers. The applied_modifiers array tells you exactly which modifier types fired.
Modifier types
- Day of week
- Length of stay
- Early bird
- Last minute
- Extra guest
Day-of-week surcharge
This modifier adds a surcharge to specific days of the week — typically used to charge more for weekend nights. It fires per night independently, so only the nights that fall on a matching day of the week are affected.Trigger condition:days_of_week — an array of integers where 0 = Sunday and 6 = Saturday.| Day number | Day |
|---|---|
| 0 | Sunday |
| 1 | Monday |
| 2 | Tuesday |
| 3 | Wednesday |
| 4 | Thursday |
| 5 | Friday |
| 6 | Saturday |
[5, 6] (Friday and Saturday) with adjustment_type: flat and adjustment_value: 30.You book Monday 3 August to Sunday 9 August (6 nights):| Night | Day | Base price | Surcharge | Night total |
|---|---|---|---|---|
| Mon 3 Aug | 1 | €100 | — | €100 |
| Tue 4 Aug | 2 | €100 | — | €100 |
| Wed 5 Aug | 3 | €100 | — | €100 |
| Thu 6 Aug | 4 | €100 | — | €100 |
| Fri 7 Aug | 5 | €100 | +€30 | €130 |
| Sat 8 Aug | 6 | €100 | +€30 | €130 |
Day-of-week modifiers are evaluated against the calendar date of each individual night, not the booking date.
Modifier interaction: discount priority
When a rate plan has both alength_of_stay and an early_bird modifier and you qualify for both, only one fires. The engine processes modifiers in ascending sort_order and skips any second discount type once a discount has already been applied.
Example:
sort_order | Type | Trigger | Discount |
|---|---|---|---|
| 1 | early_bird | Book 30+ days ahead | −10% |
| 2 | length_of_stay | Stay 7+ nights | −5% |
early_bird has sort_order: 1, it fires first. The engine then skips length_of_stay since a discount has already been applied.
You receive the early-bird discount only.
Reverse the sort order numbers and the length-of-stay discount would win instead.
Surcharge modifiers (
day_of_week, last_minute, extra_guest) are never skipped. The one-discount rule applies exclusively to length_of_stay and early_bird.Summary reference
day_of_week
day_of_week
Type: Surcharge | Scope: Per nightAdds a surcharge to specific days of the week. Evaluated against the calendar date of each individual night.Trigger field:
days_of_week (array of integers, 0 = Sunday, 6 = Saturday)length_of_stay
length_of_stay
Type: Discount | Scope: Booking levelReduces total price when the stay meets a minimum night count. Applied against
subtotal. Subject to the one-discount-per-booking rule.Trigger field: min_nightsearly_bird
early_bird
Type: Discount | Scope: Booking levelReduces total price when you book far enough in advance. Applied against
subtotal. Subject to the one-discount-per-booking rule.Trigger field: days_before_arrivallast_minute
last_minute
Type: Surcharge | Scope: Per nightAdds a surcharge when you book close to arrival. Applied per night against each night’s
base_price. Always fires if eligible — not subject to the discount rule.Trigger field: days_till_arrivalextra_guest
extra_guest
Type: Surcharge | Scope: Per night × extra guestsAdds a per-night surcharge for each guest above
base_occupancy. Scales with the number of extra guests. Always fires if eligible — not subject to the discount rule.Trigger field: guests_above_base