Open Data Platform Swiss Public Transport offers different APIs.
An API keyword is required to access these APIs. This token can be obtained via the Developer Portal. The token must also be sent in the HTTP header as “Authorization” for each request. Its use is subject to certain restrictions.
The Developer Portal allows:
- API keys to be created
- API keys to be deleted
- The observation of how much of the allocation is used up by the key.
These APIs are NOT REST APIs, which means that they cannot be described simply either using tools like Swagger. The required document is available via the links.
VDV 431: Properties
VDV 431 is NOT a REST service. Via a single access point
requests can be submitted via “POST”.
(NB: No “/” at the end in the call)
The Authorization Header must contain the API key.
Content type must be set to “text/XML” or “application/XML”.
The response is always an XML structure which depends on the service. This must then be processed.