Получение всех своих грузов [1.0]

Описание

Получение всех своих грузов. Так же доступен фильтр по контакту.

(Получать этим методом чужие грузы с общей площадки нельзя. Метод предназначен для работы со своими грузами.)

Структура URL

HTTP метод: GET, ресурс: <base_url>/loads?contactId=<contactId>

Результат

Массив структур "Груз"

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

Название
Описание
Способ передачи параметра
Обязательный
contactIdId контакта, для которого необходимо получить грузы. Будут получены только те грузы, у которых ContactId1 == contactId либо ContactId2 == contactIdURL

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

Запрос

GET, http://api.ati.su/loads?contactId=0

Ответ

Json вида

[
  {
    "Id": "24dcc39c-b85f-e611-80cd-10c37b6f39fc",
    "UpdatedAt": "2016-08-11T11:42:00.003Z",
    "AddedAt": "2016-08-11T11:42:00.003Z",
    "CanBeDeleted": true,
    "CanBeEdited": true,
    "CanBeRenewed": true,
    "EditRestriction": 0,
    "DeleteRestriction": 0,
    "RenewRestriction": "",
    "Distance": 2393,
    "Zimnik": false,
    "Ferries": false,
    "TruePrice": 0,
    "TrueCurrencyId": 0,
    "ResponseCount": 0,
    "OfferCount": 0,
    "SmsEnabled": false,
    "InsuredMinTariff": 0,
    "FirmId": 998110,
    "ContactId1": 0,
    "ContactId2": null,
    "Note": "",
    "FirstDate": "2016-08-11T00:00:00",
    "LastDate": "2016-08-11T00:00:00",
    "DateType": 0,
    "PeriodicityId": 0,
    "Krugoreis": false,
    "Loading": {
      "CityId": 1,
      "Latitude": null,
      "Longitude": null,
      "Street": "ф ывафыва фыва ",
      "TimeStart": null,
      "TimeEnd": null,
      "LargeCities": []
    },
    "ExtraPoints": [],
    "Unloading": {
      "CityId": 60,
      "Latitude": null,
      "Longitude": null,
      "Street": "фыв афыв аф",
      "TimeStart": null,
      "TimeEnd": null,
      "LargeCities": []
    },
    "Cargo": {
      "Weight": 5,
      "Volume": 8,
      "ADR": 0,
      "CargoTypeId": 90,
      "CargoType": "",
      "PackType": 0,
      "PalletCount": 0,
      "BeltCount": 0,
      "DogruzType": 1,
      "SborGruz": false,
      "Size": {
        "Length": 1,
        "Width": 2,
        "Height": 2,
        "LengthHighlight": false,
        "WidthHighlight": false,
        "HeightHighlight": false
      }
    },
    "Transport": {
      "CarType": 70368744191065,
      "LoadingType": 4,
      "LoadingLogicalOperator": "OR",
      "UnloadingType": 4,
      "UnloadingLogicalOperator": "OR",
      "TrucksQuantity": 1,
      "TemperatureFrom": null,
      "TemperatureTo": null,
      "Stsepka": false,
      "Pnevmohod": false,
      "Koniki": false,
      "TIR": false,
      "CMR": false,
      "T1": false,
      "SanPassport": false
    },
    "Payment": {
      "CurrencyId": 9,
      "MoneyType": 22,
      "RateSum": 234,
      "SumWithNDS": 0,
      "SumWithoutNDS": 0,
      "PrepayPercent": 0,
      "PrepayPercentEnabled": false,
      "PayDays": 0,
      "PayDaysEnabled": false,
      "FixedRate": true,
      "Torg": false,
      "DirectContract": false,
      "OnUnloading": false
    },
	"PriorityView": {
    	"DailyLimit": 5,
    	"IsForPayedOnly": true,
   	 	"OrderLimit": 50,
   	 	"ViewRate": 0.5
  	},
    "Stealth": null,
    "Boards": [
      {
        "BoardId": "56e18fe1bf80ea575cbd5c47",
        "PublicationTime": "2016-08-11T11:42:00.307Z",
        "PublicationOption": 0,
        "IsPublished": true
      },
      {
        "BoardId": "57165a3dd3df9930241f5f24",
        "PublicationTime": "2016-08-11T11:42:00.307Z",
        "PublicationOption": 0,
        "IsPublished": true
      }
    ],
   "LoadMeta": {
      "LoadMetaId": "f10420a3-3e6d-462c-a90b-f22ec58ab4dc",
      "MetaData": "Данные груза"
  }
 },
  {
    "Id": "f335ecaa-b85f-e611-80cd-10c37b6f39fc",
    "UpdatedAt": "2016-08-11T11:42:23.757Z",
    "AddedAt": "2016-08-11T11:42:23.757Z",
    "CanBeDeleted": true,
    "CanBeEdited": true,
    "CanBeRenewed": true,
    "EditRestriction": 0,
    "DeleteRestriction": 0,
    "RenewRestriction": "",
    "Distance": 2393,
    "Zimnik": false,
    "Ferries": false,
    "TruePrice": 0,
    "TrueCurrencyId": 0,
    "ResponseCount": 0,
    "OfferCount": 0,
    "SmsEnabled": false,
    "FirmId": 998110,
    "ContactId1": 0,
    "ContactId2": null,
    "Note": "",
    "FirstDate": "2016-08-11T00:00:00",
    "LastDate": "2016-08-11T00:00:00",
    "DateType": 0,
    "PeriodicityId": 0,
    "Krugoreis": false,
    "Loading": {
      "CityId": 1,
      "Latitude": null,
      "Longitude": null,
      "Street": "ф ывафыва фыва ",
      "TimeStart": null,
      "TimeEnd": null,
      "LargeCities": []
    },
    "ExtraPoints": [],
    "Unloading": {
      "CityId": 60,
      "Latitude": null,
      "Longitude": null,
      "Street": "фыв афыв аф",
      "TimeStart": null,
      "TimeEnd": null,
      "LargeCities": []
    },
    "Cargo": {
      "Weight": 1,
      "Volume": 4,
      "ADR": 0,
      "CargoTypeId": 10,
      "CargoType": "",
      "PackType": 2,
      "PalletCount": 0,
      "BeltCount": 0,
      "DogruzType": 1,
      "SborGruz": false,
      "Size": {
        "Length": 4,
        "Width": 2,
        "Height": 2,
        "LengthHighlight": false,
        "WidthHighlight": false,
        "HeightHighlight": false
      }
    },
    "Transport": {
      "CarType": 70368744191065,
      "LoadingType": 7,
      "LoadingLogicalOperator": "OR",
      "UnloadingType": 4,
      "UnloadingLogicalOperator": "OR",
      "TrucksQuantity": 1,
      "TemperatureFrom": null,
      "TemperatureTo": null,
      "Stsepka": false,
      "Pnevmohod": false,
      "Koniki": false,
      "TIR": false,
      "CMR": false,
      "T1": false,
      "SanPassport": false
    },
    "Payment": {
      "CurrencyId": 9,
      "MoneyType": 22,
      "RateSum": 44,
      "SumWithNDS": 0,
      "SumWithoutNDS": 0,
      "PrepayPercent": 0,
      "PrepayPercentEnabled": false,
      "PayDays": 0,
      "PayDaysEnabled": false,
      "FixedRate": true,
      "Torg": false,
      "DirectContract": false,
      "OnUnloading": false
    },
    "PriorityView": null,
    "Stealth": null,
	"Deal": null,
 	"Boards": [
      {
        "BoardId": "a0a0a0a0a0a0a0a0a0a0a0a0",
        "PublicationTime": "2016-08-10T14:21:50.89Z",
        "PublicationOption": 0,
        "IsPublished": true
      }
    ],
   "LoadMeta": {
      "LoadMetaId": "f10420a3-3e6d-462c-a90b-f22ec58ab4dc",
      "MetaData": "Данные груза"
   },
   "Deal": {
      "DealType": 2,
      "FixedRates": [],
      "Auction": {
            "AuctionId": "039f2943-da4d-e211-b493-14dae93e0938",
            "LoadId": "24dcc39c-b85f-e611-80cd-10c37b6f39fc",
            "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--Требуется авторизация
404contact_not_found_errorКонтакт, указанный в contactId не найден