PTV Drive&Arrive | API Guide > API Description > Stop > stop object

Stop

Stop object used in PTV Drive&Arrive.

Description

field type suggested length/ format mandatory description
coordinate coordinate   (x) coordinate in WGS 84. Either coordinate or locationId must be set
locationId string   (x) id of an existing location. Either coordinate or locationId must be set
earliestArrivalTime string YYYY-MM-DDThh:mm:ss.0000000+hh:mm x start of time window at the specific stop
latestDepartureTime string YYYY-MM-DDThh:mm:ss.0000000+hh:mm x end of time window at the specific stop
pta string YYYY-MM-DDThh:mm:ss.0000000+hh:mm   planned time of arrival - for informative purpose only
serviceTimeAtStop integer   x

service time of driver X at stop in seconds

TODO: everytime 0 is a bad idea

useServicePeriodForRecreation boolean   x "true" if service time can be used as rest time, otherwise "false"
weightWhenLeavingStop integer   x truck weight when leaving stop in kg
stopPositionInTour integer    

sequence number of this stop in a tour.
stopPositionInTour should be unique.
stopPositionInTour=0 is a valid value for a stop.
If stopPositionInTour is not unique in a tour the sequence of the tour.stops array is used.

Examples to describe the behaviour of stopPositionInTour using different API methods POST /em/tour/, PUT /em/tour/ and PUT /em/stop/.

Example 1:
/em/tour/ POST- stopPositionInTour(s) 0,1,2,3,4,5,6,7 - we use this sequence to calculate a route
/em/tour/ PUT - stopPositionInTour(s) 0,1,2,3,4,5,6,7,8,9 - we use this sequence to calculate a route
/em/tour/ PUT - stopPositionInTour(s) 0,1,2,9,4,5,6,7,8,9 - an error DUPLICATE_STOPPOSITIONINTOUR is raised because 9 is duplicated

Example 2:
/em/tour/ POST - stopPositionInTour(s) 12,5,3,7,6,0,1,4 - we sort ascending stopPositionInTour(s) 0,1,3,4,5,6,7,12 and use this sequence to calculate a route
/em/stop/ PUT - stopPositionInTour(s) 11 we accept 11 because stopPositionInTour keeps unique, we sort ascending stopPositionInTour(s) 0,1,3,4,5,6,7,11,12 and use this sequence to calculate a route
/em/stop/ PUT - stopPositionInTour(s) 12 lead to an error DUPLICATE_STOPPOSITIONINTOUR because 12 is duplicated

Example 3:
/em/tour/ POST - stopPositionInTour(s) 0,3,0,5,3,7 - stopPositionInTour isn´t unique, we use the provided sequence of the tour.stop array to calculate a route
/em/tour/ PUT - we accept all stopPositionInTour(s) and use the provided sequence of the tour.stop array to calculate a route
/em/stop/ PUT - we accept all stopPositionInTour(s) and use the provided sequence of the tour.stop array to calculate a route

To decide if stopPositionInTour is used or not, we consider the /em/tour/ POST.
If a tour is created with unique stopPositionInTour(s), every action (PUT) is responsible to keep it unique.
If stopPositionInTour is not unique during /em/tour/ POST we ignore stopPositionInTour for all the following operations of this tour.

customData object    

a JSON object with arbitrary data

If customData.address.label is set this will be visualized in other components of PTV Drive&Arrive.

scemid string "XXXXXXXXXX"   system created unique identifier of stop

 

 

 

© 2022 PTV Planung Transport Verkehr GmbH | Imprint

Get in Contact