Entur Developer
Partner
REST
Entur shared mobility router API

Endpoints for TOMP API version 1.6.x


Alter the state of a leg

POST
https://api.entur.io/shared-mobility-router/v1
/tomp/1.6.0/legs/{id}/events

This endpoint must be used to alter the state of a leg.
Operations:
PREPARE the TO can send a message |telling the MP that he is preparing the booked leg [To be implemented by the MP] (see (7.2) in the process flow - trip |execution),
ASSIGN_ASSET can assign an asset to a leg. Can be to assign an asset in case there is still an asset type |assigned [Optionally implementable by the MP]. See (4.7) in the process flow - trip execution
SET_IN_USE will activate |the leg or resume the leg [TO and MP] (see (4.6) in process flow),
TIME_EXTEND will be used to request an extension in |time; the end user wants to use the asset longer, the time field contains the new end time,
TIME_POSTPONE will be |used to request a delay in the departure time, the end user wants to depart later, the time field contains the new |departure time,
PAUSE will pause the leg [TO and MP] (see (4.6) in process flow),
OPEN_TRUNK request the TO to |open up the trunk (of the scooter), e.g. to store the helmet
START_FINISHING will start the end-of-leg [Optionally |implementable by TO and MP],
FINISH will end this leg (see (4.6) in process flow) [TO and MP]

Alter the state of a leg › path Parameters

id
​string · required · style: simple

Leg identifier

Alter the state of a leg › Headers

Accept-Language
​string · required · style: simple

A list of the languages/localizations the user would like to see the results in. For user privacy and ease of |use on the TO side, this list should be kept as short as possible, ideally just one language tag from the list in |operator/information

Api
​string · required · style: simple

API description, can be TOMP or maybe other (specific/derived) API definitions

Api-Version
​string · required · style: simple

Version of the API.

maas-id
​string · required · style: simple

The ID of the sending maas operator

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

addressed-to
​string · style: simple

The ID of the maas operator that has to receive this message

Alter the state of a leg › Request Body

time
​string · date-time · required
event
​string · enum · required
Enum values:
PREPARE
ASSIGN_ASSET
SET_IN_USE
PAUSE
OPEN_TRUNK
START_FINISHING
FINISH
TIME_EXTEND
comment
​string | null

free text, should match Content-Language

url
​array | null

urls to support the event e.g. pictures justifying the exit conditions

​PlaceTO | null
​AssetTO | null

Alter the state of a leg › Responses

operation successful

​PlaceTO · required
id
​string | null

The unique identifier (TO) of this leg

​PlaceTO | null
departureTime
​string | null · date-time

The departure time of this leg. Or, in case of a parking, the start of the usage.

arrivalTime
​string | null · date-time

The intended arrival time at the to place. Or, in case of a parking, the end of the usage.

actualArrivalTime
​string | null · date-time

the 'arrivalTime' can be used as 'plannedArrivalTime' whenever the leg has ended. Use this field to ease searching for discrepances between planned and actual arrival times

actualDepartureTime
​string | null · date-time

the 'departureTime' can be used as 'plannedDepartureTime' whenever the leg has started. Use this field to ease searching for discrepances between planned and actual departure times

travelerReferenceNumbers
​array | null

reference to the travelers field of the request. If missing, it is refering to the first (if any). it is an array to facilitate multiple users on one leg (e.g. using a car). If multiple access informations are needed, please create a leg per used asset.

​AssetTypeTO | null
legSequenceNumber
​integer | null · int32

The order of the leg in the booking. There can be multiple legs with the same sequence (different user or parallel usage (eg. parking lot and a bike)).

​AssetTO | null
​FareTO | null
​SuboperatorTO | null
conditions
​array | null

The conditions that apply to this leg, there may be more conditions in a parent booking and planning object (if this is returned as part of those)

state
​string | null · enum
Enum values:
NOT_STARTED
PREPARING
IN_USE
PAUSED
FINISHING
FINISHED
ISSUE_REPORTED
CANCELLED
departureDelay
​integer | null · int32

A duration of some time (relative to a time) in milliseconds

arrivalDelay
​integer | null · int32

A duration of some time (relative to a time) in milliseconds

distance
​integer | null · int32

The estimated distance travelled in the leg (in meters)

progressGeometry
​array | null

An array of WGS84 coordinate pairs

​TokenTO | null
​TokenTO | null
​array | null
​array | null

Additional information a TO can send to a customer (instructions, sales info, ...)

memo
​string | null

Alter the state of a leg

POST
https://api.entur.io/shared-mobility-router/v1
/tomp/1.6.1/legs/{id}/events

This endpoint must be used to alter the state of a leg.
Operations:
PREPARE the TO can send a message |telling the MP that he is preparing the booked leg [To be implemented by the MP] (see (7.2) in the process flow - trip |execution),
ASSIGN_ASSET can assign an asset to a leg. Can be to assign an asset in case there is still an asset type |assigned [Optionally implementable by the MP]. See (4.7) in the process flow - trip execution
SET_IN_USE will activate |the leg or resume the leg [TO and MP] (see (4.6) in process flow),
TIME_EXTEND will be used to request an extension in |time; the end user wants to use the asset longer, the time field contains the new end time,
TIME_POSTPONE will be |used to request a delay in the departure time, the end user wants to depart later, the time field contains the new |departure time,
PAUSE will pause the leg [TO and MP] (see (4.6) in process flow),
OPEN_TRUNK request the TO to |open up the trunk (of the scooter), e.g. to store the helmet
START_FINISHING will start the end-of-leg [Optionally |implementable by TO and MP],
FINISH will end this leg (see (4.6) in process flow) [TO and MP]

Alter the state of a leg › path Parameters

id
​string · required · style: simple

Leg identifier

Alter the state of a leg › Headers

Accept-Language
​string · required · style: simple

A list of the languages/localizations the user would like to see the results in. For user privacy and ease of |use on the TO side, this list should be kept as short as possible, ideally just one language tag from the list in |operator/information

Api
​string · required · style: simple

API description, can be TOMP or maybe other (specific/derived) API definitions

Api-Version
​string · required · style: simple

Version of the API.

maas-id
​string · required · style: simple

The ID of the sending maas operator

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

addressed-to
​string · style: simple

The ID of the maas operator that has to receive this message

Alter the state of a leg › Request Body

time
​string · date-time · required
event
​string · enum · required
Enum values:
PREPARE
ASSIGN_ASSET
SET_IN_USE
PAUSE
OPEN_TRUNK
START_FINISHING
FINISH
TIME_EXTEND
comment
​string | null

free text, should match Content-Language

url
​array | null

urls to support the event e.g. pictures justifying the exit conditions

​PlaceTO | null
​AssetTO | null

Alter the state of a leg › Responses

operation successful

​PlaceTO · required
id
​string | null

The unique identifier (TO) of this leg

​PlaceTO | null
departureTime
​string | null · date-time

The departure time of this leg. Or, in case of a parking, the start of the usage.

arrivalTime
​string | null · date-time

The intended arrival time at the to place. Or, in case of a parking, the end of the usage.

actualArrivalTime
​string | null · date-time

the 'arrivalTime' can be used as 'plannedArrivalTime' whenever the leg has ended. Use this field to ease searching for discrepances between planned and actual arrival times

actualDepartureTime
​string | null · date-time

the 'departureTime' can be used as 'plannedDepartureTime' whenever the leg has started. Use this field to ease searching for discrepances between planned and actual departure times

travelerReferenceNumbers
​array | null

reference to the travelers field of the request. If missing, it is refering to the first (if any). it is an array to facilitate multiple users on one leg (e.g. using a car). If multiple access informations are needed, please create a leg per used asset.

​AssetTypeTO | null
legSequenceNumber
​integer | null · int32

The order of the leg in the booking. There can be multiple legs with the same sequence (different user or parallel usage (eg. parking lot and a bike)).

​AssetTO | null
​FareTO | null
​SuboperatorTO | null
conditions
​array | null

The conditions that apply to this leg, there may be more conditions in a parent booking and planning object (if this is returned as part of those)

state
​string | null · enum
Enum values:
NOT_STARTED
PREPARING
IN_USE
PAUSED
FINISHING
FINISHED
ISSUE_REPORTED
CANCELLED
departureDelay
​integer | null · int32

A duration of some time (relative to a time) in milliseconds

arrivalDelay
​integer | null · int32

A duration of some time (relative to a time) in milliseconds

distance
​integer | null · int32

The estimated distance travelled in the leg (in meters)

progressGeometry
​array | null

An array of WGS84 coordinate pairs

​TokenTO | null
​TokenTO | null
​array | null
​array | null

Additional information a TO can send to a customer (instructions, sales info, ...)

memo
​string | null

describes the running implementations

GET
https://api.entur.io/shared-mobility-router/v1
/tomp/1.6.1/operator/meta

all versions that are implemented on this url, are described in the result of this endpoint. In contains all |versions and per version the endpoints, their status and the supported scenarios.

describes the running implementations › Headers

Accept-Language
​string · required · style: simple

A list of the languages/localizations the user would like to see the results in. For user privacy and ease of |use on the TO side, this list should be kept as short as possible, ideally just one language tag from the list in |operator/information

maas-id
​string · required · style: simple

The ID of the sending maas operator

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

addressed-to
​string · style: simple

The ID of the maas operator that has to receive this message

describes the running implementations › Responses

200

successful operation

version
​string · required
baseUrl
​string · required
​EndpointTO[] · required
scenarios
​string[] · required
Enum values:
POSTPONED_COMMIT
DEPOSIT
PAY_WHEN_FINISHED
REQUIRE_BOOKING_DATA
RETURN_AREA
UPFRONT_PAYMENT
​ProcessIdentifiersTO · required

describes the running implementations

GET
https://api.entur.io/shared-mobility-router/v1
/tomp/1.6.0/operator/meta

all versions that are implemented on this url, are described in the result of this endpoint. In contains all |versions and per version the endpoints, their status and the supported scenarios.

describes the running implementations › Headers

Accept-Language
​string · required · style: simple

A list of the languages/localizations the user would like to see the results in. For user privacy and ease of |use on the TO side, this list should be kept as short as possible, ideally just one language tag from the list in |operator/information

maas-id
​string · required · style: simple

The ID of the sending maas operator

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

addressed-to
​string · style: simple

The ID of the maas operator that has to receive this message

describes the running implementations › Responses

200

successful operation

version
​string · required
baseUrl
​string · required
​EndpointTO[] · required
scenarios
​string[] · required
Enum values:
POSTPONED_COMMIT
DEPOSIT
PAY_WHEN_FINISHED
REQUIRE_BOOKING_DATA
RETURN_AREA
UPFRONT_PAYMENT
​ProcessIdentifiersTO · required

Did you find what you were looking for?