Quickstart Guide | PTV Drive&Arrive

Welcome to Drive&Arrive,

You will find everything you need to start Drive&Arrive as quickly as possible right here.

  1. What is Drive&Arrive?
  2. How can I test it without being a developer?
  3. Where can I get free test access for development?
  4. Under which server address can I access the Drive&Arrive services?
  5. Where can I get support for development issues?
  6. How do I create a trip?
  7. How do I send positions on a trip?
  8. How do I send status notifications on a trip?
  9. How do I request the ETA of trips?
  10. What else?

What is Drive&Arrive?

Drive&Arrive is a cloud service for calculating ETA – estimated time of arrival. Arrival times are needed in logistics to inform all participants in the supply chain and to be able to make optimisations during the trip.

In addition to ETA calculation, Drive&Arrive also provides correct handling of the rights of various participants, status management and support for integrating position information, as well as in distributing arrival information.


How can I test Drive&Arrive without being a developer?

You can start the test using the PTV Trip Creator on the homepage or directly at https://eta-viewer-trip-creator.ptvgroup.com.

This defines a test trip with up to 6 stops. You will then be able to:

This creates a closed loop in which you can easily test how good the calculated ETA is for different vehicle types or driving and rest periods.


Where can I get a free test account for development?

If you wish to develop it by yourself using an interactive Swagger interface, or you want to program the interface, you will need a token. This is an authorisation to use the interface, required for many of the functions.

Test tokens for a limited time period are available, so if you would like one please contact us at:

Germany, Austria, Swiss:
For clients: vertrieb@ptvgroup.com
For partners: partnermanagement@ptvgroup.com


Under which server address can I access the Drive&Arrive services?

You can find them under

https://driveandarrive-v1.cloud.ptvgroup.com/

e.g. https://driveandarrive-v1.cloud.ptvgroup.com/stop/batch/eta?SCEMIDs=x1x1x1x1x1


Where can I get support for development issues?

Generally, you will find answers to all questions in our Developerzone. All content is available for free and without restriction at:

https://driveandarrive.cloud.ptvgroup.com/docs/

Here you will find, among other things:


How do I create a trip?

Trips are required to determine for which destinations an ETA is calculated and with which settings.

More specifically:

The best way to start is with an example:

This is a trip with one vehicle, two stops, each with coordinates, description, time slots and handling time, and without information on the driving time and rest period, i.e. by default, the driver is assumed to start from a rested state.

The description of the trip as above is consigned as payload (page content) to:

https://driveandarrive-v1.cloud.ptvgroup.com/em/tour?token=<your-token>&source=<myProduct_Vx.y>

Further explanations on options and other possibilities can be found here: /tour POST


How do I send positions on a trip?

Positions of the vehicle for which the ETA is to be calculated are sent with

https://driveandarrive-v1.cloud.ptvgroup.com/em/event

For example, payload is

The following are important:


How do I send status notifications on a trip?

The status notification "Arrived" does not necessarily have to be sent on a trip. It is necessary for the handling time to be recognised and the handling time to be correctly included in the calculation. If they are not sent, it is not recognised when the handling time starts or ends (this is automatically generated), and during the handling time, the ETA may be a little more optimistic than reality.

Status notifications are also sent with https://driveandarrive-v1.cloud.ptvgroup.com/em/event and Drive&Arrive, e.g. for arrival notifications

Further information can be found here.


How do I request ETA of trips?

The ETA of trips can be requested in different ways

  1. you pull the information with GET /stop/batch/eta
  2. you subscribe to ETA notifications by http callback
  3. you subscribe to ETA notifications by SSE (notification)
  4. you subscribe to ETA notifications by Onesignal (notification)

 

With possibility 1) you get the ETA always immediately when you ask for it. You can also ask for multiple ETAs in one call.

Example-Request

GET https://driveandarrive-v1.cloud.ptvgroup.com/em/stop/batch/eta?SCEMIDs=X1X1X1X1X1&source= MYPRODUCT_V2.8

Example-Response

 

With possibility 2) you subscribe with /subscription/ POST to a notification you receive on the URL you have defined in the subscription. You will receive notifications always directly after a new ETA has been calculated. This method is ideal for app development.

Example-Request

https://driveandarrive-v1.cloud.ptvgroup.com/em/subscription?source=Test

with content (payload):

Example-Response

After subscribing you will get a subscription confirmation, later if ETA was calculated, you will receive ETAs at the URL you specified like:

 

With possibility 3) you subscribe with /subscription/ POST to a notification as SSE-notification. So you receive ETA in a defined SSE notification object, always directly after a new ETA has been calculated. This method also designed for server2server communication. You have to create a SSE connection first in you program (see our example program)

Example-Request

https://driveandarrive-v1.cloud.ptvgroup.com/em/subscription?source=Test

With content (payload)

Example-Response

After subscribing you will get a subscription confirmation, later if ETA was calculated, you will receive notification about calculated ETAs with content like:

 

With possibility 4), you subscribe with /subscription/ POST to a notification as OneSignal notification. So you receive ETA in a defined SSE notification object, always directly after a new ETA has been calculated. This method is ideal for app development. You have to know a device-id, created on the mobile device side to subscribe

Example-Request

https://driveandarrive-v1.cloud.ptvgroup.com/em/subscription?source=Test

With content (payload)

After subscribing you will get a subscription confirmation, later if ETA was calculated, you will receive notification about calculated ETAs with content like:

Example-Response


What else?

Apart from the described functions, there are a lot of additional functionality, that let you

 

 

© 2022 PTV Planung Transport Verkehr GmbH | Imprint

Get in Contact