NeTEx 2.0
This section describes the NeTEx (Network Timetable EXchange) XML schema, explained in full on the NeTEx GitHub v2.0.
Authentication
$ curl -H "X-Access-Token: $API_KEY" \
https://api.voiapp.io/huginn/netexv2/zip/1
All endpoints are protected with API key authentication. Include your API key in the X-Access-Token request header on every request.
Contact our engineering support to receive your API key.
Header Parameters
| Key | Value |
|---|---|
| X-Access-Token | your-api-key |
Versioning
Voi's NeTEx API supports the official NeTEx XML schema version 2.0 only. Consult the official NeTEx documentation for schema details and versioning.
See the NeTEx GitHub description of version 2.0 here.
Current NeTEx implementation only supports the official schema of version 2.0.
Supported frames
Of the official NeTEx 2.0 data frames, Voi supports the following:
| Frame | Description |
|---|---|
FareFrame | Fare structures, products, restrictions, sales packages and prices. |
MobilityServiceFrame | Alternative mobility services, including fleets and mobility service constraint zones. |
ResourceFrame | Common reference data such as operators, modes, facilities, equipment and vehicle types. |
SiteFrame | Places and sites such as stations, points of interest and parking, including access information. |
For the full definition of each frame, see the official NeTEx v2.0 documentation.
Download
A NeTEx zip request.
# v2.0 - Stockholm
$ curl -L \
-H "X-Access-Token: $API_KEY" \
-o voi_1.zip \
"https://api.voiapp.io/huginn/netexv2/zip/1"
Do not copy ^ as the zone-ID might not match yours
The /zip endpoint returns a NeTEx XML export as a zip archive for a given zone. zoneID is mandatory and the consumer must have access to that zone.
The example above downloads the NeTEx file for Stockholm (zoneID 1) to voi_1.zip. Use -L so curl follows any redirects, and -o to write the archive to disk.
See the NeTEx GitHub description of the XML schema v2.0.
HTTPS request
GET https://api.voiapp.io/huginn/netexv2/zip/{zoneID}
Path parameters
| parameter | description | presence |
|---|---|---|
| zoneID | The zone id for the requested NeTEx file | required |