API альтернативных пунктов пропуска Online
Ближайшие альтернативные пункты пропуска на той же границе с текущими очередями и разницей в расстоянии.
GET https://nakordoni.eu/api/v1/data/alternatives
— класс квоты: cheap
| Параметр | Описание |
|---|---|
ppid | ID пункта пропуска |
lang | Код языка |
crossing_type | Переопределить фильтр типа транспортного средства — напр. 4=авто, 6=автобус, 7=пешеход, 9=грузовик |
limit | Максимальное количество результатов (по умолчанию 5) |
Поля ответа — внутри объекта data в конверте ответа. [] обозначает список, поэтому data.items[].name — это поле name каждого элемента. Поле бывает null, отсутствует или пустой список, если значения у нас нет, — заглушки мы не подставляем.
| Поле | Описание |
|---|---|
data.ppid | The checkpoint you asked about, with checkpoint.name, checkpoint.queue, checkpoint.unit and checkpoint.source_url. |
data.crossing_type_filter | Vehicle type the alternatives were filtered to. |
data.alternatives[].ppid | A nearby crossing on the same border, with name and source_url. |
data.alternatives[].distance_km | Road distance from the checkpoint you asked about. |
data.alternatives[].queue | Its queue now, in unit, and diff — the difference against your checkpoint (negative = shorter). |
data.alternatives[].is_better | true when this crossing is currently the better bet. |
data.best | The single best alternative, same fields — null when none beats your checkpoint. |
data.generated_at | When the comparison was made. |
curl "https://nakordoni.eu/api/v1/data/alternatives?ppid=id_13&crossing_type=4" \ -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"
🔑 Войдите как разработчик, чтобы протестировать этот эндпоинт вживую в песочнице — 50 бесплатных тестовых вызовов в день. Войти