TicketUserServices

<back to all web services

DiscountCodeReportRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:ReadData
The following routes are available for this service:
POST/DiscountCodeReport

export class DiscountCodeReportRow
{
    public code?: string;
    public discountCodeTypeId?: number;
    public typeName?: string;
    public isPercent?: boolean;
    public percent?: number;
    public fixedAmount?: number;
    public redemptions?: number;
    public ticketCount?: number;
    public amountDiscounted?: number;
    public reversedRedemptions?: number;
    public reversedAmount?: number;
    public firstUsedAt?: string;
    public lastUsedAt?: string;

    public constructor(init?: Partial<DiscountCodeReportRow>) { (Object as any).assign(this, init); }
}

export class DiscountCodeReportResult
{
    public items?: DiscountCodeReportRow[];
    public ticketCountTotal?: number;
    public amountDiscountedTotal?: number;
    public statusCode?: number;
    public message?: string;

    public constructor(init?: Partial<DiscountCodeReportResult>) { (Object as any).assign(this, init); }
}

export class DiscountCodeReportRequest
{
    public ownerId?: number;
    public eventIds?: number[];

    public constructor(init?: Partial<DiscountCodeReportRequest>) { (Object as any).assign(this, init); }
}

TypeScript DiscountCodeReportRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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/csv
Content-Type: text/csv
Content-Length: length

{"ownerId":0,"eventIds":[0]}
HTTP/1.1 200 OK
Content-Type: text/csv
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-01T00:00:00.0000000","lastUsedAt":"0001-01-01T00:00:00.0000000"}],"ticketCountTotal":0,"amountDiscountedTotal":0,"statusCode":0,"message":"String"}