Получить список торгов заказчика

Порядок работы для агента · Методы 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
{
  "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"
    }
  ]
}

DemandAgreementTerms

Name

Description

deferredPaymentDays

Type: integer

кол-во дней отстрочки платежа

documentFormat

Type: string

формат документов( скан; оригинал; подписанная копия)

Example: example

freeCancellationTime

Type: integer

время бесплатной отмены

idleHourCost

Type: number

стоимость 1ч простоя

idleIncludedTariff

Type: number

простой включенный в тариф

isFactoring

Type: boolean

факторинг

isPrepayment

Type: boolean

постоплата/предоплата

paymentType

Type: string

наличка/безнал/биилинг

Example: 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: +03:00

time

Type: string<date-time>

Example: 2020-01-01T00:00:00

Example
{
  "displayTZ": "+03:00",
  "time": "2020-01-01T00:00:00"
}

DemandAuctionResponse

Name

Description

endDateTime

All of 1 type
  • Type: TimestampTZOutput

    Example
    {
      "displayTZ": "+03:00",
      "time": "2020-01-01T00:00:00"
    }
    

окончание дата + время

Example
{
  "displayTZ": "+03:00",
  "time": "2020-01-01T00:00:00"
}

exchange

Type: string

Example: example

isDowngradeOnly

Type: boolean

только на понижение bool

isInProgress

Type: boolean

в процессе (вычисляемое поле)

isNoHigherMine

Type: boolean

не выше моей bool

startDateTime

All of 1 type
  • Type: TimestampTZOutput

    Example
    {
      "displayTZ": "+03:00",
      "time": "2020-01-01T00:00:00"
    }
    

начало дата + время

Example
{
  "displayTZ": "+03:00",
  "time": "2020-01-01T00:00:00"
}

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: example

comeTill

All of 1 type
  • Type: TimestampTZOutput

    Example
    {
      "displayTZ": "+03:00",
      "time": "2020-01-01T00:00:00"
    }
    

Приехать ПО (дата + время)

Example
{
  "displayTZ": "+03:00",
  "time": "2020-01-01T00:00:00"
}

comeWith

All of 1 type
  • Type: TimestampTZOutput

    Example
    {
      "displayTZ": "+03:00",
      "time": "2020-01-01T00:00:00"
    }
    

Приехать С (дата + время)

Example
{
  "displayTZ": "+03:00",
  "time": "2020-01-01T00:00:00"
}

lat

Type: number

loadingTime

Type: integer

Время погрузоразгрузочных работ напрмер 146 минут

locality

Type: string

Example: example

lon

Type: number

nodalPointId

Type: string

Населенный пункт погрузки/выгрузки; полный адрес в детализации;

Example: example

npLegalType

Type: string

Example: example

comment

Type: string | null

Example: 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
  • Type: DemandAuctionResponse

    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
    }
    

торги

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
}

betCount

Type: integer

bodyTypeComment

Type: string

тип кузова комментарий

Example: example

cargoType

Type: string

тип груза

Example: example

cargoTypeComment

Type: string

тип груза комментарий

Example: example

createAt

Type: TimestampTZOutput

Example
{
  "displayTZ": "+03:00",
  "time": "2020-01-01T00:00:00"
}

creatorUser

Type: string

автор/владелец; автор ставки;

Example: example

demandStoreState

Type: string

Example: example

demandVirtualState

Type: string

Example: example

extId

Type: string

внешний id/ id

Example: example

forwarderId

Type: string

заказчик услуги

Example: example

fromNp

Type: DemandPointResponse

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"
}

id

Type: string

Example: example

isAutoAuction

Type: boolean

isUseMobileApp

Type: boolean

обязательное использование мобильного приложения

orderId

Type: string

название грузоместа (?) - только у заказчика order_id

Example: example

orderType

Type: string

Тип заявки ftl (полная машина) ltl (решает логист)

Example: example

possibleBetCount

Type: integer

specialConditions

Type: string

особые условия поле для включения в договор text

Example: example

toNp

Type: DemandPointResponse

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"
}

updateAt

Type: TimestampTZOutput

Example
{
  "displayTZ": "+03:00",
  "time": "2020-01-01T00:00:00"
}

volume

Type: number

weight

Type: number

agreementTerms

Any of 2 types
  • Type: DemandAgreementTerms

    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
    }
    
  • Type: object | null

    Const: null

    Example
    {}
    

условия по договору

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
}

bodyType

Type: string[] | null

тип кузова

Example
[
  "example"
]

canChooseWinner

Type: boolean | null

declaredCost

Type: number | null

Объявленная стоимость

editorUsers

Type: string[] | null

Example
[
  "example"
]

loadingType

Type: string[] | null

тип погрузки

Example
[
  "example"
]

medList

Type: DemandPointResponse[] | null

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"
  }
]

minBetCost

Type: number | null

observerUsers

Type: string[] | null

Example
[
  "example"
]

pallets

Type: integer | null

вес и объем вместимости тс (палетность (опц))

possibleExecutorIds

Type: string[] | null

Идентификаторы возможных исполнителей

Example
[
  "example"
]

temperatureFrom

Type: integer | null

Температура от

temperatureTo

Type: integer | null

Температура до

winnerExecuteId

Type: string | null

Example: 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
[
  {
    "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": 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"
  }
]
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
{
  "info": {},
  "message": "example",
  "message_code": "example"
}

Error

Name

Description

info

Type: object

Example
{}

message

Type: string

Example: example

message_code

Type: string

Example: 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
{
  "info": {},
  "message": "example",
  "message_code": "example"
}

500 Internal Server Error

Internal Server Error

Body

application/json
{
  "error": {
    "info": {},
    "message": "example",
    "message_code": "example"
  }
}

Name

Description

error

Type: Error

Example
{
  "info": {},
  "message": "example",
  "message_code": "example"
}