API alternativních přechodů Online
Blízké alternativní přechody na stejné hranici s aktuálními frontami a rozdíly vzdáleností.
GET https://nakordoni.eu/api/v1/data/alternatives
— třída kvóty: cheap
| Parametr | Popis |
|---|---|
ppid | ID přechodu |
lang | Kód jazyka |
crossing_type | Přepsat filtr typu vozidla — např. 4=auto, 6=autobus, 7=chodec, 9=nákladní |
limit | Max. počet výsledků (výchozí 5) |
Pole odpovědi — uvnitř objektu data v obálce odpovědi. [] označuje seznam, takže data.items[].name je pole name každého prvku. Pole bývá null, chybí nebo je prázdný seznam, když pro něj nemáme hodnotu — zástupný údaj nedoplňujeme.
| Pole | Popis |
|---|---|
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"
🔑 Přihlaste se jako vývojář a vyzkoušejte tento endpoint naživo v sandboxu — 50 bezplatných testovacích volání denně. Přihlásit se