Skip to main content
A reservation agent sometimes needs to grant a one-off discount that no configured offer covers: a goodwill gesture, a price match, or an incentive to close the booking, applied right before the guest pays. The Get a quote endpoint accepts two headers that apply this exceptional discount to the current basket and return the discounted totals.

Prerequisites

Before applying a discount, make sure you have:

How it works

The Get a quote endpoint (GET /v2/{sessionId}/quote) quotes the current basket. Two optional headers apply an exceptional discount on top of that price:
  • X-AVP-DiscountCalculationMode: how the discount is calculated.
  • X-AVP-DiscountValue: the amount or percentage to apply.
The calculation mode takes one of these values: The quote response carries the result in sellingConditions.discount, alongside the recomputed totals:
name and description are set by the API and cannot be changed: they carry a generic label, so treat them as read-only and do not depend on their exact wording. discountAmount gives the discount in both the requested display currency (converted) and the original currency before conversion (original). The discount you apply at this step is passed on to the D-EDGE platform and the connected PMS, where it appears as a generic exceptional-discount line.
The discount is applied on each call to Get a quote, not stored on the session. Send the headers again on the final quote the guest accepts, so the total they confirm is the discounted one. See Re-quote right before confirmation.

Apply the discount

The examples reuse the OAuth 1.0 signing setup from the Quick start. Replace {sessionId} with the session you created.
Read sellingConditions.discount to confirm the discount applied, and the recomputed totalAmount and balanceAmount to display the new price.

Tips

  • Cap the discount and gate large ones. Enforce your own maximum and an approval step before sending a high X-AVP-DiscountValue. The API applies whatever you send, so the guardrail is yours to build.
  • Log every discount. Record the mode, the value, and who approved it. An audit trail turns a later dispute into a quick lookup.
  • Re-quote before payment. Prices and availability move while the guest fills in their details. Send the discount headers again on the final quote so the confirmed total matches what the guest agreed to.

Get a quote

Full schema for the quote endpoint and its headers.

Best practices

Session, funnel, and resilience patterns.