Best practice for handling Discount Codes in custom booking flow?

Dan - RCL
2 days ago
Joined Aug, 2025 4 posts

Hi there,

I'm working on a direct booking site and I'm stuck on the logic for discount codes.

When a guest enters a code (e.g., "SAVE10") in my checkout form, I want to validate it and update the total price immediately.

Does the API support a "lookup" endpoint to check if a code exists and is valid for the dates? Or is the standard workflow to simply push the code into the createQuote / updateQuote payload and handle the error if OwnerRez rejects it?

If it's the latter, could you point me to the specific property name I should include in the Quote model? I haven't been able to spot it in the swagger docs.

Thank you!

Steven C
yesterday
OR Team Member Joined Jun, 2021 42 posts

Hi Dan,

Great question, and you’re thinking about this exactly the right way.

There isn’t a standalone “lookup” endpoint just to validate discount codes on their own. The intended workflow is to pass the discount code into the pricing engine and let OwnerRez evaluate it in the context of the stay details.

You don’t have to create a real quote just to do this. The recommended approach is to use the TEST verb on the quotes endpoint.

When the guest enters a code like SAVE10, you can:

  • Call TEST /v1/quotes

  • Include the stay details in the request body

  • Pass the discount code as a query parameter, for example: ?discountCode=SAVE10

The TEST call runs full pricing and returns the calculated charges without saving anything. If the code is valid for the property, dates, and rules, you’ll see the discounted pricing reflected in the response. If it’s not valid, the pricing will come back unchanged or the response will indicate it couldn’t be applied.

When the guest is ready to book, you make the normal POST /v1/quotes call using the same approach. The discount code is again passed as a query string parameter, not as a field in the Quote JSON model. That’s why you won’t see it listed as a property in the API documentation.

In short:

  • There’s no separate discount code lookup endpoint

  • Use TEST quotes to validate and preview pricing

  • Pass discountCode in the query string, not in the request body

  • Reuse the same parameter when creating the actual quote

This is outlined more in this support doc:
https://www.ownerrez.com/support/articles/api-quote-bookings 
And the endpoints used are in the API Docs here:
https://api.ownerrez.com/help/v1/Api/TEST-v1-quotes_addCharges_skipRuleValidation_ignoreDateConflicts_discountCode 

Hope that helps!  If you need any more info let us know!