Получение отзывов на машины по списку машин [1.0]

Описание

Позволяет получить отзывы на машины по списку машин

Структура URL

HTTP метод: POST, ресурс: <base_url>/truckresponses/bylist?withArch=<withArch>

Результат

 Словарь - Id машины: структура "Отзывы на машину"

Список параметров

НазваниеОписаниеСпособ передачи параметраОбязательный
WithArchВыбирать ли архивные отзывы (Disabled = true) (при отсутствии не выбираются)URL 
 Список ID машинBody+

Запрос

 Пример запроса и ответа

POST,  http://api.ati.su//truckresponses/bylist?withArch=true

Тело запроса

 JSON вида: 

[
"af49d643-da4d-e211-b493-14dae93e0938",
"b049d643-da4d-e211-b493-14dae93e0938",
"b049d643-da4d-e211-b493-14dae93e0938",
"bc4bd643-da4d-e211-b493-14dae93e0938",
"bc4bd643-da4d-e211-b493-14dae93e0938",
"b549d643-da4d-e211-b493-14dae93e0938",
"ba49d643-da4d-e211-b493-14dae93e0938",
"be49d643-da4d-e211-b493-14dae93e0938",
"be49d643-da4d-e211-b493-14dae93e0938",
"cf4bd643-da4d-e211-b493-14dae93e0938",
"d34bd643-da4d-e211-b493-14dae93e0938",
"f64bd643-da4d-e211-b493-14dae93e0938",
"fb4bd643-da4d-e211-b493-14dae93e0938",
"fe4bd643-da4d-e211-b493-14dae93e0938",
"004cd643-da4d-e211-b493-14dae93e0938",
"064cd643-da4d-e211-b493-14dae93e0938",
"cc49d643-da4d-e211-b493-14dae93e0938",
"1a4cd643-da4d-e211-b493-14dae93e0938",
"1a4cd643-da4d-e211-b493-24dae93e0938"
]

 

Ответ

JSON вида:

{
    "8ea3f96d-12b4-e711-93d0-14dae93e0938": {
        "offers": [
            {
                "id": "9e622c89-0222-e811-97f1-14dae93e0938",
                "resp_firm": {
                    "score": -2,
                    "status": 3,
                    "name": "loadExp3, ИП",
                    "ati_id": "100074010"
                },
                "add_date": "2018-03-07T12:24:53.143Z",
                "change_date": "2018-03-07T12:24:53.143Z",
                "price": 4567,
                "currency_id": 1,
                "pay_attribs": 241,
                "prepay_percent": 20,
                "max_bank_days": 7,
                "from_city_id": 3116,
                "to_city_id": 2416,
                "max_weight": 5,
                "max_volume": 6,
                "car_date": "2018-03-06T21:00:00Z"
            },
            {
                "id": "9e622c89-0222-e811-97f1-14dae92e0938",
                "resp_firm": {
                    "score": 2.25,
                    "status": 0,
                    "name": "dfjdfjfd",
                    "ati_id": "10007403"
                },
                "add_date": "2018-03-07T12:24:53.143Z",
                "change_date": "2018-03-07T12:24:53.143Z",
                "price": 4567,
                "currency_id": 1,
                "pay_attribs": 241,
                "prepay_percent": 20,
                "max_bank_days": 7,
                "from_city_id": 3116,
                "to_city_id": 2416,
                "max_weight": 5,
                "max_volume": 6,
                "car_date": "2018-03-06T21:00:00Z"
            }
        ],
        "offers_arch": [
            {
                "id": "9e622c89-0222-e811-97f1-94dae93e0938",
                "resp_firm": {
                    "score": -2,
                    "status": 3,
                    "name": "loadExp3, ИП",
                    "ati_id": "100074010"
                },
                "add_date": "2018-03-07T12:24:53.143Z",
                "change_date": "2018-03-07T12:24:53.143Z",
                "price": 4567,
                "currency_id": 1,
                "pay_attribs": 241,
                "prepay_percent": 20,
                "max_bank_days": 7,
                "from_city_id": 3116,
                "to_city_id": 2416,
                "max_weight": 5,
                "max_volume": 6,
                "car_date": "2018-03-06T21:00:00Z"
            },
            {
                "id": "9e622c89-0222-e811-97f1-34dae92e0938",
                "resp_firm": {
                    "score": 2.25,
                    "status": 0,
                    "name": "dfjdfjfd",
                    "ati_id": "10007403"
                },
                "add_date": "2018-03-07T12:24:53.143Z",
                "change_date": "2018-03-07T12:24:53.143Z",
                "price": 4567,
                "currency_id": 1,
                "pay_attribs": 241,
                "prepay_percent": 20,
                "max_bank_days": 7,
                "from_city_id": 3116,
                "to_city_id": 2416,
                "max_weight": 5,
                "max_volume": 6,
                "car_date": "2018-03-06T21:00:00Z"
            }
        ]
    },
    "af49d643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "0254d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 0,
                    "status": 2,
                    "name": "логик, физ.лицо",
                    "ati_id": "397609"
                },
                "add_date": "2011-11-03T04:07:18Z",
                "change_date": "2011-11-03T04:07:18Z",
                "price": 50000,
                "currency_id": 1,
                "note": "Тольятти-Азов, Таганрог-Тольятти,",
                "pay_attribs": 53,
                "prepay_percent": 50,
                "max_bank_days": 0,
                "from_city_id": 253,
                "to_city_id": 253,
                "max_weight": 20,
                "max_volume": 30,
                "car_date": "2011-11-02T20:00:00Z"
            }
        ]
    },
    "ba49d643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "0854d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 3.25,
                    "status": 1,
                    "name": "\"РосТара+\", ООО",
                    "ati_id": "193582"
                },
                "add_date": "2011-11-07T13:28:19Z",
                "change_date": "2011-11-07T13:28:19Z",
                "price": 20000,
                "currency_id": 1,
                "note": "загрузка сегодня ночью",
                "pay_attribs": 33,
                "prepay_percent": 0,
                "max_bank_days": 0,
                "from_city_id": 220,
                "to_city_id": 286,
                "max_weight": 20,
                "max_volume": 82,
                "car_date": "2011-11-06T20:00:00Z"
            }
        ]
    },
    "be49d643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "0954d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 4.25,
                    "status": 2,
                    "name": "\"Регион Транс\", ООО",
                    "ati_id": "19726"
                },
                "add_date": "2011-11-14T12:03:14Z",
                "change_date": "2011-11-14T12:03:14Z",
                "price": 10000,
                "currency_id": 1,
                "pay_attribs": 66,
                "prepay_percent": 0,
                "max_bank_days": 5,
                "from_city_id": 253,
                "to_city_id": 260,
                "max_weight": 10,
                "max_volume": 82,
                "car_date": "2011-11-14T20:00:00Z"
            },
            {
                "id": "0a54d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": -1.5,
                    "status": 3,
                    "name": "Егорова Н.Д., физ.лицо",
                    "ati_id": "122396"
                },
                "add_date": "2011-11-10T07:27:25Z",
                "change_date": "2011-11-10T07:27:25Z",
                "price": 14000,
                "currency_id": 1,
                "pay_attribs": 3,
                "prepay_percent": 0,
                "max_bank_days": 0,
                "from_city_id": 253,
                "to_city_id": 1414,
                "max_weight": 20,
                "max_volume": 68,
                "car_date": "2011-11-09T20:00:00Z"
            }
        ]
    },
    "cc49d643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "1254d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 4.75,
                    "status": 1,
                    "name": "БИГАНЬ, ООО",
                    "ati_id": "248663"
                },
                "add_date": "2011-11-18T06:22:20Z",
                "change_date": "2011-11-18T06:22:20Z",
                "price": 44000,
                "currency_id": 1,
                "note": "89374338161",
                "pay_attribs": 66,
                "prepay_percent": 0,
                "max_bank_days": 3,
                "from_city_id": 1317,
                "to_city_id": 253,
                "max_weight": 10,
                "max_volume": 100,
                "car_date": "2011-11-17T20:00:00Z"
            }
        ]
    },
    "f64bd643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "0d54d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 4.75,
                    "status": 1,
                    "name": "\"Союз-Логистик\", ООО",
                    "ati_id": "73677"
                },
                "add_date": "2011-11-09T07:25:11Z",
                "change_date": "2011-11-09T07:25:11Z",
                "price": 18000,
                "currency_id": 1,
                "pay_attribs": 2,
                "prepay_percent": 0,
                "max_bank_days": 0,
                "from_city_id": 253,
                "to_city_id": 1832,
                "max_weight": 20,
                "max_volume": 82,
                "car_date": "2011-11-08T20:00:00Z"
            }
        ]
    },
    "fb4bd643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "0e54d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 4.8,
                    "status": 1,
                    "name": "InterEuroTrans (ТК \"ИнтерЕвроТранс\", ООО)",
                    "ati_id": "35497"
                },
                "add_date": "2011-11-08T10:22:50Z",
                "change_date": "2011-11-08T10:22:50Z",
                "price": 10000,
                "currency_id": 1,
                "pay_attribs": 2,
                "prepay_percent": 0,
                "max_bank_days": 0,
                "from_city_id": 220,
                "to_city_id": 245,
                "max_weight": 20,
                "max_volume": 82,
                "car_date": "2011-11-08T20:00:00Z"
            }
        ]
    },
    "fe4bd643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "0f54d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 4.75,
                    "status": 2,
                    "name": "ЛК СарМаш, ООО",
                    "ati_id": "3234"
                },
                "add_date": "2011-11-09T08:53:32Z",
                "change_date": "2011-11-09T08:53:32Z",
                "price": 17000,
                "currency_id": 1,
                "note": "8-917-200-87-03 Юлия",
                "pay_attribs": 2,
                "prepay_percent": 0,
                "max_bank_days": 0,
                "from_city_id": 221,
                "to_city_id": 220,
                "max_weight": 20,
                "max_volume": 78,
                "car_date": "2011-11-09T20:00:00Z"
            }
        ]
    },
    "004cd643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "1054d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 5,
                    "status": 1,
                    "name": "\" Контрольный пакет\", ООО",
                    "ati_id": "241796"
                },
                "add_date": "2011-11-11T08:11:03Z",
                "change_date": "2011-11-11T08:11:03Z",
                "price": 3000,
                "currency_id": 1,
                "note": "выгрузка в субботу",
                "pay_attribs": 161,
                "prepay_percent": 0,
                "max_bank_days": 0,
                "from_city_id": 60,
                "to_city_id": 286,
                "max_weight": 0.7,
                "max_volume": 1,
                "car_date": "2011-11-10T20:00:00Z"
            }
        ]
    },
    "064cd643-da4d-e211-b493-14dae93e0938": {
        "offers": [
            {
                "id": "1154d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 0,
                    "status": 2,
                    "name": "ВолгаХлебоПродукт, ООО",
                    "ati_id": "1307019"
                },
                "add_date": "2011-11-09T18:06:53Z",
                "change_date": "2011-11-09T18:06:53Z",
                "price": 6000,
                "currency_id": 1,
                "pay_attribs": 33,
                "prepay_percent": 0,
                "max_bank_days": 0,
                "from_city_id": 7371,
                "to_city_id": 253,
                "max_weight": 20,
                "max_volume": 80,
                "car_date": "2011-11-10T20:00:00Z"
            }
        ]
    },
    "1a4cd643-da4d-e211-b493-14dae93e0938": {
        "offers_arch": [
            {
                "id": "1354d643-da4d-e211-b493-14dae93e0938",
                "resp_firm": {
                    "score": 4.4,
                    "status": 1,
                    "name": "Семь верст, ООО",
                    "ati_id": "252222"
                },
                "add_date": "2011-11-16T10:48:17Z",
                "change_date": "2011-11-16T10:48:17Z",
                "price": 46000,
                "currency_id": 1,
                "pay_attribs": 66,
                "prepay_percent": 0,
                "max_bank_days": 5,
                "from_city_id": 3611,
                "to_city_id": 220,
                "max_weight": 20,
                "max_volume": 82,
                "car_date": "2011-11-15T20:00:00Z"
            }
        ]
    }
}

 

Список ответов сервера 

Каждая ошибка кроме HTTP кода имеет уникальный строковый код. Подробнее..

HTTP код ответа
Код ошибки
Сообщение
200--Операция завершена успешно
401auth_errorОшибка авторизации
403firm_access_denied_errorУ фирмы имеются ограничения на данную операцию

 

/bylist?withArch=true