TicketUserServices

<back to all web services

PreviewDiscountRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequires the permission:ReadData
The following routes are available for this service:
POST/ticketOrder/previewDiscount
PreviewDiscountRequest Parameters:
NameParameterData TypeRequiredDescription
CodebodystringNo
EventIdbodyint?No
FullPhoneNumberbodystringNo
OrderDetailsbodyList<TicketDetails>No
TicketDetails Parameters:
NameParameterData TypeRequiredDescription
IDformintNo
TicketIdformintNo
EventSeriesTicketTypeformint?No
EventSeriesOwnerTicketTypeformint?No
TicketPriceformdecimalNo
TotalPriceformdecimalNo
CountformintNo
TicketColorformstringNo
ShowUsedTicketsformbool?No
TicketNameformstringNo
TicketDisplayStringformstringNo
TicketDetailsTransferredFromformint?No
TeamPassIdformint?No
IsSpecialTicketformbool?No
SpecialTicketIdformstringNo
JustChangedBySQLformbool?No
SQLJustChangedTimeStampformDateTime?No
CurrencyformstringNo
DiscountCodeformstringNo
TotalDiscountformdecimal?No
TotalAmountBeforeDiscountformdecimal?No
TicketPriceBeforeDiscountformdecimal?No
PreviewDiscountResult Parameters:
NameParameterData TypeRequiredDescription
StatusformstringNo
ReasonformstringNo
MessageformLocalizedMessageNo
DiscountCodeIdformint?No
DiscountCodeTypeIdformint?No
DiscountformDiscountSummaryNo
LinesformList<DiscountLineResult>No
SubtotalBeforeformdecimalNo
SubtotalAfterformdecimalNo
TotalSavingsformdecimalNo
CurrencyformstringNo
StatusCodeformintNo
LocalizedMessage Parameters:
NameParameterData TypeRequiredDescription
IsformstringNo
EnformstringNo
DiscountSummary Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
ValueformdecimalNo
DiscountLineResult Parameters:
NameParameterData TypeRequiredDescription
TicketTypeIdformint?No
CountformintNo
AppliedformboolNo
UnitBeforeformdecimalNo
UnitAfterformdecimalNo
LineBeforeformdecimalNo
LineAfterformdecimalNo

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /ticketOrder/previewDiscount HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	code: String,
	eventId: 0,
	fullPhoneNumber: String,
	orderDetails: 
	[
		{
			id: 0,
			ticketId: 0,
			eventSeriesTicketType: 0,
			eventSeriesOwnerTicketType: 0,
			ticketPrice: 0,
			totalPrice: 0,
			count: 0,
			ticketColor: String,
			showUsedTickets: False,
			ticketName: String,
			ticketDisplayString: String,
			ticketDetailsTransferredFrom: 0,
			teamPassId: 0,
			isSpecialTicket: False,
			specialTicketId: String,
			justChangedBySQL: False,
			sqlJustChangedTimeStamp: 0001-01-01,
			currency: String,
			discountCode: String,
			totalDiscount: 0,
			totalAmountBeforeDiscount: 0,
			ticketPriceBeforeDiscount: 0
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	status: String,
	reason: String,
	message: 
	{
		is: String,
		en: String
	},
	discountCodeId: 0,
	discountCodeTypeId: 0,
	discount: 
	{
		type: String,
		value: 0
	},
	lines: 
	[
		{
			ticketTypeId: 0,
			count: 0,
			applied: False,
			unitBefore: 0,
			unitAfter: 0,
			lineBefore: 0,
			lineAfter: 0
		}
	],
	subtotalBefore: 0,
	subtotalAfter: 0,
	totalSavings: 0,
	currency: String,
	statusCode: 0
}