TicketUserServices

<back to all web services

WebshopOrderPreviewRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequires the permission:ReadData
The following routes are available for this service:
POST/Webshop/Order/Preview
WebshopOrderPreviewRequest Parameters:
NameParameterData TypeRequiredDescription
OwnerIdbodyintNo
ExternalIdbodystringNo
LinesbodyList<WebshopPurchaseLine>No
DeliveryTypebodystringNo
DiscountCodebodystringNo
BuyerPhonebodystringNo
TendersbodyList<OrderTender>No
WebshopPurchaseLine Parameters:
NameParameterData TypeRequiredDescription
VariantIdformintNo
QuantityformintNo
OrderTender Parameters:
NameParameterData TypeRequiredDescription
KindformstringNo
CodeformstringNo
AmountMinorformint?No
IdempotencyKeyformstringNo
HoldIdformint?No
AppliedMinorformint?No
WebshopOrderPreviewResult Parameters:
NameParameterData TypeRequiredDescription
StatusCodeformintNo
SuccessformboolNo
MessageformLocalizedMessageNo
ReasonformstringNo
LinesformList<WebshopPreviewLine>No
SubtotalMinorformintNo
DeliveryFeeMinorformintNo
DiscountMinorformintNo
GiftAppliedMinorformintNo
CardRemainderMinorformintNo
TendersformList<WebshopPreviewTender>No
DiscountformDiscountSummaryNo
LocalizedMessage Parameters:
NameParameterData TypeRequiredDescription
IsformstringNo
EnformstringNo
WebshopPreviewLine Parameters:
NameParameterData TypeRequiredDescription
VariantIdformintNo
ProductIdformintNo
ProductNameformstringNo
SizeformstringNo
ColorformstringNo
QuantityformintNo
UnitBeforeMinorformintNo
UnitAfterMinorformintNo
LineBeforeMinorformintNo
LineAfterMinorformintNo
DiscountedformboolNo
WebshopPreviewTender Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
AppliedMinorformintNo
OkformboolNo
ReasonformstringNo
MessageformLocalizedMessageNo
DiscountSummary Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
ValueformdecimalNo

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 /Webshop/Order/Preview HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ownerId: 0,
	externalId: String,
	lines: 
	[
		{
			variantId: 0,
			quantity: 0
		}
	],
	deliveryType: String,
	discountCode: String,
	buyerPhone: String,
	tenders: 
	[
		{
			kind: String,
			code: String,
			amountMinor: 0,
			idempotencyKey: String,
			holdId: 0,
			appliedMinor: 0
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	statusCode: 0,
	success: False,
	message: 
	{
		is: String,
		en: String
	},
	reason: String,
	lines: 
	[
		{
			variantId: 0,
			productId: 0,
			productName: String,
			size: String,
			color: String,
			quantity: 0,
			unitBeforeMinor: 0,
			unitAfterMinor: 0,
			lineBeforeMinor: 0,
			lineAfterMinor: 0,
			discounted: False
		}
	],
	subtotalMinor: 0,
	deliveryFeeMinor: 0,
	discountMinor: 0,
	giftAppliedMinor: 0,
	cardRemainderMinor: 0,
	tenders: 
	[
		{
			code: String,
			appliedMinor: 0,
			ok: False,
			reason: String,
			message: 
			{
				is: String,
				en: String
			}
		}
	],
	discount: 
	{
		type: String,
		value: 0
	}
}