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.
This will search across all conventions. To search on a single convention see "Relationships" in Convention.
GET /api/discount
Searches a partial name.
Returns:
{ "paging" : {...}, "items" : [ { "id" : "xxx", "name" : "Veterans", ... }, ... ] }
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 }