apply_coupon (version 1)
Use this function to apply a coupon to an existing reservation. Coupon is passed as either the coupon_id or coupon_code parameter. Please note that coupons can be only applied to unconfirmed reservations.
reservation_id int required
ID of the reservation
coupon_code string optional
Coupon code. If coupon_id is passed, this parameter is ignored.
coupon_id int optional
Numeric coupon ID. You can get the coupon ID from the results of the list_coupons
function. This parameter is optional, and, if not passed, the precise coupon ID will be detected based on coupon_id and/or customer's email address.
version float optional
you can optionally specify the version of the API that you're using. Use the value of latest or simply skip this parameter to use the latest API version. The latest version is: 1
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key
. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp
ID of the coupon which was applied
Reservation status from user's perspective
Click here to test this function in the API playground.