Skip to main content

/api/lite/orders/nearest

Получение ближайших заказов к заданному

/api/lite/orders/nearest

Возвращает по 10 заказов до и после указанного (включая заданный), считая по дате заказа

Обязательный параметр: id заказа. Например:

api/lite/orders/nearest?id=1285-1001

Формат ответа аналогичен списку заказов

Пример ответа:

{ 
    "success": true,
    "recordsTotal": 8,
    "orders": [
        {
            "id": "1285-1000",
            "date": "2020-01-15 11:56:21",
            "updateTs": "2020-01-15 11:57:23.169",
            "status": "ORDER_INFO_READY_TO_PACK",
            "totalOrderSum": 66,
            "paymentStatus": "PAID",
            "paymentMethodCode": "no-cod",
            "needCustomerPayment": false,
            "tags": [],
            "delivery": {
                "code": "eefbe980-1e3b-d973-ef24-6e92399ca702",
                "type": "COURIER",
                "title": "CUSTOM",
                "pickupPointId": null,
                "logoUrl": null,
                "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": "31",
                    "block": "",
                    "building": "",
                    "flat": null,
                    "fullAddress": "119361, г Москва, ул Озёрная, д 31",
                    "fullCity": null,
                    "rawData": null,
                    "zip": "119361",
                    "regionFias": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                    "areaFias": null,
                    "cityFias": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                    "settlementFias": null
                },
                "receiver": {
                    "name": null,
                    "surname": "Ываыва",
                    "patronymic": null,
                    "phone": "+79001111114",
                    "alternativePhone": "",
                    "email": null,
                    "post": null,
                    "personType": null
                }
            },
            "legalEntity": {
                "id": "4b51fdb9-3c57-5cce-29aa-da9bb35d778d",
                "type": "PERSON",
                "name": " Розничный покупатель"
            },
            "items": [
                {
                    "num": 1,
                    "variantId": "delivery",
                    "name": "Доставка",
                    "quantity": 1,
                    "price": 0,
                    "skuType": "SERVICE"
                },
                {
                    "num": 2,
                    "variantId": "1002",
                    "productId": "1002",
                    "name": "Кактус Рипсалис",
                    "quantity": 3,
                    "price": 22,
                    "img": "https://img.kak2c.ru/i/P/o/1X8eNZVj_c.jpg?1579013978",
                    "skuType": "SKU"
                }
            ],
            "customerPaymentInProcess": false,
            "warehouseName": "Свой склад",
            "c": "59b34def-1077-9050-541b-b7c3290c9fd8"
        },
        ...
    ]
}