| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
| POST | /Webshop/Order/Preview |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| OwnerId | body | int | No | |
| ExternalId | body | string | No | |
| Lines | body | List<WebshopPurchaseLine> | No | |
| DeliveryType | body | string | No | |
| DiscountCode | body | string | No | |
| BuyerPhone | body | string | No | |
| Tenders | body | List<OrderTender> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| VariantId | form | int | No | |
| Quantity | form | int | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Kind | form | string | No | |
| Code | form | string | No | |
| AmountMinor | form | int? | No | |
| IdempotencyKey | form | string | No | |
| HoldId | form | int? | No | |
| AppliedMinor | form | int? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| StatusCode | form | int | No | |
| Success | form | bool | No | |
| Message | form | LocalizedMessage | No | |
| Reason | form | string | No | |
| Lines | form | List<WebshopPreviewLine> | No | |
| SubtotalMinor | form | int | No | |
| DeliveryFeeMinor | form | int | No | |
| DiscountMinor | form | int | No | |
| GiftAppliedMinor | form | int | No | |
| CardRemainderMinor | form | int | No | |
| Tenders | form | List<WebshopPreviewTender> | No | |
| Discount | form | DiscountSummary | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Is | form | string | No | |
| En | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| VariantId | form | int | No | |
| ProductId | form | int | No | |
| ProductName | form | string | No | |
| Size | form | string | No | |
| Color | form | string | No | |
| Quantity | form | int | No | |
| UnitBeforeMinor | form | int | No | |
| UnitAfterMinor | form | int | No | |
| LineBeforeMinor | form | int | No | |
| LineAfterMinor | form | int | No | |
| Discounted | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Code | form | string | No | |
| AppliedMinor | form | int | No | |
| Ok | form | bool | No | |
| Reason | form | string | No | |
| Message | form | LocalizedMessage | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Type | form | string | No | |
| Value | form | decimal | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}
}