Entur Developer
Distances and zones

Return distance between two fare zones

POST
https://api.entur.io/distance
/fare-zones/distances/zones

Calculates the shortest-path distance between two fare zones, where 'distance' is the number of fare zone borders crossed. All shortest paths of equal length are returned. Nested zones are transparently mapped to their parent overlapping zone before the path is calculated.

Return distance between two fare zones › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Return distance between two fare zones › Request Body

from
​string
to
​string
organisationId
​integer | null · int64
time
​string | null · date-time
via
​array | null

Use 'via' to force the path through one or more intermediate zones.

preOwned
​array | null · unique

Use 'preOwned' to exclude zones the traveller already owns — these zones are not counted toward the distance.

Return distance between two fare zones › Responses

OK

fromZoneId
​string
toZoneId
​string
organisationId
​integer · int64
distance
​integer · int32
​Zones[]
​array | null

This field only gets populated if the direct path from-to is shorter than the via path


Return zone distance between two stop places

POST
https://api.entur.io/distance
/fare-zones/distances/stops

Resolves stop places to coordinates, then determines which overlapping fare zones each stop belongs to. Because a stop place can belong to multiple overlapping fare zones, all zone combinations are evaluated and one result per combination is returned. The request does support mixing zones into the stop places. If only doing zones the recommended url is /fare-zones/distances/zones as it is faster

Return zone distance between two stop places › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Return zone distance between two stop places › Request Body

stopPlaces
​string[] · minItems: 1 · required

Ordered list of stop place IDs (first is origin, last is destination, any in between are via-points) the path must pass through. If needed the list can also contain Zones

organisationId
​integer | null · int64
codespaces
​string | null · minLength: 3 · maxLength: 3
time
​string | null · date-time
preOwned
​array | null · unique

Return zone distance between two stop places › Responses

OK

fromZoneId
​string
toZoneId
​string
organisationId
​integer · int64
distance
​integer · int32
​Zones[]
​array | null

This field only gets populated if the direct path from-to is shorter than the via path


Return distance from polyline

POST
https://api.entur.io/distance
/fare-zones/distances/polyline

Finds all zones that a polyline passes through

Return distance from polyline › query Parameters

organisationId
​integer[] · required · style: form · explode: true

List of organisations that one might request zones through

time
​string · date-time · style: form · explode: true

The time at which the distance is active. This defaults to now

excludePolylineCoordinates
​boolean · style: form · explode: true

Removes the polyline coordinates from the response

Return distance from polyline › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Return distance from polyline › Request Body

string
Example: cxk~Fhy~uO

Return distance from polyline › Responses

OK

from
​string[]
to
​string[]
​array | null
allZonesCrossed
​string[]
​OrgBasedDistances[]

Did you find what you were looking for?