| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | ReadData |
| POST | /DiscountCodeReport |
|---|
import Foundation
import ServiceStack
public class DiscountCodeReportRequest : Codable
{
public var ownerId:Int?
public var eventIds:[Int] = []
required public init(){}
}
public class DiscountCodeReportResult : Codable
{
public var items:[DiscountCodeReportRow] = []
public var ticketCountTotal:Int?
public var amountDiscountedTotal:Double?
public var statusCode:Int?
public var message:String?
required public init(){}
}
public class DiscountCodeReportRow : Codable
{
public var code:String?
public var discountCodeTypeId:Int?
public var typeName:String?
public var isPercent:Bool?
public var percent:Double?
public var fixedAmount:Double?
public var redemptions:Int?
public var ticketCount:Int?
public var amountDiscounted:Double?
public var reversedRedemptions:Int?
public var reversedAmount:Double?
public var firstUsedAt:Date?
public var lastUsedAt:Date?
required public init(){}
}
Swift DiscountCodeReportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DiscountCodeReport HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ownerId: 0,
eventIds:
[
0
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
items:
[
{
code: String,
discountCodeTypeId: 0,
typeName: String,
isPercent: False,
percent: 0,
fixedAmount: 0,
redemptions: 0,
ticketCount: 0,
amountDiscounted: 0,
reversedRedemptions: 0,
reversedAmount: 0,
firstUsedAt: 0001-01-01,
lastUsedAt: 0001-01-01
}
],
ticketCountTotal: 0,
amountDiscountedTotal: 0,
statusCode: 0,
message: String
}