To allow certain users to get stuff cheaper.
You must have the financials
ConventionPrivilege to access this.
Discounts are accessed via /api/discount
.
See "Object Properties" in Introduction for basic shared properties.
Complete details in DiscountProperties. It also has these extra read-only properties:
Normally this is a private and editable field.
However,
if the discount's public
field is set to 1
then code is displayed as a read-only field available to everybody.
See "Related Objects" in Introduction for how to use them.
The Convention this discount belongs to.
See "Relationships" in Introduction for how to use them.
Manages the relationship between BadgeTypes and discounts.
The list of Badges that are using this discount.
The list of BadgeTypes allowed to use this discount.
The list of BoothAddOns using this discount.
The list of Booths using this discount.
Manages the relationship between BoothType and discount.
The list of BoothTypes that are allowed to use this discount.
The list of Tickets using this discount.
The services used to fetch and manipulate discounts.
Searching all discounts across conventions is no longer supported. To search on a single convention see "Relationships" in Convention.
POST /api/discount
Returns the same as a normal read.
GET /api/discount/xxx
Returns:
{ "id" : "xxx", "name" : "Veterans", ... }
PUT /api/discount/xxx
Returns the same as a normal read.
DELETE /api/discount/xxx
Returns:
{ "success" : 1 }
GET /api/discount/xxx/can-apply
Can be BadgeType
(for Badges), BoothOption
(for BoothAddons), BoothType
(for Booths), EventType
(for Tickets), Product
(for SoldProducts), or Sponsorship
(for Sponsors).
The ID
for an item of the above salesitem_type
.
Returns:
{ "can_apply" : 1 or 0 }
apply_to
FieldPUT /api/discount/xxx/add-apply-to
The apply_to
field contains JSON; to update it directly you must pass it a JSON-formatted string that contains all the sales item types to which you want the discount to apply. However, you can also use this handy endpoint to edit the field one sales-item type at a time.
Can be BadgeType
(for Badges), BoothOption
(for BoothAddons), BoothType
(for Booths), EventType
(for Tickets), Product
(for SoldProducts), or Sponsorship
(for Sponsors). Note the salesitem type strings are stored in lowercase.
Returns the same as a normal read.
apply_to
FieldPUT /api/discount/xxx/remove-apply-to
The apply_to
field contains JSON; to update it directly you must pass it a JSON-formatted string that contains all the sales item types to which you want the discount to apply. However, you can also use this handy endpoint to edit the field one sales-item type at a time.
Can be BadgeType
(for Badges), BoothOption
(for BoothAddons), BoothType
(for Booths), EventType
(for Tickets), Product
(for SoldProducts), or Sponsorship
(for Sponsors). The salesitem type strings are stored in lowercase, but the check for removal does not require you pass the type in lowercase.
Returns the same as a normal read.