Skip to main content
A side-by-side comparison of public rate versus member rate is the strongest argument for joining your loyalty programme. Two Best Price Rates calls give you both prices; the difference becomes the headline number in your widget.

Prerequisites

Before building a member rate widget, make sure you have:
  • A working Best Price call. If not, follow the Quick start first.
  • A hotel ID and a group ID.
  • A target date or date window.
  • An active loyalty programme on the property, configured by D-EDGE.

How it works

The Best Price Rates endpoint returns one entry per rate and requested strategy, with the best price found over your date window and the arrival date it applies to. The loyaltyProgram filter tells the API which membership tier to consider when picking the best rate:
  • Without loyaltyProgram (or membershipLevel: 0): the API returns rates open to non-members. The cheapest is your public BAR.
  • With loyaltyProgram: { membershipLevel: N }: the API includes rates restricted to members at tier N. The cheapest is your member rate at that tier.
Run both calls in parallel, pick the cheapest entry from each response, and the difference is the saving you headline to non-members.

Build the showcase

The examples below assume the OAuth signing setup from the Quick start.
1

Run a public and a member call in parallel

Same date range, same party in both calls. The only difference is the loyaltyProgram filter on the member call.
2

Pick the cheapest entry from each response

For each response, filter to entries where status is Available or OnRequest and pick the smallest totalPrice. That entry carries the headline price for its side of the comparison.
3

Render the comparison

Display both prices with the saving as the headline. If the member rate is not better than the public rate (rare but possible), hide the saving line rather than showing zero or negative.

Tips

  • Match every other parameter between the two calls. Date range, party, room filter, currency. Any difference there contaminates the comparison.
  • Pick the right tier to compare against. Most chains run a basic entry-level tier (1) and elite tiers above (2, 3, etc., typically Silver or Gold). For the entry-point widget, tier 1 is the right choice: it sets the floor a non-member crosses by signing up. Showcase higher tiers separately on the loyalty programme page.
  • Cache both calls. Use a key that includes the membership level. The same widget refreshed across many visitors hits the cache and stays fast.
  • Handle the no-saving case. Some dates have no member-only deal active. If the member rate matches or exceeds the public rate, hide the saving label rather than showing “save €0”, which undermines the value prop.
  • Be transparent about what is included. If your public rate excludes breakfast and the member rate includes it, surface that in the comparison. Otherwise the visitor feels misled when they reach the booking step.

Reference

Full schema for the Rates endpoint.

Best practices

Caching, performance, and resilience patterns.