Skip Main Navigation
Page Content

Cross Event Discounts

GET /discounts/:discount_id/

Returns the cross_event_discount with the specified :discount_id.

Parameters

Takes no parameters

Errors

  • NOT_AUTHORIZED: The authenticated user does not have the required permissions to manage discounts.

POST /discounts/

Creates a discount. Returns the created cross_event_discount.

The following conditions define the span of the discount’s effect:

  • If event_id is provided and ticket_class_ids is not provided, a single-event discount for all the tickets in the event is created.
  • If both event_id and ticket_class_ids are provided, a single-event discount for the specified event tickets is created.
  • If ticket_group_id is provided, a cross-event discount for the specified ticket group is created.
  • If neither event_id nor ticket_group_id are provided, a discount that applies to all the events and all tickets of the user is created. This means that the discount will apply to future events also.

Notes:

  • Public and coded discounts can have either an amount off or a percentage off, but not both. Access codes cannot have an amount or percentage off.
  • Public discounts should not contain apostrophes or non-alphanumeric characters (except “-”, “_”, ” ”, “(”, ”)”, “/”, and “”).
  • Coded discounts and access codes should not contain spaces, apostrophes or non-alphanumeric characters (except “-”, “_”, “(”, ”)”, “/”, and “”).
  • If the start_date and start_date_relative are null or empty, that means that the discount is usable effective immediately.
  • If the end_date and end_date_relative are null or empty, that means that the discount is usable until the event finishes.
  • If start_date_relative is provided, the discount will be usable after the given number of seconds prior to the event start.
  • If end_date_relative is provided, the discount will be usable until the given number of seconds prior to the event start.
  • Discount for series events should be associated with the parent event, not its children.

Parameters

Name Type Required Description
discount.code string Yes Code used to activate discount.
discount.type string No The type of discount. (Valid choices are: access, hold, coded, or public)
discount.amount_off string No Fixed reduction amount.
discount.percent_off string No Percentage reduction.
discount.event_id string No ID of the event. Only used for single event discounts.
discount.ticket_class_ids list No IDs of tickets to limit discount to.
discount.quantity_available integer No Number of discount uses.
discount.start_date string No Allow use from this date. A datetime represented as a string in Naive Local ISO8601 date and time format, in the timezone of the event.
discount.start_date_relative integer No Allow use from this number of seconds before the event starts. Greater than 59 and multiple of 60.
discount.end_date string No Allow use until this date. A datetime represented as a string in Naive Local ISO8601 date and time format, in the timezone of the event.
discount.end_date_relative integer No Allow use until this number of seconds before the event starts. Greater than 59 and multiple of 60.
discount.ticket_group_id string No ID of the ticket group.
discount.hold_ids list No IDs of holds this discount can unlock.

Errors

  • AMOUNT_AND_PERCENT_OFF_PROVIDED: Cannot provide discount.amount_off and discount.percent_off at the same time.
  • END_DATE_AND_END_DATE_RELATIVE_PROVIDED: Cannot provide discount.end_date and discount.end_date_relative at the same time.
  • INVALID
  • MULTI_EVENT_DISCOUNT_NOT_SUPPORTED: Creating Public, Cross-Event Discounts is forbidden at this time.
  • START_DATE_AND_START_DATE_RELATIVE_PROVIDED: Cannot provide discount.start_date and discount.start_date_relative at the same time.

Argument Errors

  • discount.code - REQUIRED: The discount.code is required.
  • discount.code - DUPLICATE: The discount.code already exists.
  • discount.code - INVALID: The discount.code has invalid characters.
  • discount.discount_type - REQUIRED: The discount.discount_type is required.
  • discount.amount_off - REQUIRED: The discount.amount_off is required if discount.percent_off is not present.
  • discount.amount_off - INVALID: The discount amount should be a decimal number.
  • discount.percent_off - REQUIRED: The discount.percent_off is required if discount.amount_off is not present.
  • discount.percent_off - INVALID: The discount percentage off should be a decimal number.
  • discount.start_date - INVALID: The value provided for discount.start_date does not conform to ISO 8601.
  • discount.end_date - INVALID: The value provided for discount.end_date does not conform to ISO 8601.

Example request

POST Create single event coded discount
https://www.eventbriteapi.com/v3/discounts/

JSON Data example:

{
    "discount": {
        "code": "summer2018",
        "event_id": "3339494556677",
        "type": "coded",
        "amount_off": "5.00"
    }
}
{
    "discount": {
        "code": "summer2018",
        "event_id": "3339494556677",
        "type": "coded",
        "percent_off": "15.00",
        "start_date": "2018-01-01T10:00:00",
        "end_date": "2018-01-01T10:00:00"
    }
}

Returns a cross_event_discount

POST Create cross event coded discount
https://www.eventbriteapi.com/v3/discounts/

JSON Data example:

{
    "discount": {
        "code": "summer2019",
        "ticket_group_id": "4567",
        "type": "coded",
        "percent_off": "10.50"
    }
}
{
    "discount": {
        "code": "summer2019",
        "ticket_group_id": "4567",
        "type": "coded",
        "percent_off": "10.50",
        "start_date_relative": 3600,
        "end_date_relative": 86400
    }
}

Returns a cross_event_discount

POST /discounts/:discount_id/

Updates the discount with the specified :discount_id. Returns the updated cross_event_discount. The fields sent are the ones that are going to be updated, the fields that are not sent will be unchanged. The same conditions and notes for the discount creation apply.

Parameters

Name Type Required Description
discount.code string No Code used to activate discount.
discount.amount_off string No Fixed reduction amount.
discount.percent_off string No Percentage reduction.
discount.ticket_class_ids list No IDs of tickets to limit discount to.
discount.quantity_available integer No Number of discount uses.
discount.start_date string No Allow use from this date. A datetime represented as a string in Naive Local ISO8601 date and time format, in the timezone of the event.
discount.start_date_relative integer No Allow use from this number of seconds before the event starts. Greater than 59 and multiple of 60.
discount.end_date string No Allow use until this date. A datetime represented as a string in Naive Local ISO8601 date and time format, in the timezone of the event.
discount.end_date_relative integer No Allow use until this number of seconds before the event starts. Greater than 59 and multiple of 60.
discount.hold_ids list No IDs of holds this discount can unlock.

Errors

  • AMOUNT_AND_PERCENT_OFF_PROVIDED: Can not provide discount.amount_off and discount.percent_off at the same time.
  • END_DATE_AND_END_DATE_RELATIVE_PROVIDED: Can not provide discount.end_date and discount.end_date_relative at the same time.
  • INVALID
  • START_DATE_AND_START_DATE_RELATIVE_PROVIDED: Can not provide discount.start_date and discount.start_date_relative at the same time.

Argument Errors

  • discount.code - DUPLICATE: The discount.code already has been used.
  • discount.code - INVALID: The discount.code has invalid characters.
  • discount.amount_off - REQUIRED: The discount.amount_off is required if discount.percent_off is not present.
  • discount.amount_off - INVALID: The discount amount should be a decimal number.
  • discount.percent_off - REQUIRED: The discount.percent_off is required if discount.amount_off is not present.
  • discount.percent_off - INVALID: The discount percentage off should be a decimal number.
  • discount.start_date - INVALID: The value provided for discount.start_date does not conform to ISO 8601.
  • discount.end_date - INVALID: The value provided for discount.end_date does not conform to ISO 8601.

DELETE /discounts/:discount_id/

Deletes the cross_event_discount with the specified :discount_id. Only unused discounts can be deleted.

Warning: The discount cannot be restored after deletion.

Parameters

Takes no parameters

Errors

  • DISCOUNT_CANNOT_BE_DELETED: A discount that has been used cannot be deleted.
  • NOT_AUTHORIZED: The authenticated user does not have the required permissions to manage discounts.