For search links, partners will provide a search-specific base URL (see Partner Configuration). We support the following query parameters:
| Field Name | Details |
|---|---|
from_stop_id |
(Repeatable) Identifier of the stops at which the trip may start. The values of the |
to_stop_id |
(Repeatable) Identifier of the stops at which the trip may end. The values of the |
search_date |
(Date) Service day of the trip. This field contains the date with the following format string:
|
lang |
(IETF BCP 47, Optional) Field used to indicate the selected language of the booking site. The value of this field conforms to IETF BCP 47, e.g. If the selected language is not available or the field is not passed, the booking site should use a fallback language. |
cur |
(ISO 4217, Optional) Field used to indicate the currency that prices should be displayed in. The value of this field conforms to ISO 4217, e.g. If the selected currency cannot be shown or the field is not passed, the booking site should use a fallback currency. |
utm_source |
(String, Optional) Field used to indicate the high-level site that sent the traffic. Possible values are |
All repeatable parameters are specified as a JSON array. For from_stop_id
and to_stop_id, multiple values represent multiple stations at the origin
and destination localities.
Examples
In this example, the user queries for trains from locality1 to locality2:
locality1maps to stations withstop_idsf1andf2.locality2maps to stations withstop_idst1andt2.- The service date is
20190716.
For this example, the base URL is https://example.com.
Given all of this information, use the following values for the parameters:
| Field name | Details |
|---|---|
from_stop_id |
["f1", "f2"] |
to_stop_id |
["t1", "t2"] |
service_date |
20190716 |
The following is the final URI after encoding:
https://example.com?from_stop_id=%5B%22f1%22,%22f2%22%5D&to_stop_id=%5B%22t1%22,%22t2%22%5D&search_date=20190716
In the landing page, the user will be able to view itineraries departing from
stations f1 and f2 on 20190716 and arriving at t1 and t2. All
station combinations are supported:
- From
f1tot1 - From
f1tot2 - From
f2tot1 - From
f2tot2