api/customer/orders
Запрос списка заказов
api/customer/orders
Метод возвращает список заказов текущего покупателя.
Пейджинация
Для пейджинации используются параметры page и size: size - записей на странице, page - номер страницы.
Пример: api/customer/orders?page=0&size=200
Если параметры не переданы, то дефолтные значения page=0&size=10
Также, для отображение пейджинации следует анализировать параметр recordsTotal, возвращающий общее количество записей (с учетом примененной фильтрации, если она есть).
Пример результата запроса
{
"success": true,
"recordsTotal": 2,
"orders": [
{
"id": "20412212",
"date": "2020-06-03 09:22:06",
"updateTs": "2020-06-10 16:09:43.226",
"status": "ORDER_INFO_DONE",
"totalOrderSum": 1208,
"insuranceSum": 1059,
"insuranceSumAutoCalculation": true,
"paymentStatus": "PAID",
"confirmStatus": "APPROVED",
"paymentMethodCode": "online",
"paymentMethodType": "ONLINE",
"needCustomerPayment": true,
"shortUrl": "http://r.kak2c.ru/o6meazi",
"delivery": {
"code": "b26909d5-8424-7de9-42ca-53f668f70a8a",
"type": "COURIER",
"title": "BERU",
"pickupPointId": null,
"logoUrl": "https://storage.yandexcloud.net/lk-kak2c/delivery_beru_middle.svg",
"trackingNumber": "20412212",
"trackingURL": null,
"desiredDeliveryDate": null,
"desiredDeliveryTimeFrom": "09:00",
"desiredDeliveryTimeTo": "18:00",
"actualDeliveryDate": null,
"pvzComment": null,
"deliveryComment": null,
"address": {
"country": "Россия",
"countryCode": "RU",
"region": "Москва",
"area": null,
"city": "Москва",
"settlement": null,
"street": null,
"house": null,
"block": null,
"building": null,
"flat": null,
"fullAddress": "Москва",
"fullCity": null,
"rawData": null,
"zip": null,
"regionFias": null,
"areaFias": null,
"cityFias": null,
"settlementFias": null
},
"receiver": {
"name": "Покупатель на Беру",
"surname": null,
"patronymic": null,
"phone": "+70000000000",
"rawPhone": "+70000000000",
"alternativePhone": "",
"email": null,
"post": null,
"personType": "CUSTOMER",
"address": {
"country": "Россия",
"countryCode": "RU",
"region": "Москва",
"area": null,
"city": "Москва",
"settlement": null,
"street": null,
"house": null,
"block": null,
"building": null,
"flat": null,
"fullAddress": "Москва",
"fullCity": null,
"rawData": null,
"zip": null,
"regionFias": null,
"areaFias": null,
"cityFias": null,
"settlementFias": null
}
},
"deliveryServices": null
},
"items": [
{
"num": 1,
"variantId": "83491",
"variantExtId": "NL290-83491",
"productId": "1052",
"productExtId": "83490",
"name": "CC крем «Абсолютное совершенство» SPF 20, 30 мл, Оттенок: Light ",
"article": "NL290-83491",
"quantity": 1,
"vatRate": "VAT_20",
"price": 1059,
"skuType": "SKU",
"itemDimensions": {
"height": 0,
"width": 0,
"depth": 0
},
"itemWeight": 0,
"barcode": "6412600834918"
},
{
"num": 2,
"variantId": "delivery",
"name": "Доставка",
"article": "",
"quantity": 1,
"vatRate": "VAT_20",
"price": 149,
"skuType": "SERVICE",
"barcode": ""
}
],
"customerPaymentInProcess": false,
"customer": {
"id": "9a5e8591-7ea7-adb6-34db-546f105fc11a",
"emailLogin": "yura@test.com",
"firstName": "Yura",
"lastName": "Dan",
"middleName": "Dan",
"fullName": "Dan Yura Dan",
"phone": "",
"rawPhone": "+7985858585",
"alternativePhone": "",
"address": {
"country": "Россия",
"countryCode": "RU",
"region": "Московская",
"area": null,
"city": "Красногорск",
"settlement": "Ангелово",
"street": "мкр МЖК Росинка",
"house": "74/1",
"block": "",
"building": "",
"flat": "1",
"fullAddress": "Московская обл, г Красногорск, село Ангелово, мкр МЖК Росинка, д 74/1, кв. 1",
"fullCity": null,
"rawData": null,
"zip": "143442",
"regionFias": "29251dcf-00a1-4e34-98d4-5c47484a36d4",
"areaFias": null,
"cityFias": "63fcf18a-365e-451f-baee-8d09ac50b773",
"settlementFias": "2b627d06-2257-4c20-83b1-5efa10ef57b4"
}
},
"c": "f132f0d9-ced0-1134-573c-5dba550e3792"
},
{
"id": "19918626",
"date": "2020-05-25 21:19:24",
"updateTs": "2020-06-05 17:38:27.352",
"status": "ORDER_INFO_DONE",
"totalOrderSum": 579,
"insuranceSum": 579,
"insuranceSumAutoCalculation": true,
"paymentStatus": "NOT_PAID",
"confirmStatus": "APPROVED",
"paymentMethodCode": "cod-cash",
"paymentMethodType": "COD_CASH",
"needCustomerPayment": false,
"shortUrl": "http://r.kak2c.ru/jc2dyb2",
"delivery": {
"code": "b26909d5-8424-7de9-42ca-53f668f70a8a",
"type": "COURIER",
"title": "BERU",
"pickupPointId": null,
"logoUrl": "https://storage.yandexcloud.net/lk-kak2c/delivery_beru_middle.svg",
"trackingNumber": "19918626",
"trackingURL": null,
"desiredDeliveryDate": null,
"desiredDeliveryTimeFrom": "09:00",
"desiredDeliveryTimeTo": "18:00",
"actualDeliveryDate": null,
"pvzComment": null,
"deliveryComment": null,
"address": {
"country": "Россия",
"countryCode": "RU",
"region": "Москва",
"area": null,
"city": "Москва",
"settlement": null,
"street": null,
"house": null,
"block": null,
"building": null,
"flat": null,
"fullAddress": "Москва",
"fullCity": null,
"rawData": null,
"zip": null,
"regionFias": null,
"areaFias": null,
"cityFias": null,
"settlementFias": null
},
"receiver": {
"name": "Покупатель на Беру",
"surname": null,
"patronymic": null,
"phone": "+70000000000",
"rawPhone": "+70000000000",
"alternativePhone": "",
"email": null,
"post": null,
"personType": "CUSTOMER",
"address": {
"country": "Россия",
"countryCode": "RU",
"region": "Москва",
"area": null,
"city": "Москва",
"settlement": null,
"street": null,
"house": null,
"block": null,
"building": null,
"flat": null,
"fullAddress": "Москва",
"fullCity": null,
"rawData": null,
"zip": null,
"regionFias": null,
"areaFias": null,
"cityFias": null,
"settlementFias": null
}
},
"deliveryServices": null
},
"items": [
{
"num": 1,
"variantId": "84981",
"variantExtId": "NL110-84981",
"productId": "1019",
"productExtId": "NL110-84981",
"name": "Тушь с черникой для чувствительных глаз, 9 мл, Оттенок: Черный ",
"article": "NL110-84981",
"quantity": 1,
"vatRate": "NO_VAT",
"price": 579,
"img": "https://storage.yandexcloud.net/images-k2c/eef378d6-853f-4c75-a3b4-b2bdec352fe7.jpg",
"skuType": "SKU",
"itemDimensions": {
"height": 0,
"width": 0,
"depth": 0
},
"itemWeight": 0,
"barcode": "6412600849813"
},
{
"num": 2,
"variantId": "delivery",
"name": "Доставка",
"article": "",
"quantity": 1,
"vatRate": "NO_VAT",
"price": 0,
"skuType": "SERVICE",
"barcode": ""
}
],
"customerPaymentInProcess": false,
"customer": {
"id": "9a5e8591-7ea7-adb6-34db-546f105fc11a",
"emailLogin": "yura@test.com",
"firstName": "Yura",
"lastName": "Dan",
"middleName": "Dan",
"fullName": "Dan Yura Dan",
"phone": "",
"rawPhone": "+7985858585",
"alternativePhone": "",
"address": {
"country": "Россия",
"countryCode": "RU",
"region": "Московская",
"area": null,
"city": "Красногорск",
"settlement": "Ангелово",
"street": "мкр МЖК Росинка",
"house": "74/1",
"block": "",
"building": "",
"flat": "1",
"fullAddress": "Московская обл, г Красногорск, село Ангелово, мкр МЖК Росинка, д 74/1, кв. 1",
"fullCity": null,
"rawData": null,
"zip": "143442",
"regionFias": "29251dcf-00a1-4e34-98d4-5c47484a36d4",
"areaFias": null,
"cityFias": "63fcf18a-365e-451f-baee-8d09ac50b773",
"settlementFias": "2b627d06-2257-4c20-83b1-5efa10ef57b4"
}
},
"c": "326a2701-e668-c8b2-dda6-ab259921aaee"
}
],
}
Ошибка:
{
"success": false,
"errors": [{"code": 0,"message": "Текст ошибки"}]
}