Skip to main content
Hotel API · Post-booking repricing

Post-booking hotel repricing with an API

Post-booking hotel repricing means re-shopping a refundable reservation after it is booked and, if the same room drops in price before the free-cancellation deadline, booking the cheaper rate and cancelling the original. With the Tripgic Hotel API you run it with the same search, price-check, book and cancel calls you already use, and keep the difference.

Hotel rates move after booking. OTAs, TMCs and B2B portals that re-shop refundable stays turn those moves into margin — or pass the saving to the traveller.

Last updated

The repricing loop, call by call

No separate product to buy: repricing is a scheduled job on top of the hotel calls your booking flow already uses.

StepHotel API callWhat your job does
1. Pick candidates/hotel/booking-detailsList confirmed bookings that are refundable and still before their free-cancellation deadline.
2. Re-shop/hotel/search · /hotel/roomsSearch the same property, dates and room mix, and list its current rooms and rate plans.
3. Match like for like—Keep only rates with the same room type, board, occupancy and equal or better cancellation terms.
4. Confirm the price/hotel/validateRe-confirm the cheaper rate and its cancellation policy right before acting.
5. Book the new rate/hotel/create · /hotel/issue-voucherCreate the new reservation and issue its voucher first.
6. Cancel the original/hotel/cancel-bookingCancel the old booking only after the new one is confirmed.

Endpoint names as listed in the hotel booking API flow. Field-level detail is in the API documentation once you have sandbox credentials.

Eligibility rules that keep repricing safe

Original must be refundable

Only re-shop bookings you can cancel free of charge. A non-refundable original cannot be swapped.

Leave a buffer before the deadline

Stop re-shopping a safe margin before the free-cancellation deadline so the cancel call never lands late.

Same room, board and guests

Match room type, meal plan, occupancy and dates. A cheaper room that is not the same room is not a saving.

Equal or better cancellation terms

Do not swap a refundable rate for a non-refundable one unless your policy allows it.

Compare totals after fees

Compare the full price of the new booking with the original, net of any charge on the cancelled one.

Set a minimum saving

Ignore drops below a threshold, so small moves do not create churn for guests and hotels.

Decision logic

A minimal version of the rule your scheduled job applies to each candidate booking.

for booking in refundable_bookings():
    if now() > booking.free_cancel_until - SAFETY_BUFFER:
        continue                                  # too close to the deadline
    offers = reshop(booking.hotel, booking.dates, booking.rooms)
    match = cheapest(o for o in offers
                     if o.room_type == booking.room_type
                     and o.board == booking.board
                     and o.occupancy == booking.occupancy
                     and o.refundable and o.free_cancel_until >= booking.free_cancel_until)
    if not match:
        continue
    saving = booking.total - price_check(match).total
    if saving < MIN_SAVING:
        continue
    new = book(match)                             # confirm the new booking first
    if new.confirmed:
        cancel(booking)                           # then release the original
        notify_traveller(new)

Pseudo-code. Map each step to the Hotel API calls above.

How often to re-shop

Every re-shop is a search, and search traffic on Tripgic is governed by your plan’s look-to-book ratio — 1,500:1 on Starter, 2,500:1 on Growth and 3,000:1 on Enterprise. A sensible pattern is to check each eligible booking about once a day, more often in the last few days before its cancellation deadline, and to skip stays that are already non-refundable or too close to the deadline.

Each successful rebooking also counts as a new booking with its own flat markup (USD 3 per night on Growth, USD 2 on Enterprise), so set your minimum saving above that. Plan details are on the pricing page.

Pitfalls to design around

Room-mapping mismatches

Suppliers name the same room differently. Normalize room types before matching, or you will swap a sea-view room for a garden-view one.

Hotel room mapping guide

New confirmation numbers

The traveller gets a new voucher and confirmation number. Send it straight away and keep the old reference on file.

Special requests

Bed-type requests, late arrival notes and loyalty numbers attached to the original booking must be re-sent with the new one.

Supplier terms

Some rates carry conditions on rebooking. Respect the rate rules returned with each offer and your agreement with Tripgic.

Frequently asked questions

What is post-booking hotel repricing?

Post-booking hotel repricing is re-shopping a refundable hotel reservation after it has been booked. If the same room, board and occupancy becomes cheaper before the free-cancellation deadline, you book the new rate and cancel the original, keeping the difference.

Does Tripgic offer a hotel repricing API?

Yes, through the standard Hotel API. You re-run search and price check for the same stay, and if a lower rate appears before the cancellation deadline you book it and cancel the original booking through the same API — no separate product is needed.

Which bookings can be repriced?

Only refundable bookings that are still before their free-cancellation deadline, with a safety buffer. The cheaper offer must be the same room type, meal plan, occupancy and dates, with equal or better cancellation terms.

Should I book the new rate or cancel the old one first?

Book and confirm the new rate first, then cancel the original. Cancelling first risks losing the room if the cheaper rate disappears between the two calls.

How often should I re-shop a hotel booking?

About once a day per eligible booking, and more often close to the cancellation deadline, is a common pattern. Every re-shop is a search that counts towards your plan's look-to-book ratio, so focus on refundable stays with enough time left.

Who keeps the saving from hotel repricing?

You decide. OTAs and B2B portals usually keep it as extra margin; corporate travel platforms often pass it back to the company or traveller. Either way, set a minimum saving above the per-night markup charged on the new booking.

Build hotel repricing on one API

2M+ hotels from 50+ suppliers, with price check, booking and cancellation in one normalized REST API. Sandbox credentials at no charge.

Book a kick-off call