Developers Information - API & Web Services

API Method /discount_update

This method update an existing discount code. Only the fields passed as arguments will be modified. This method returns the ID of the modified discount code.

Arguments

authentication
This method controls access via required user authentication.
id integer
The discount ID to update.
codestring
The discount code. Spaces, apostrophes and non-alphanumeric characters are not allowed, except for dashes and underscores. Examples: "earlybirdspecial_08", "membersonly", "dc121232".
amount_off float
The fixed amount off the ticket price. Each discount code can have a fixed discount amount or a variable (percentage) discount amount, but not both
percent_off float
The percentage off the ticket price. Each discount code can have a fixed discount amount or a variable (percentage) discount amount, but not both
tickets string
Comma-separated list of ticket IDs for which the discount applies. If not provided, the discount will apply to all ticket types.
quantity_availableinteger
Maximum number of times this discount can be used. If not provided, no maximum is set.
start_date string
The discount start date and time, in ISO 8601 format (e.g., "2007-12-31 23:59:59").
end_date string
The discount end date and time, in ISO 8601 format (e.g., "2007-12-31 23:59:59").

Example Request

https://www.eventbrite.com/xml/discount_update?...&id=5462134&code=Discount_005&amount_off=10.0&start_date=2009-12-12 13:00:00&quantity=100 https://www.eventbrite.com/xml/discount_update?...&id=5462138&code=Discount_006&percent_off=15&end_date=12-0-0&quantity=200 https://www.eventbrite.com/xml/discount_update?...&id=4621384&code=Discount_007&percent_off=15

Output Parameters

This method returns XML with the following structure:

id integer
The discount ID.
status string
Processing status.
message string
Processing message.

Example XML Response

<?xml version="1.0" encoding="utf-8" ?>
<process>
	<id>908163459</id>
	<message>discount_update : complete</message>
	<status>ok</status>
</process>

Error Codes

This method may return these errors in an error document:

Authentication Error
The specified user was not found or the login credentials didn't match.
Discount error
Please Please enter a valid discount code.
Discount error
Spaces, apostrophes and non-alphanumeric characters (except "-" and "_") are not allowed.
Discount error
The discount ID is missing or invalid.
Date error
The start date is invalid or in the past : required Format is (YYYY-MM-DD HH:MM:SS).
Date error
The end date is invalid or in the past : required Format is (YYYY-MM-DD HH:MM:SS).
Date inconsistent
The discount date cannot end before it starts.
Date inconsistent
Start discount date greater than Event's ending date.
Date inconsistent
End discount date greater than Event's ending date.
Amount error
Invalid amount off ticket price(numeric, Float).
Percentage error
Invalid percentage off ticket price(numeric, Float).
Quantity error
Invalid Quantity of discount code (numeric).
Discount error
Please enter either an amount or a percentage off the ticket price.
Code error
The discount code "xxxxx" is already in use.