Получение одного груза [1.0]

Описание

Получение одного груза с выбранным id.

Структура URL

HTTP метод: GET, ресурс: <base_url>/loads/<id_груза>

Результат

Структура "Груз"

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

НазваниеОписаниеСпособ передачи параметраОбязательный
id_грузаid грузаURL+

 

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

Запрос

GET, http://api.ati.su/loads/039f2943-da4d-e211-b493-14dae93e0938

Ответ

json вида

{
    "Id": "039f2943-da4d-e211-b493-14dae93e0938",
    "FirmId": 1,
    "UpdatedAt": "2015-09-28T13:44:10.063Z",
    "AddedAt": "2012-05-31T11:41:53.7Z",
    "CanBeDeleted": true,
    "CanBeEdited": true,
    "CanBeRenewed": true,
    "EditRestriction": 0,
    "DeleteRestriction": 0,
    "RenewRestriction": "",
    "Distance": 3820,
    "Zimnik": false,
    "Ferries": false,
    "TruePrice": 0,
    "TrueCurrencyId": 0,
	"PriorityView": {
    	"DailyLimit": 5,
    	"IsForPayedOnly": true,
   	 	"OrderLimit": 50,
   	 	"ViewRate": 0.5,
        "MoneySpentPerDay": 1.0,
        "MoneySpentPerOrder" : 2.0
  	},
    "Stealth": {
      "FirmRegDateToHide": "2012-06-02T12:00:00"
    },
    "Deal": null,
    "Boards": [
	    {
	      "BoardId": "56e18fe1bf80ea575cbd5c47",
    	  "PublicationTime": "2016-08-18T11:51:54.037Z",
	      "PublicationOption": 0,
	      "IsPublished": true
    	},
	    {
    	  "BoardId": "a0a0a0a0a0a0a0a0a0a0a0a0",
	      "PublicationTime": "2016-08-18T14:51:54.037Z",
	      "PublicationOption": 4,
    	  "IsPublished": false
    	}
  	],
    "ResponseCount": 0,
    "OfferCount": 0,
    "SmsEnabled": false,
    "InsuredMinTariff": 0,
    "ContactId1": 0,
    "ContactId2": null,
    "Note": "232",
    "FirstDate": "2012-05-30T00:00:00",
    "LastDate": "2012-05-31T00:00:00",
    "DateType": 1,
    "PeriodicityId": 0,
    "Krugoreis": false,
    "Loading": {
      "CityId": 2221,
      "Latitude": null,
      "Longitude": null,
      "Street": "",
      "TimeStart": "2012-05-30T00:00:00",
      "TimeEnd": null,
      "LargeCities": []
    },
    "ExtraPoints": [],
    "Unloading": {
      "CityId": 401,
      "Latitude": null,
      "Longitude": null,
      "Street": "",
      "TimeStart": null,
      "TimeEnd": null,
      "LargeCities": []
    },
    "Cargo": {
      "Weight": 12,
      "Volume": 12,
      "ADR": 0,
      "CargoTypeId": 1,
      "CargoType": "",
      "PackType": 0,
      "PalletCount": 0,
      "BeltCount": 0,
      "DogruzType": 1,
      "SborGruz": false,
      "Size": {
        "Length": 1,
        "Width": 2,
        "Height": 3,
        "LengthHighlight": false,
        "WidthHighlight": false,
        "HeightHighlight": false
      }
    },
    "Transport": {
      "CarType": 2,
      "LoadingType": 0,
      "LoadingLogicalOperator": "AND",
      "UnloadingType": 123,
      "UnloadingLogicalOperator": "AND",
      "TrucksQuantity": 1,
      "TemperatureFrom": null,
      "TemperatureTo": null,
      "Stsepka": false,
      "Pnevmohod": false,
      "Koniki": false,
      "TIR": true,
      "CMR": false,
      "T1": false,
      "SanPassport": false
    },
    "Payment": {
      "CurrencyId": 2,
      "MoneyType": 232,
      "RateSum": 12,
      "SumWithNDS": 0,
      "SumWithoutNDS": 12,
      "PrepayPercent": 0,
      "PrepayPercentEnabled": false,
      "PayDays": 0,
      "PayDaysEnabled": false,
      "FixedRate": true,
      "Torg": false,
      "DirectContract": false,
      "OnUnloading": false
    },
    "LoadMeta": {
      "LoadMetaId": "f10420a3-3e6d-462c-a90b-f22ec58ab4dc",
      "MetaData": "Данные груза"
    },
    "Deal": {
        "DealType": 2,
        "FixedRates": [],
        "Auction": {
            "AuctionId": "f838c916-7d57-e911-80b6-0030487d29e5",
            "LoadId": "039f2943-da4d-e211-b493-14dae93e0938",
            "ActiveDealId": null,
            "ActiveDeal": null,
            "State": 0,
            "Finished": false,
            "StartRate": 3819,
            "StartRateWithVat": 0,
            "StartRateWithoutVat": 0,
            "ActualRate": 3819,
            "ActualRateWithVat": 0,
            "ActualRateWithoutVat": 0,
            "Currency": 1,
            "Step": 500,
            "StepWithVat": 0,
            "StepWithoutVat": 0,
            "PaymentType": 1,
            "AcceptSecondPayType": false,
            "StartDate": "2019-04-05T08:30:41.56Z",
            "EndDate": "2019-04-05T09:00:41.56Z",
            "EndDateBoundary": null,
            "TimeToProvideDocuments": 3,
            "AutoRenew": false,
            "RenewTime": null,
            "MaxRenewTime": null,
            "RaiseBid": false,
            "MaxRate": null,
            "RaiseBidInterval": null,
            "WinDate": null,
            "ResponseInMinutes": null,
            "AuctionRates": [],
            "FinishType": 0,
            "Duration": 30,
            "StartSinceFirstBet": false,
            "ServerDate": "2019-04-05T08:30:41.6285476Z",
            "HasPossibleWinners": false,
            "HasOnlyExWinner": false,
            "WinnerAtiId": null,
            "ParticipantsCount": 0
        }
    }
}


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

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

HTTP код ответаКод ошибкиСообщение
200--Операция завершена успешно
401--Требуется авторизация
404load_not_found_errorГруз не найден