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 optional
ID of the reservation. Required unless reservation_ids
reservation_ids string optional
You can optionally pass multiple comma-separated reservation IDs (max 50) in this parameter. If this parameter is passed, you may NOT pass any value in the parameter reservation_id
. To apply the same coupon code or coupon ID to all reservations, pass a single value in coupon_code
. For multiple values (different for each reservation), pass multiple comma-separated values corresponding to reservation_ids
passed in the parameters named coupon_codes
. Note that the JSON data returned by an API call with this parameter will be different. The 'data' key will be an array with reservation IDs as keys and the values corresponding to the standard output of this function (see the Output
section below) for given reservation ID.
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.
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.