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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<WebshopOrderPreviewRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <BuyerPhone>String</BuyerPhone>
  <DeliveryType>String</DeliveryType>
  <DiscountCode>String</DiscountCode>
  <ExternalId>String</ExternalId>
  <Lines>
    <WebshopPurchaseLine>
      <Quantity>0</Quantity>
      <VariantId>0</VariantId>
    </WebshopPurchaseLine>
  </Lines>
  <OwnerId>0</OwnerId>
  <Tenders>
    <OrderTender>
      <AmountMinor>0</AmountMinor>
      <AppliedMinor>0</AppliedMinor>
      <Code>String</Code>
      <HoldId>0</HoldId>
      <IdempotencyKey>String</IdempotencyKey>
      <Kind>String</Kind>
    </OrderTender>
  </Tenders>
</WebshopOrderPreviewRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<WebshopOrderPreviewResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <CardRemainderMinor>0</CardRemainderMinor>
  <DeliveryFeeMinor>0</DeliveryFeeMinor>
  <Discount>
    <Type>String</Type>
    <Value>0</Value>
  </Discount>
  <DiscountMinor>0</DiscountMinor>
  <GiftAppliedMinor>0</GiftAppliedMinor>
  <Lines>
    <WebshopPreviewLine>
      <Color>String</Color>
      <Discounted>false</Discounted>
      <LineAfterMinor>0</LineAfterMinor>
      <LineBeforeMinor>0</LineBeforeMinor>
      <ProductId>0</ProductId>
      <ProductName>String</ProductName>
      <Quantity>0</Quantity>
      <Size>String</Size>
      <UnitAfterMinor>0</UnitAfterMinor>
      <UnitBeforeMinor>0</UnitBeforeMinor>
      <VariantId>0</VariantId>
    </WebshopPreviewLine>
  </Lines>
  <Message>
    <En>String</En>
    <Is>String</Is>
  </Message>
  <Reason>String</Reason>
  <StatusCode>0</StatusCode>
  <SubtotalMinor>0</SubtotalMinor>
  <Success>false</Success>
  <Tenders>
    <WebshopPreviewTender>
      <AppliedMinor>0</AppliedMinor>
      <Code>String</Code>
      <Message>
        <En>String</En>
        <Is>String</Is>
      </Message>
      <Ok>false</Ok>
      <Reason>String</Reason>
    </WebshopPreviewTender>
  </Tenders>
</WebshopOrderPreviewResult>