API - Planyo Web Services - modify_voucher

You are here: Planyo » सहायता » API » modify_voucher

modify_voucher

Description:

Use this function to modify an existing voucher identified by voucher_id. Voucher IDs are returned by the functions list_vouchers and create_voucher

Input:

voucher_id int required
ID of the existing voucher to be modified
quantity int optional
Maximum number of reservations which can use the voucher
voucher_code_prefix string optional
Voucher code. Depending on the parameter unique_codes, this is the entire code or the prefix followed by digits. Voucher code can only include alphanumeric characters, dash and underscore characters
discount_value string optional
Voucher discount. It can be expressed in percent (e.g. 20%) or as a fixed discount (e.g. 20.00)
reservation_start_time DateTime optional
First day of validity (meaning, the time when a reservation using the voucher can be entered into the system)
reservation_end_time DateTime optional
Last day of validity (after this date, reservations entered into the system can no longer use the voucher)
voucher_title string optional
Voucher description/title.
rental_start_time DateTime optional
If rental_start_time and rental_end_time are set, reservations using the voucher must have the rental duration between these two dates. E.g. this could be used for a stay during a specific holiday.
rental_end_time DateTime optional
If rental_start_time and rental_end_time are set, reservations using the voucher must have the rental duration between these two dates. E.g. this could be used for a stay during a specific holiday.
non_combinable bool optional
If set to true, customers will not be able to combine this voucher with other vouchers
is_one_per_customer bool optional
If set to true, then a single customer cannot use this voucher more than once
include_products bool optional
If set to true, the voucher expressed in percent will also apply to additional products being reserved
resources string optional
Comma-separated resource IDs for which the voucher can be used. To make the voucher usable for all resources of a site or metasite set this value to 'all', e.g &resources=all.
If you don't want to update resources, don't pass this field at all.
method string required
must be set to modify_voucher
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.

Output:

none

API playground:

Click here to test this function in the API playground.