Получить список торгов заказчика
Порядок работы для агента · Методы API и схема OpenAPI.
Назначение
Получите торги заказчика. Найдите запись по orderId в data.items и проверьте canChooseWinner и isAutoAuction перед выбором победителя.
Блоки запроса и ответов ниже сгенерированы из OpenAPI. Подстановки вроде
exampleпоказывают структуру JSON. Для вызова возьмите значения из сценария, справочников или предыдущих ответов API.
Request
POST
https://partner-test-yamagistrali.ru/api/demand/listForForwarder/v0
Тестовый стенд
Body
application/json
{
"data": {}
}
|
Name |
Description |
|
data |
Type: DemandListForForwarderV0Request Example
|
DemandListForForwarderV0Request
Type: object
Example
{}
Responses
200 OK
OK
Body
application/json
{
"data": {
"items": [
{
"agreementTerms": {},
"auction": null,
"betCount": 0,
"bodyType": [
"example"
],
"bodyTypeComment": "example",
"canChooseWinner": true,
"cargoType": "example",
"cargoTypeComment": "example",
"createAt": {
"displayTZ": "+03:00",
"time": "2020-01-01T00:00:00"
},
"creatorUser": "example",
"declaredCost": 0.5,
"demandStoreState": "example",
"demandVirtualState": "example",
"editorUsers": [
"example"
],
"extId": "example",
"forwarderId": "example",
"fromNp": {
"address": "example",
"comeTill": null,
"comeWith": null,
"comment": "example",
"lat": 0.5,
"loadingTime": 0,
"locality": "example",
"lon": 0.5,
"nodalPointId": "example",
"npLegalType": "example"
},
"id": "example",
"isAutoAuction": true,
"isUseMobileApp": true,
"loadingType": [
"example"
],
"medList": [
null
],
"minBetCost": 0.5,
"observerUsers": [
"example"
],
"orderId": "example",
"orderType": "example",
"pallets": 0,
"possibleBetCount": 0,
"possibleExecutorIds": [
"example"
],
"specialConditions": "example",
"temperatureFrom": 0,
"temperatureTo": 0,
"toNp": null,
"updateAt": null,
"volume": 0.5,
"weight": 0.5,
"winnerExecuteId": "example"
}
]
}
}
|
Name |
Description |
|
data |
Type: DemandListForForwarderV0Response Example
|
DemandAgreementTerms
|
Name |
Description |
|
deferredPaymentDays |
Type: integer кол-во дней отстрочки платежа |
|
documentFormat |
Type: string формат документов( скан; оригинал; подписанная копия) Example: |
|
freeCancellationTime |
Type: integer время бесплатной отмены |
|
idleHourCost |
Type: number стоимость 1ч простоя |
|
idleIncludedTariff |
Type: number простой включенный в тариф |
|
isFactoring |
Type: boolean факторинг |
|
isPrepayment |
Type: boolean постоплата/предоплата |
|
paymentType |
Type: string наличка/безнал/биилинг Example: |
|
penaltyCancellation |
Type: number штраф за отмену |
|
penaltyForBeingLate |
Type: number Штрафы за опоздание (минуты) |
|
penaltyForProvidingDocuments |
Type: number Штрафы за предоставление документов |
|
postponementDocumentSubmission |
Type: integer кол-во дней отстрочки предоставления документов |
Example
{
"deferredPaymentDays": 0,
"documentFormat": "example",
"freeCancellationTime": 0,
"idleHourCost": 0.5,
"idleIncludedTariff": 0.5,
"isFactoring": true,
"isPrepayment": true,
"paymentType": "example",
"penaltyCancellation": 0.5,
"penaltyForBeingLate": 0.5,
"penaltyForProvidingDocuments": 0.5,
"postponementDocumentSubmission": 0
}
TimestampTZOutput
|
Name |
Description |
|
displayTZ |
Type: string Example: |
|
time |
Type: string<date-time> Example: |
Example
{
"displayTZ": "+03:00",
"time": "2020-01-01T00:00:00"
}
DemandAuctionResponse
|
Name |
Description |
|
endDateTime |
All of 1 type
окончание дата + время Example
|
|
exchange |
Type: string Example: |
|
isDowngradeOnly |
Type: boolean только на понижение bool |
|
isInProgress |
Type: boolean в процессе (вычисляемое поле) |
|
isNoHigherMine |
Type: boolean не выше моей bool |
|
startDateTime |
All of 1 type
начало дата + время Example
|
|
cost |
Type: number | null стоимость |
|
step |
Type: number | null шаг/кратность int (default 1) |
Example
{
"cost": 0.5,
"endDateTime": {
"displayTZ": "+03:00",
"time": "2020-01-01T00:00:00"
},
"exchange": "example",
"isDowngradeOnly": true,
"isInProgress": true,
"isNoHigherMine": true,
"startDateTime": null,
"step": 0.5
}
DemandPointResponse
|
Name |
Description |
|
address |
Type: string Example: |
|
comeTill |
All of 1 type
Приехать ПО (дата + время) Example
|
|
comeWith |
All of 1 type
Приехать С (дата + время) Example
|
|
lat |
Type: number |
|
loadingTime |
Type: integer Время погрузоразгрузочных работ напрмер 146 минут |
|
locality |
Type: string Example: |
|
lon |
Type: number |
|
nodalPointId |
Type: string Населенный пункт погрузки/выгрузки; полный адрес в детализации; Example: |
|
npLegalType |
Type: string Example: |
|
comment |
Type: string | null Example: |
Example
{
"address": "example",
"comeTill": {
"displayTZ": "+03:00",
"time": "2020-01-01T00:00:00"
},
"comeWith": null,
"comment": "example",
"lat": 0.5,
"loadingTime": 0,
"locality": "example",
"lon": 0.5,
"nodalPointId": "example",
"npLegalType": "example"
}
DemandListForForwarderV0Demand
|
Name |
Description |
|
auction |
All of 1 type
торги Example
|
|
betCount |
Type: integer |
|
bodyTypeComment |
Type: string тип кузова комментарий Example: |
|
cargoType |
Type: string тип груза Example: |
|
cargoTypeComment |
Type: string тип груза комментарий Example: |
|
createAt |
Type: TimestampTZOutput Example
|
|
creatorUser |
Type: string автор/владелец; автор ставки; Example: |
|
demandStoreState |
Type: string Example: |
|
demandVirtualState |
Type: string Example: |
|
extId |
Type: string внешний id/ id Example: |
|
forwarderId |
Type: string заказчик услуги Example: |
|
fromNp |
Type: DemandPointResponse Example
|
|
id |
Type: string Example: |
|
isAutoAuction |
Type: boolean |
|
isUseMobileApp |
Type: boolean обязательное использование мобильного приложения |
|
orderId |
Type: string название грузоместа (?) - только у заказчика order_id Example: |
|
orderType |
Type: string Тип заявки ftl (полная машина) ltl (решает логист) Example: |
|
possibleBetCount |
Type: integer |
|
specialConditions |
Type: string особые условия поле для включения в договор text Example: |
|
toNp |
Type: DemandPointResponse Example
|
|
updateAt |
Type: TimestampTZOutput Example
|
|
volume |
Type: number |
|
weight |
Type: number |
|
agreementTerms |
Any of 2 types
условия по договору Example
|
|
bodyType |
Type: string[] | null тип кузова Example
|
|
canChooseWinner |
Type: boolean | null |
|
declaredCost |
Type: number | null Объявленная стоимость |
|
editorUsers |
Type: string[] | null Example
|
|
loadingType |
Type: string[] | null тип погрузки Example
|
|
medList |
Type: DemandPointResponse[] | null Example
|
|
minBetCost |
Type: number | null |
|
observerUsers |
Type: string[] | null Example
|
|
pallets |
Type: integer | null вес и объем вместимости тс (палетность (опц)) |
|
possibleExecutorIds |
Type: string[] | null Идентификаторы возможных исполнителей Example
|
|
temperatureFrom |
Type: integer | null Температура от |
|
temperatureTo |
Type: integer | null Температура до |
|
winnerExecuteId |
Type: string | null Example: |
Example
{
"agreementTerms": {
"deferredPaymentDays": 0,
"documentFormat": "example",
"freeCancellationTime": 0,
"idleHourCost": 0.5,
"idleIncludedTariff": 0.5,
"isFactoring": true,
"isPrepayment": true,
"paymentType": "example",
"penaltyCancellation": 0.5,
"penaltyForBeingLate": 0.5,
"penaltyForProvidingDocuments": 0.5,
"postponementDocumentSubmission": 0
},
"auction": {
"cost": 0.5,
"endDateTime": {
"displayTZ": "+03:00",
"time": "2020-01-01T00:00:00"
},
"exchange": "example",
"isDowngradeOnly": true,
"isInProgress": true,
"isNoHigherMine": true,
"startDateTime": null,
"step": 0.5
},
"betCount": 0,
"bodyType": [
"example"
],
"bodyTypeComment": "example",
"canChooseWinner": true,
"cargoType": "example",
"cargoTypeComment": "example",
"createAt": null,
"creatorUser": "example",
"declaredCost": 0.5,
"demandStoreState": "example",
"demandVirtualState": "example",
"editorUsers": [
"example"
],
"extId": "example",
"forwarderId": "example",
"fromNp": {
"address": "example",
"comeTill": null,
"comeWith": null,
"comment": "example",
"lat": 0.5,
"loadingTime": 0,
"locality": "example",
"lon": 0.5,
"nodalPointId": "example",
"npLegalType": "example"
},
"id": "example",
"isAutoAuction": true,
"isUseMobileApp": true,
"loadingType": [
"example"
],
"medList": [
null
],
"minBetCost": 0.5,
"observerUsers": [
"example"
],
"orderId": "example",
"orderType": "example",
"pallets": 0,
"possibleBetCount": 0,
"possibleExecutorIds": [
"example"
],
"specialConditions": "example",
"temperatureFrom": 0,
"temperatureTo": 0,
"toNp": null,
"updateAt": null,
"volume": 0.5,
"weight": 0.5,
"winnerExecuteId": "example"
}
DemandListForForwarderV0Response
|
Name |
Description |
|
items |
Type: DemandListForForwarderV0Demand[] | null Example
|
Example
{
"items": [
{
"agreementTerms": {
"deferredPaymentDays": 0,
"documentFormat": "example",
"freeCancellationTime": 0,
"idleHourCost": 0.5,
"idleIncludedTariff": 0.5,
"isFactoring": true,
"isPrepayment": true,
"paymentType": "example",
"penaltyCancellation": 0.5,
"penaltyForBeingLate": 0.5,
"penaltyForProvidingDocuments": 0.5,
"postponementDocumentSubmission": 0
},
"auction": {
"cost": 0.5,
"endDateTime": null,
"exchange": "example",
"isDowngradeOnly": true,
"isInProgress": true,
"isNoHigherMine": true,
"startDateTime": null,
"step": 0.5
},
"betCount": 0,
"bodyType": [
"example"
],
"bodyTypeComment": "example",
"canChooseWinner": true,
"cargoType": "example",
"cargoTypeComment": "example",
"createAt": {
"displayTZ": "+03:00",
"time": "2020-01-01T00:00:00"
},
"creatorUser": "example",
"declaredCost": 0.5,
"demandStoreState": "example",
"demandVirtualState": "example",
"editorUsers": [
"example"
],
"extId": "example",
"forwarderId": "example",
"fromNp": {
"address": "example",
"comeTill": null,
"comeWith": null,
"comment": "example",
"lat": 0.5,
"loadingTime": 0,
"locality": "example",
"lon": 0.5,
"nodalPointId": "example",
"npLegalType": "example"
},
"id": "example",
"isAutoAuction": true,
"isUseMobileApp": true,
"loadingType": [
"example"
],
"medList": [
null
],
"minBetCost": 0.5,
"observerUsers": [
"example"
],
"orderId": "example",
"orderType": "example",
"pallets": 0,
"possibleBetCount": 0,
"possibleExecutorIds": [
"example"
],
"specialConditions": "example",
"temperatureFrom": 0,
"temperatureTo": 0,
"toNp": null,
"updateAt": null,
"volume": 0.5,
"weight": 0.5,
"winnerExecuteId": "example"
}
]
}
400 Bad Request
Bad Request
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|
Error
|
Name |
Description |
|
info |
Type: object Example
|
|
message |
Type: string Example: |
|
message_code |
Type: string Example: |
Example
{
"info": {},
"message": "example",
"message_code": "example"
}
403 Forbidden
Forbidden
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|
500 Internal Server Error
Internal Server Error
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|