| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
| POST | /Webshop/Order/Purchase |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| OwnerId | body | int | No | |
| ExternalId | body | string | No | |
| Lines | body | List<WebshopPurchaseLine> | No | |
| BuyerName | body | string | No | |
| BuyerEmail | body | string | No | |
| BuyerPhone | body | string | No | |
| DeliveryType | body | string | No | |
| DroppLocationId | body | string | No | |
| Address | body | string | No | |
| City | body | string | No | |
| ZipCode | body | string | No | |
| Country | body | string | No | |
| IdempotencyKey | body | string | No | |
| DiscountCode | body | string | No | |
| Tenders | body | List<OrderTender> | No | |
| PaymentMethodId | body | string | No | |
| PaymentId | body | string | No | |
| CardInfo | body | PaymentRequestCreditCard | No | |
| Borgun3DFinalInfo | body | Borgun3DFinalRequest | No | |
| ApplePayInfo | body | BorgunApplePayFinalInfo | 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 |
|---|---|---|---|---|
| PaymentMethod | form | PaymentMethodCreditCardInfo | No | |
| Amount | form | decimal | No | |
| Currency | form | string | No | |
| OrderId | form | string | No | |
| TransActionDate | form | DateTime | No | |
| SaveCardToToken | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| PaymentType | form | string | No | |
| Token | form | string | No | |
| PAN | form | string | No | |
| ExpYear | form | string | No | |
| ExpMonth | form | string | No | |
| CVC | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| TransactionType | form | string | No | |
| Amount | form | int | No | |
| Currency | form | string | No | |
| TransactionDate | form | DateTime? | No | |
| OrderId | form | string | No | |
| PaymentMethod | form | Borgun3DFinalPaymentMethodInfo | No | |
| ThreeDSecure | form | Borgun3DFinal3DSecureInfo | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| PaymentType | form | string | No | |
| Token | form | string | No | |
| VirtualNumber | form | string | No | |
| ExpYear | form | string | No | |
| ExpMonth | form | string | No | |
| PanLastFour | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| DataType | form | string | No | |
| MpiToken | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| OrderId | form | string | No | |
| ThreeDSecure | form | BorgunApplePayThreeDSecureInfo | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| DataType | form | string | No | |
| SecurityLevelInd | form | string | No | |
| CAVV | form | string | No | |
| UCAF | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Success | form | bool | No | |
| Reason | form | string | No | |
| Message | form | LocalizedMessage | No | |
| OrderReference | form | string | No | |
| Order | form | WebshopOrderSummary | No | |
| StatusCode | form | int | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Is | form | string | No | |
| En | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ID | form | int | No | |
| OrderReference | form | string | No | |
| OwnerId | form | int | No | |
| Status | form | string | No | |
| TotalMinor | form | int | No | |
| DeliveryFeeMinor | form | int | No | |
| TotalDiscountMinor | form | int | No | |
| Currency | form | string | No | |
| BuyerName | form | string | No | |
| BuyerEmail | form | string | No | |
| BuyerPhone | form | string | No | |
| Address | form | string | No | |
| City | form | string | No | |
| ZipCode | form | string | No | |
| Country | form | string | No | |
| DeliveryType | form | string | No | |
| DroppOrderId | form | string | No | |
| DroppLocationId | form | string | No | |
| NeedsDeliveryAttention | form | bool | No | |
| PaymentMethodId | form | string | No | |
| PaymentId | form | string | No | |
| PaymentReference | form | string | No | |
| DiscountCode | form | string | No | |
| GiftPaidMinor | form | int | No | |
| CreatedAt | form | DateTime | No | |
| UpdatedAt | form | DateTime | No | |
| Lines | form | List<WebshopOrderLineSummary> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ID | form | int | No | |
| ProductId | form | int | No | |
| VariantId | form | int | No | |
| ProductName | form | string | No | |
| Size | form | string | No | |
| Color | form | string | No | |
| UnitPriceMinor | form | int | No | |
| Quantity | form | int | No | |
| LineTotalMinor | form | int | No | |
| Status | form | string | No | |
| PayoutInfoId | form | int? | No | |
| PayoutTag | form | string | 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/Purchase 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
}
],
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-01,
saveCardToToken: False
},
borgun3DFinalInfo:
{
transactionType: String,
amount: 0,
currency: String,
transactionDate: 0001-01-01,
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/jsv
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-01,
updatedAt: 0001-01-01,
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
}