API Method discount_update

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

Request Parameters

Name description
id The discount ID to update.
code The discount code. Spaces, apostrophes and non-alphanumeric characters are not allowed, except for dashes and underscores. Examples: “earlybirdspecial_08″, “membersonly”, “dc121232″.
amount_off 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 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 Comma-separated list of ticket IDs for which the discount applies. If not provided, the discount will apply to all ticket types.
quantity_available Maximum number of times this discount can be used. If not provided, no maximum is set.
start_date The discount start date and time, in ISO 8601 format (e.g., “2007-12-31 23:59:59″).
end_date The discount end date and time, in ISO 8601 format (e.g., “2007-12-31 23:59:59″).

Example Request URL

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

Example Response

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

Method-Specific Errors

More information about error-handling and common error messages are available in our error docs.

error_type error_message
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.

Usage Notes

Authentication
required
Rate-limited
Yes
Output formats
JSON, XML

Related Methods