/api/lite/orders/calc_insurance_sum

Расчет страховой стоимости заказа

/api/lite/orders/calc_insurance_sum

Расчет страховой стоимости заказа исходяиз переданных товаров и с учетом настроек процента страховой суммы на данный канал доставки.

Заказ анализируется только из переданных данных, без поиска заказа в БД.

В качестве dto используется dto заказа из /orders.

Пример запроса:

{

 

 "totalOrderSum": 15,

 "paymentStatus": "NOT_PAID",

 "confirmStatus": "NEED_CONFIRM",

 "paymentMethodCode": "cod-cash",

 "paymentMethodType": "COD_CASH",

 "needCustomerPayment": false,

 "tags": [],

 "delivery": {

 "code": "1a625a2c-c121-617c-23b9-5bbfbfb22eec",

 "type": "PVZ",

 "title": "PickPoint",

 "pickupPointId": "3",

 "logoUrl": "https://storage.yandexcloud.net/lk-kak2c/delivery_pickpoint_left.svg",

 "trackingNumber": null,

 "trackingURL": null,

 "desiredDeliveryDate": null,

 "desiredDeliveryTimeFrom": "09:00",

 "desiredDeliveryTimeTo": "18:00",

 "deliveryComment": null,

 "address": {

 "country": "Россия",

 "countryCode": "RU",

 "region": "Москва",

 "area": null,

 "city": "Москва",

 "settlement": null,

 "street": "ул Озёрная",

 "house": "33",

 "block": "",

 "building": "",

 "flat": null,

 "fullAddress": "119361, г Москва, ул Озёрная, д 33",

 "fullCity": null,

 "rawData": null,

 "zip": "119361",

 "regionFias": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",

 "areaFias": null,

 "cityFias": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",

 "settlementFias": null

 },

 "receiver": {

 "name": "Валерьевна",

 "surname": "Ирина",

 "patronymic": null,

 "fullName": "Ирина Валерьевна",

 "phone": "89011111111",

 "rawPhone": null,

 "alternativePhone": "",

 "email": "i-fomina@yandedx.ru",

 "post": null,

 "personType": "CUSTOMER"

 },

 "deliveryServices": []

 },

 "legalEntity": {

 "id": "3c0a3ad3-b10f-4299-5b1b-a3d90b0c198a",

 "type": "PERSON",

 "name": " Розничный покупатель",

 "organization": null,

 "person": null

 },

 "items": [

 {

 "num": 1,

 "variantId": "delivery",

 "name": "Доставка",

 "quantity": 1,

 "vatRate": "NO_VAT",

 "price": 0,

 "skuType": "SERVICE"

 },

 {

 "num": 2,

 "variantId": "BR00T-000116",

 "productId": "BR00T-000116",

 "productExtId": "BR00T-000116",

 "name": "Набор для Бро №3: помада для волос, гель для душа + шампунь",

 "article": "BR00T-000116",

 "quantity": 5,

 "quantityAvailable": 38,

 "vatRate": "NO_VAT",

 "price": 30,

 "img": "https://storage.yandexcloud.net/images-k2c/90960e52-86cf-4342-9ecc-497bb91f0af0.jpg",

 "itemAmountState": {

 "amountORDERED": 5,

 "amountRESERVED": 5,

 "amountPACKED": 0,

 "amountSHIPPED": 0,

 "amountDELIVERED": 0,

 "amountLOST": 0,

 "amountFACT_DELIVERED": 0,

 "amountRETURNED": 0

 },

 "skuType": "SKU", 

 "itemDimensions": {

 "height": 20,

 "width": 20,

 "depth": 10

 },

 "itemWeight": 500

 },

 {

 "num": 3,

 "variantId": "BR00T-000133",

 "productId": "BR00T-000133",

 "productExtId": "BR00T-000133",

 "name": "Брелок для ключей/рюкзака Bro Cosmetics Crew",

 "article": "BR00T-000133",

 "quantity": 22,

 "quantityAvailable": 1,

 "vatRate": "NO_VAT",

 "price": 15,

 "img": "https://storage.yandexcloud.net/images-k2c/b99569d2-be64-4a41-9cfa-e9eb5c339485.jpg",

 "itemAmountState": {

 "amountORDERED": 22,

 "amountRESERVED": 22,

 "amountPACKED": 0,

 "amountSHIPPED": 0,

 "amountDELIVERED": 0,

 "amountLOST": 0,

 "amountFACT_DELIVERED": 0,

 "amountRETURNED": 0

 },

 "skuType": "SKU",

 "itemDimensions": {

 "height": 2,

 "width": 1,

 "depth": 1

 },

 "itemWeight": 50

 }

 ],

 "expenses": [],

 "customerPaymentInProcess": false,

 "warehouseName": "Tempoline",

 "warehouseCode": "6805bc64-270f-ae7d-1231-773ff181e446",

 "c": "4f794476-a895-897d-d4a4-119924305917"

 }

В ответ возвращается

Успех:

{

 "success": true,

 "insuranceSum": 240.2

}

Ошибка:

{

"success": false,

"errors": [

 {

 "code": 0,

 "message": "Текст ошибки"

 }

]

}