| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
| POST | /Webshop/Order/Purchase |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports TicketUserServices.ServiceModel
Imports BorgunRPGData
Namespace Global
Namespace BorgunRPGData
Public Partial Class Borgun3DFinal3DSecureInfo
Public Overridable Property DataType As String
Public Overridable Property MpiToken As String
End Class
Public Partial Class Borgun3DFinalPaymentMethodInfo
Public Overridable Property PaymentType As String
Public Overridable Property Token As String
Public Overridable Property VirtualNumber As String
Public Overridable Property ExpYear As String
Public Overridable Property ExpMonth As String
Public Overridable Property PanLastFour As String
End Class
Public Partial Class Borgun3DFinalRequest
Public Overridable Property TransactionType As String
Public Overridable Property Amount As Integer
Public Overridable Property Currency As String
Public Overridable Property TransactionDate As Nullable(Of Date)
Public Overridable Property OrderId As String
Public Overridable Property PaymentMethod As Borgun3DFinalPaymentMethodInfo
Public Overridable Property ThreeDSecure As Borgun3DFinal3DSecureInfo
End Class
Public Partial Class BorgunApplePayFinalInfo
Public Overridable Property OrderId As String
Public Overridable Property ThreeDSecure As BorgunApplePayThreeDSecureInfo
End Class
Public Partial Class BorgunApplePayThreeDSecureInfo
Public Overridable Property DataType As String
Public Overridable Property SecurityLevelInd As String
Public Overridable Property CAVV As String
Public Overridable Property UCAF As String
End Class
End Namespace
Namespace TicketUserServices.ServiceModel
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 PaymentMethodCreditCardInfo
Public Overridable Property PaymentType As String
Public Overridable Property Token As String
Public Overridable Property PAN As String
Public Overridable Property ExpYear As String
Public Overridable Property ExpMonth As String
Public Overridable Property CVC As String
End Class
Public Partial Class PaymentRequestCreditCard
Public Overridable Property PaymentMethod As PaymentMethodCreditCardInfo
Public Overridable Property Amount As Decimal
Public Overridable Property Currency As String
Public Overridable Property OrderId As String
Public Overridable Property TransActionDate As Date
Public Overridable Property SaveCardToToken As Boolean
End Class
Public Partial Class WebshopOrderLineSummary
Public Overridable Property ID As Integer
Public Overridable Property ProductId As Integer
Public Overridable Property VariantId As Integer
Public Overridable Property ProductName As String
Public Overridable Property Size As String
Public Overridable Property Color As String
Public Overridable Property UnitPriceMinor As Integer
Public Overridable Property Quantity As Integer
Public Overridable Property LineTotalMinor As Integer
Public Overridable Property Status As String
Public Overridable Property PayoutInfoId As Nullable(Of Integer)
Public Overridable Property PayoutTag As String
End Class
Public Partial Class WebshopOrderPurchaseRequest
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 BuyerName As String
Public Overridable Property BuyerEmail As String
Public Overridable Property BuyerPhone As String
Public Overridable Property DeliveryType As String
Public Overridable Property DroppLocationId As String
Public Overridable Property Address As String
Public Overridable Property City As String
Public Overridable Property ZipCode As String
Public Overridable Property Country As String
Public Overridable Property IdempotencyKey As String
Public Overridable Property DiscountCode As String
Public Overridable Property Tenders As List(Of OrderTender)
Public Overridable Property PaymentMethodId As String
Public Overridable Property PaymentId As String
Public Overridable Property CardInfo As PaymentRequestCreditCard
Public Overridable Property Borgun3DFinalInfo As Borgun3DFinalRequest
Public Overridable Property ApplePayInfo As BorgunApplePayFinalInfo
End Class
Public Partial Class WebshopOrderResult
Public Overridable Property Success As Boolean
Public Overridable Property Reason As String
Public Overridable Property Message As LocalizedMessage
Public Overridable Property OrderReference As String
Public Overridable Property Order As WebshopOrderSummary
Public Overridable Property StatusCode As Integer
End Class
Public Partial Class WebshopOrderSummary
Public Sub New()
Lines = New List(Of WebshopOrderLineSummary)
End Sub
Public Overridable Property ID As Integer
Public Overridable Property OrderReference As String
Public Overridable Property OwnerId As Integer
Public Overridable Property Status As String
Public Overridable Property TotalMinor As Integer
Public Overridable Property DeliveryFeeMinor As Integer
Public Overridable Property TotalDiscountMinor As Integer
Public Overridable Property Currency As String
Public Overridable Property BuyerName As String
Public Overridable Property BuyerEmail As String
Public Overridable Property BuyerPhone As String
Public Overridable Property Address As String
Public Overridable Property City As String
Public Overridable Property ZipCode As String
Public Overridable Property Country As String
Public Overridable Property DeliveryType As String
Public Overridable Property DroppOrderId As String
Public Overridable Property DroppLocationId As String
Public Overridable Property NeedsDeliveryAttention As Boolean
Public Overridable Property PaymentMethodId As String
Public Overridable Property PaymentId As String
Public Overridable Property PaymentReference As String
Public Overridable Property DiscountCode As String
Public Overridable Property GiftPaidMinor As Integer
Public Overridable Property CreatedAt As Date
Public Overridable Property UpdatedAt As Date
Public Overridable Property Lines As List(Of WebshopOrderLineSummary)
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 WebshopOrderPurchaseRequest 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/Purchase 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}],"buyerName":"String","buyerEmail":"String","buyerPhone":"String","deliveryType":"String","droppLocationId":"String","address":"String","city":"String","zipCode":"String","country":"String","idempotencyKey":"String","discountCode":"String","tenders":[{"kind":"String","code":"String","amountMinor":0,"idempotencyKey":"String","holdId":0,"appliedMinor":0}],"paymentMethodId":"String","paymentId":"String","cardInfo":{"paymentMethod":{"paymentType":"String","token":"String","pan":"String","expYear":"String","expMonth":"String","cvc":"String"},"amount":0,"currency":"String","orderId":"String","transActionDate":"0001-01-01T00:00:00.0000000","saveCardToToken":false},"borgun3DFinalInfo":{"transactionType":"String","amount":0,"currency":"String","transactionDate":"0001-01-01T00:00:00.0000000","orderId":"String","paymentMethod":{"paymentType":"String","token":"String","virtualNumber":"String","expYear":"String","expMonth":"String","panLastFour":"String"},"threeDSecure":{"dataType":"String","mpiToken":"String"}},"applePayInfo":{"orderId":"String","threeDSecure":{"dataType":"String","securityLevelInd":"String","cavv":"String","ucaf":"String"}}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"success":false,"reason":"String","message":{"is":"String","en":"String"},"orderReference":"String","order":{"id":0,"orderReference":"String","ownerId":0,"status":"String","totalMinor":0,"deliveryFeeMinor":0,"totalDiscountMinor":0,"currency":"String","buyerName":"String","buyerEmail":"String","buyerPhone":"String","address":"String","city":"String","zipCode":"String","country":"String","deliveryType":"String","droppOrderId":"String","droppLocationId":"String","needsDeliveryAttention":false,"paymentMethodId":"String","paymentId":"String","paymentReference":"String","discountCode":"String","giftPaidMinor":0,"createdAt":"0001-01-01T00:00:00.0000000","updatedAt":"0001-01-01T00:00:00.0000000","lines":[{"id":0,"productId":0,"variantId":0,"productName":"String","size":"String","color":"String","unitPriceMinor":0,"quantity":0,"lineTotalMinor":0,"status":"String","payoutInfoId":0,"payoutTag":"String"}]},"statusCode":0}