Անցակետերի այլընտրանքների 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"
🔑 Մուտք գործեք որպես ծրագրավորող՝ այս endpoint-ը ուղիղ Sandbox-ում փորձելու համար — օրական 50 անվճար թեստային կանչ։ Մուտք