Discount

To allow certain users to get stuff cheaper. You must have the financials ConventionPrivilege to access this. Discounts are accessed via /api/discount.

Properties

See "Object Properties" in Introduction for basic shared properties.

Complete details in DiscountProperties. It also has these extra read-only properties:

code

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.

Related Objects

See "Related Objects" in Introduction for how to use them.

convention

The Convention this discount belongs to.

Relationships

See "Relationships" in Introduction for how to use them.

badgetypediscounts

Manages the relationship between BadgeTypes and Discounts.

badges

The list of Badges that are using this discount.

badgetypes

The list of BadgeTypes allowed to use this discount.

boothaddons

The list of BoothAddOns using this discount.

booths

The list of Booths using this discount.

boothtypediscounts

Manages the relationship between BoothType and Discount.

boothtypes

The list of BoothTypes that are allowed to use this discount.

tickets

The list of Tickets using this discount.

Services

The services used to fetch and manipulate discounts.

Search Discounts

This will search across all conventions. To search on a single convention see "Relationships" in Convention.

 GET /api/discount
Optional Params
query

Searches a partial name.

Returns:

 {
    "paging" : {...},
    "items" : [
        {
          "id" : "xxx",
          "name" : "Veterans",
          ...
        },
        ...
    ]
 }

Create Discount

 POST /api/discount
Required Params
convention_id
name

Returns the same as a normal read.

Read Discount

 GET /api/discount/xxx

Returns:

 {
   "id" : "xxx",
   "name" : "Veterans",
   ...
 }

Update Discount

 PUT /api/discount/xxx

Returns the same as a normal read.

Delete Discount

 DELETE /api/discount/xxx

Returns:

 {
   "success" : 1
 }

Check Discount Can Be Used for Specific Sales Item

 GET /api/discount/xxx/can-apply
Required Params
salesitem_type

Can be BadgeType (for Badges), BoothOption (for BoothAddons), BoothType (for Booths), EventType (for Tickets), Product (for SoldProducts), or Sponsorship (for Sponsors).

salesitem_id

The ID for an item of the above salesitem_type.

Returns:

 {
   "can_apply" : 1 or 0
 }