HomeGuidesRecipesAPI ReferenceChangelog
GuidesAPI ReferenceCustomer Help CenterLog In
These docs are for v2017-01-01. Click to read the latest docs for v2018-06-26.

Introduction

Sellers create coupons to offer discounts on bookings. There are two varieties of coupons which allow you to reduce the total booking value:

  • Discount: These are your traditional dollar amount or percentage off coupons. They allow a seller to specify rules around which the coupon value is calculated.
  • Unlock: Allows the consumer to specify an arbitrary order amount. Any discount value will be accepted as long as it does not reduce the total order amount below zero.

All coupons are applied to the order amount before tax.

Coupon Structure

Each Coupon object represents one campaign. Every coupon will have a name attribute indicating the name of the campaign for e.g. 'Xmas Discounts 2016', and within the campaign there will an array of codes any one of which can be used while creating a booking. A code is unique across all coupons and can only be used in one campaign.

Each coupon also contains an amount and a series of string variables like algorithm and type that describe how the discount is calculated. Coupon usage maybe restricted based on an arrival date schedule as defined by arrivalSchedule or based on the date the booking can be made, as defined in bookBySchedule.

A sample object maybe found in the documentation below

Rules to Calculate Coupon Discount Value

Discount coupons rely on the the type and algorithm attributes that determine how the coupon value is calculated.

  • algorithm: Determines if the calculation treats the amount as an absolute value or a percent value
  • type: Determines if the calculation is applicable per person (person) or a flat discount for the entire booking (discount)