| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
| POST | /Webshop/Order/Preview |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports TicketUserServices.ServiceModel
Namespace Global
Namespace TicketUserServices.ServiceModel
Public Partial Class DiscountSummary
Public Overridable Property Type As String
Public Overridable Property Value As Decimal
End Class
Public Partial Class LocalizedMessage
Public Overridable Property [Is] As String
Public Overridable Property En As String
End Class
Public Partial Class OrderTender
Public Overridable Property Kind As String
Public Overridable Property Code As String
Public Overridable Property AmountMinor As Nullable(Of Integer)
Public Overridable Property IdempotencyKey As String
Public Overridable Property HoldId As Nullable(Of Integer)
Public Overridable Property AppliedMinor As Nullable(Of Integer)
End Class
Public Partial Class WebshopOrderPreviewRequest
Public Sub New()
Lines = New List(Of WebshopPurchaseLine)
Tenders = New List(Of OrderTender)
End Sub
Public Overridable Property OwnerId As Integer
Public Overridable Property ExternalId As String
Public Overridable Property Lines As List(Of WebshopPurchaseLine)
Public Overridable Property DeliveryType As String
Public Overridable Property DiscountCode As String
Public Overridable Property BuyerPhone As String
Public Overridable Property Tenders As List(Of OrderTender)
End Class
Public Partial Class WebshopOrderPreviewResult
Public Sub New()
Lines = New List(Of WebshopPreviewLine)
Tenders = New List(Of WebshopPreviewTender)
End Sub
Public Overridable Property StatusCode As Integer
Public Overridable Property Success As Boolean
Public Overridable Property Message As LocalizedMessage
Public Overridable Property Reason As String
Public Overridable Property Lines As List(Of WebshopPreviewLine)
Public Overridable Property SubtotalMinor As Integer
Public Overridable Property DeliveryFeeMinor As Integer
Public Overridable Property DiscountMinor As Integer
Public Overridable Property GiftAppliedMinor As Integer
Public Overridable Property CardRemainderMinor As Integer
Public Overridable Property Tenders As List(Of WebshopPreviewTender)
Public Overridable Property Discount As DiscountSummary
End Class
Public Partial Class WebshopPreviewLine
Public Overridable Property VariantId As Integer
Public Overridable Property ProductId As Integer
Public Overridable Property ProductName As String
Public Overridable Property Size As String
Public Overridable Property Color As String
Public Overridable Property Quantity As Integer
Public Overridable Property UnitBeforeMinor As Integer
Public Overridable Property UnitAfterMinor As Integer
Public Overridable Property LineBeforeMinor As Integer
Public Overridable Property LineAfterMinor As Integer
Public Overridable Property Discounted As Boolean
End Class
Public Partial Class WebshopPreviewTender
Public Overridable Property Code As String
Public Overridable Property AppliedMinor As Integer
Public Overridable Property Ok As Boolean
Public Overridable Property Reason As String
Public Overridable Property Message As LocalizedMessage
End Class
Public Partial Class WebshopPurchaseLine
Public Overridable Property VariantId As Integer
Public Overridable Property Quantity As Integer
End Class
End Namespace
End Namespace
VB.NET WebshopOrderPreviewRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
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/csv
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}}