Incorporate rest times

A new optimization algorithm is now the default for HERE Tour Planning API /async requests. Learn about the new algorithm →

In the HERE Tour Planning API, you can specify the timing and duration of rest periods during a tour. Efficient scheduling of rest periods in a tour is crucial in the following aspects:

  • Optimization of the overall tour efficiency and driver's comfort during the tour.
  • Compliance with legal regulations or recommendations established by local authorities, for example, transportation agencies.
📘

Note

This feature is currently in BETA. BETA features are in end-stage development and have no major bugs but their coverage, quality, performance, or test coverage may not yet be final. The feature's data model and problem definition remain stable and unchanged from previous versions. You can use BETA features in your applications, understanding that minor behavior refinements may occur as the feature approaches full production readiness.

For more information, see Explore experimental features.

Understand rest times configuration

In the HERE Tour Planning API, you can use the restTimes object, within the fleet.types.shifts problem configuration to specify rest periods for your fleet.

📘

Note

You cannot use restTimes and breaks simultaneously within the context of a problem.

The HERE Tour Planning API distinguishes between the following types of rest periods:

  • driving: refers to rest breaks or periods required specifically after a specific total amount of driving time, with stops allowed in between. However, only the duration spent actively driving is counted towards this total time.
  • working: pertains to driving plus all other work-related activities, for example, pickup or delivery of goods.

As you define shift configuration for your fleets, you can specify the periods in which drivers rest, relax, and recuperate as either fixed breaks or restTimes. While you cannot include breaks and restTimes in a single problem simultaneously, you can mix working and breaking rest times. Including both working rest time and driving rest time simultaneously in your shift configuration can make your solution compliant with the law (if you specify intervals that reflect the local transportation regulations and the stop is scheduled at a place that permits parking) but is also optimized for driver safety and operational efficiency. You can specify the following properties for each rest period type:

  • type: currently, you can specify the type as fixedDuration only.
  • interval: specifies the frequency at which breaks should occur (in seconds).
  • breakDuration: specifies the break duration (in seconds).
📘

Note

Consider the following points for the restTimes feature:

  • To achieve optimal tour planning, the algorithm might allocate break time anywhere within the working or driving intervals. Importantly, it will ensure that breaks do not occur after the designated time within the interval has elapsed.
  • The algorithm might schedule a rest time anywhere along the tour route.
  • If a working break overlaps with a job, the job extends its duration to include the working rest time. For example, see Scenario 3.
  • When you configure both driving and working rest times, the optimization algorithm applies the longer configured duration to both types of break. Scheduling either type resets both interval counters. Duty breaks use a separately configured duration.
  • The algorithm tends to classify breaks as working rest time when job durations are longer to prioritize ensuring sufficient rest during extended periods of work.

Configuration example

Consider the following sample restTimes object configuration:

"restTimes": {
  "driving": {
    "type": "fixedDuration",
    "interval": 16200,
    "breakDuration": 2700
  },
  "working": {
    "type": "fixedDuration",
    "interval": 21600,
    "breakDuration": 1800
  }
}

Based on the previous example, the optimization algorithm applies rest times in the following way:

  • Driving rest time:
    • Every 4.5 hours of driving, the driver is required to take a break solely from driving.
    • This break must last exactly 45 minutes unless you specified a restTime with a longer duration.
  • Working rest time:
    • Every 6 hours of all work-related activities (including driving), the driver is required to take a break.

    • This break must last at exactly 30 minutes unless you specified a restTime with a longer duration.

      📘

      Note

      Because the previous example specifies another restTime that has the duration of 45 minutes, the actual length of this working restTime will be 45 minutes.

Scenario 1: Problem with a single rest time type

The following example showcases a tour planning problem for a tour comprising six jobs over an extended distance. The problem specification includes a working break every 2 hours (7200 seconds). The duration of the break is set to 30 minutes (1800 seconds).

Click to expand/collapse the sample JSON
{
  "fleet": {
    "types": [
      {
        "id": "vehicle_1",
        "profile": "normal_car",
        "costs": { "fixed": 22, "distance": 0.0002, "time": 0.0048 },
        "shifts": [
          {
            "start": {
              "time": "2023-09-20T08:09:00Z",
              "location": {
                "lat": 52.510945865670074,
                "lng": 13.393829563633428
              }
            },
            "end": {
              "time": "2023-09-20T20:09:00Z",
              "location": {
                "lat": 52.510945865670074,
                "lng": 13.393829563633428
              }
            },
            "restTimes": {
              "working": {
                "type": "fixedDuration",
                "interval": 7200,
                "breakDuration": 1800
              }
            }
          }
        ],
        "capacity": [10],
        "amount": 10
      }
    ],
    "profiles": [{ "name": "normal_car", "type": "car" }]
  },
  "plan": {
    "jobs": [
      {
        "id": "Job_1",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.5063267065751,
                    "lng": 14.345924039737517
                  },
                  "duration": 180
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_2",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.12369910922764,
                    "lng": 14.384487171627224
                  },
                  "duration": 180
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_3",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 51.94851653436735,
                    "lng": 13.515333506728455
                  },
                  "duration": 180
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_4",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.22193780582256,
                    "lng": 13.011046397401525
                  },
                  "duration": 180
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_5",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.4756213511033,
                    "lng": 13.049609529291232
                  },
                  "duration": 180
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_6",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.44851058488946,
                    "lng": 13.384812137255604
                  },
                  "duration": 180
                }
              ],
              "demand": [1]
            }
          ]
        }
      }
    ]
  }
}

The following figure illustrates the solution to the previous problem, highlighting the working rest times occurring every two hours of work (which includes driving time with an added job duration of 180 seconds), without exceeding the break interval, as mandated by the problem specification.

A solution with working rest times

Scenario 2: Problem with driving and working rest times

In the provided scenario, there are two distinct types of rest times: working and driving. The working rest time consists of a 6-hour interval, while the driving rest time lasts for 4.5 hours. Within these intervals, individuals are allotted 30 minutes for rest during working periods and 45 minutes for rest during driving periods. Each job within the tour plan takes 45 minutes.

📘

Hint

To aid comprehension of driving and working periods, the job IDs in the following problem provide information on the time required to travel from the start location to each respective job location.

Click to expand/collapse the sample JSON
{
  "fleet": {
    "types": [
      {
        "id": "vehicle_1",
        "profile": "normal_truck",
        "costs": { "fixed": 22, "distance": 0.0002, "time": 0.0048 },
        "shifts": [
          {
            "start": { "time": "2023-09-20T08:00:00Z" },
            "end": {
              "time": "2023-09-22T23:00:00Z",
              "location": { "lat": 50.912724, "lng": 7.1055 }
            },
            "restTimes": {
              "working": {
                "type": "fixedDuration",
                "interval": 21600,
                "breakDuration": 1800
              },
              "driving": {
                "type": "fixedDuration",
                "interval": 16200,
                "breakDuration": 2700
              }
            }
          }
        ],
        "capacity": [10],
        "amount": 1
      }
    ],
    "profiles": [
      {
        "name": "normal_truck",
        "type": "truck",
        "traffic": { "mode": "disabled" }
      }
    ]
  },
  "plan": {
    "jobs": [
      {
        "id": "Job_1_15min_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 48.934196, "lng": 12.687835 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_2_30min_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 48.995801, "lng": 12.404328 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_3_1h_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 49.066063, "lng": 11.917153 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_4_1h30min_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 49.312421, "lng": 11.534065 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_5_2h_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 49.526849, "lng": 11.066198 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_6_3h_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 49.785296, "lng": 10.129362 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_7_4h_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 49.992149, "lng": 9.153357 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_8_5h_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 50.278779, "lng": 8.241558 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      },
      {
        "id": "Job_9_6h_driving",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": { "lat": 50.672214, "lng": 7.301027 },
                  "duration": 2700
                }
              ],
              "demand": [1]
            }
          ]
        }
      }
    ]
  }
}

The following figure illustrates the resulting solution to the preceding problem:

A solution with driving and working rest times

As the visualization demonstrates, the solution to the previous problem contains both types of rest times:

  • driving rest time: approximately 2 hours before the interval threshold of 4.5 hours elapses
  • working rest time: 16 minutes before the interval threshold of 6 hours elapses

The algorithm strategically allocated these breaks with optimal spacing in terms of time to achieve maximum efficiency in the planned tour. The algorithm achieved that without exceeding the maximum limits for rest times (that is avoiding excessive driving and working periods) and keeping the number of required breaks to the necessary minimum.

📘

Note

Consider the following points for the restTimes feature, in the context of the previous example:

  • In this example, the algorithm applies the longer configured duration, 45 minutes, to both working and driving breaks, even if the working interval triggers the break first.

  • Scheduling either type of rest time resets both interval counters.

Scenario 3: Overlapping service and working rest times

In logistics operations, a job and a rest break are not mutually exclusive. For example, when a truck arrives at a warehouse or a depot for a pickup or delivery job, the driver is usually not performing any manual labor connected with loading or unloading of goods. It is usually a forklift team or a dock crew who are assigned such activities. The driver might take advantage of that stationary period and go off-duty or take a rest in the break room. Legally this off-work time can count toward mandatory working rest or duty breaks.

Therefore, the Tour Planning API permits cases when the service time overlaps with rest times, as the following example demonstrates.

Problem

This sample problem consists of the following components:

  • Fleet: A single truck operating a multi-day shift across Germany and France.
  • Plan: Five scheduled deliveries (job_1 through job_5). Most deliveries require a 30-minute service time (1800 s) except for job_2 that requires 2.5 hours (9000 s) to complete.
  • Rest time rules:
    • Duty rule (dutyRule):
      • Maximum driving time: 11 hours (39,600 s)
      • Maximum working time: 8 hours (28, 800 s)
      • Minimum off-duty rest time: 10 hours (36,000 s)
      • canStartEarly: true
    • Working rest time (working):
      • Interval: Every 2 hours (7200 s)
      • Break duration: 30 minutes (1800 s)

The following section provides the full problem JSON:

Click to expand/collapse the sample JSON
{
  "fleet": {
    "types": [
      {
        "profile": "truck",
        "amount": 1,
        "capacity": [
          50
        ],
        "costs": {
          "time": 0.002,
          "distance": 0.001
        },
        "id": "truck_1",
        "shifts": [
          {
            "start": {
              "location": {
                "lat": 52.531,
                "lng": 13.38461
              },
              "time": "2024-06-24T08:00:00+02:00"
            },
            "end": {
              "location": {
                "lat": 52.531,
                "lng": 13.38461
              },
              "time": "2024-06-28T20:00:00+02:00"
            },
            "restTimes": {
              "dutyRule": {
                "maxDrivingTime": 39600,
                "maxWorkingTime": 28800,
                "minOffTime": 36000,
                "type": "fixedDuration",
                "canStartEarly": true
              },
              "working": {
                "type": "fixedDuration",
                "interval": 7200,
                "breakDuration": 1800
              }
            }
          }
        ]
      }
    ],
    "profiles": [
      {
        "name": "truck",
        "type": "truck"
      }
    ]
  },
  "plan": {
    "jobs": [
      {
        "id": "job_1",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "duration": 1800,
                  "location": {
                    "lat": 52.51043282746496,
                    "lng": 13.371997583570897
                  },
                  "times": [
                    [
                      "2024-06-24T06:00:00Z",
                      "2024-06-24T07:30:00Z"
                    ]
                  ]
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "job_2",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "duration": 9000,
                  "location": {
                    "lat": 48.5734,
                    "lng": 7.7521
                  },
                  "times": [
                    [
                      "2024-06-24T23:14:25Z",
                      "2024-06-25T09:00:00Z"
                    ]
                  ]
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "job_3",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "duration": 1800,
                  "location": {
                    "lat": 50.1109,
                    "lng": 8.6821
                  },
                  "times": [
                    [
                      "2024-06-26T10:00:00Z",
                      "2024-06-26T18:00:00Z"
                    ]
                  ]
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "job_4",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "duration": 1800,
                  "location": {
                    "lat": 53.55108,
                    "lng": 9.99368
                  },
                  "times": [
                    [
                      "2024-06-27T08:00:00Z",
                      "2024-06-27T18:00:00Z"
                    ]
                  ]
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "job_5",
        "tasks": {
          "deliveries": [
            {
              "places": [
                {
                  "duration": 1800,
                  "location": {
                    "lat": 51.3397,
                    "lng": 12.3731
                  },
                  "times": [
                    [
                      "2024-06-28T10:00:00Z",
                      "2024-06-28T18:00:00Z"
                    ]
                  ]
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      }
    ]
  },
  "configuration": {
    "experimentalFeatures": [
      "restTimes"
    ]
  }
}

Solution

Because the duration of job_2 (2.5 hours) extended the 2-hour working limit, the optimization algorithm was forced to schedule the 30-minute (1800 s) workingRestTime inside the stop for job_2, as the following solution snippet demonstrates:

{
  "time": {
    "arrival": "2024-06-25T05:43:34Z",
    "departure": "2024-06-25T08:43:34Z"
  },
  "load": [3],
  "location": {
    "lat": 48.5734,
    "lng": 7.7521
  },
  "distance": 760567,
  "activities": [
    {
      "jobId": "job_2",
      "type": "delivery",
      "location": {
        "lat": 48.5734,
        "lng": 7.7521
      },
      "time": {
        "arrival": "2024-06-25T05:43:34Z",
        "start": "2024-06-25T05:43:34Z",
        "end": "2024-06-25T08:43:34Z"
      }
    },
    {
      "jobId": "workingRestTime",
      "type": "workingRestTime",
      "location": {
        "lat": 48.5734,
        "lng": 7.7521
      },
      "time": {
        "arrival": "2024-06-25T07:19:26Z",
        "start": "2024-06-25T07:19:26Z",
        "end": "2024-06-25T07:49:26Z"
      }
    }
  ]
}

In addition, due to the resulting overlap of the delivery duration (2.5 hours) with the working rest time (0.5 hour), the total activity time at the job_2 stop was three hours. This timeline shows the working rest period within the reported delivery span at job_2 location:

job_2: durations breakdown

The following section provides the full solution JSON:

Click to expand/collapse the sample JSON
{
  "statistic": {
    "cost": 2736.115,
    "distance": 1994825,
    "duration": 370645,
    "times": {
      "break": 212400,
      "driving": 96877,
      "serving": 16200,
      "stopping": 0,
      "waiting": 45168
    },
    "costs": {
      "distance": 1994.825,
      "time": 741.29
    },
    "intraStopDistance": 0
  },
  "tours": [
    {
      "shiftIndex": 0,
      "statistic": {
        "cost": 2736.115,
        "distance": 1994825,
        "duration": 370645,
        "times": {
          "break": 212400,
          "driving": 96877,
          "serving": 16200,
          "stopping": 0,
          "waiting": 45168
        },
        "costs": {
          "distance": 1994.825,
          "time": 741.29
        },
        "intraStopDistance": 0
      },
      "stops": [
        {
          "activities": [
            {
              "jobId": "departure",
              "type": "departure",
              "location": {
                "lat": 52.531,
                "lng": 13.38461
              },
              "time": {
                "arrival": "2024-06-24T06:00:00Z",
                "start": "2024-06-24T06:00:00Z",
                "end": "2024-06-24T07:19:26Z"
              }
            }
          ],
          "load": [
            5
          ],
          "time": {
            "arrival": "2024-06-24T06:00:00Z",
            "departure": "2024-06-24T07:19:26Z"
          },
          "distance": 0,
          "location": {
            "lat": 52.531,
            "lng": 13.38461
          }
        },
        {
          "activities": [
            {
              "jobId": "job_1",
              "type": "delivery",
              "location": {
                "lat": 52.51043282746496,
                "lng": 13.371997583570897
              },
              "time": {
                "arrival": "2024-06-24T07:30:00Z",
                "start": "2024-06-24T07:30:00Z",
                "end": "2024-06-24T08:00:00Z"
              }
            }
          ],
          "load": [
            4
          ],
          "time": {
            "arrival": "2024-06-24T07:30:00Z",
            "departure": "2024-06-24T08:00:00Z"
          },
          "distance": 4983,
          "location": {
            "lat": 52.51043282746496,
            "lng": 13.371997583570897
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-24T09:19:26Z",
                "end": "2024-06-24T09:49:26Z"
              }
            }
          ],
          "load": [
            4
          ],
          "time": {
            "arrival": "2024-06-24T09:19:26Z",
            "departure": "2024-06-24T09:49:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-24T11:49:26Z",
                "end": "2024-06-24T12:19:26Z"
              }
            }
          ],
          "load": [
            4
          ],
          "time": {
            "arrival": "2024-06-24T11:49:26Z",
            "departure": "2024-06-24T12:19:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-24T14:19:26Z",
                "end": "2024-06-24T14:49:26Z"
              }
            }
          ],
          "load": [
            4
          ],
          "time": {
            "arrival": "2024-06-24T14:19:26Z",
            "departure": "2024-06-24T14:49:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "dutyWorkingRestTime",
              "type": "dutyWorkingRestTime",
              "time": {
                "start": "2024-06-24T16:49:26Z",
                "end": "2024-06-25T02:49:26Z"
              }
            }
          ],
          "load": [
            4
          ],
          "time": {
            "arrival": "2024-06-24T16:49:26Z",
            "departure": "2024-06-25T02:49:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-25T04:49:26Z",
                "end": "2024-06-25T05:19:26Z"
              }
            }
          ],
          "load": [
            4
          ],
          "time": {
            "arrival": "2024-06-25T04:49:26Z",
            "departure": "2024-06-25T05:19:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "job_2",
              "type": "delivery",
              "location": {
                "lat": 48.5734,
                "lng": 7.7521
              },
              "time": {
                "arrival": "2024-06-25T05:43:34Z",
                "start": "2024-06-25T05:43:34Z",
                "end": "2024-06-25T08:43:34Z"
              }
            },
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "location": {
                "lat": 48.5734,
                "lng": 7.7521
              },
              "time": {
                "start": "2024-06-25T07:19:26Z",
                "end": "2024-06-25T07:49:26Z"
              }
            }
          ],
          "load": [
            3
          ],
          "time": {
            "arrival": "2024-06-25T05:43:34Z",
            "departure": "2024-06-25T08:43:34Z"
          },
          "distance": 760567,
          "location": {
            "lat": 48.5734,
            "lng": 7.7521
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-25T09:49:26Z",
                "end": "2024-06-25T10:19:26Z"
              }
            }
          ],
          "load": [
            3
          ],
          "time": {
            "arrival": "2024-06-25T09:49:26Z",
            "departure": "2024-06-25T10:19:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "dutyWorkingRestTime",
              "type": "dutyWorkingRestTime",
              "location": {
                "lat": 50.1109,
                "lng": 8.6821
              },
              "time": {
                "start": "2024-06-25T12:19:26Z",
                "end": "2024-06-25T22:19:26Z"
              }
            },
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "location": {
                "lat": 50.1109,
                "lng": 8.6821
              },
              "time": {
                "start": "2024-06-26T00:19:26Z",
                "end": "2024-06-26T00:49:26Z"
              }
            },
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "location": {
                "lat": 50.1109,
                "lng": 8.6821
              },
              "time": {
                "start": "2024-06-26T02:49:26Z",
                "end": "2024-06-26T03:19:26Z"
              }
            },
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "location": {
                "lat": 50.1109,
                "lng": 8.6821
              },
              "time": {
                "start": "2024-06-26T05:19:26Z",
                "end": "2024-06-26T05:49:26Z"
              }
            },
            {
              "jobId": "dutyWorkingRestTime",
              "type": "dutyWorkingRestTime",
              "location": {
                "lat": 50.1109,
                "lng": 8.6821
              },
              "time": {
                "start": "2024-06-26T05:49:26Z",
                "end": "2024-06-26T15:49:26Z"
              }
            },
            {
              "jobId": "job_3",
              "type": "delivery",
              "location": {
                "lat": 50.1109,
                "lng": 8.6821
              },
              "time": {
                "arrival": "2024-06-25T12:07:48Z",
                "start": "2024-06-26T15:49:26Z",
                "end": "2024-06-26T16:19:26Z"
              }
            }
          ],
          "load": [
            2
          ],
          "time": {
            "arrival": "2024-06-25T12:07:48Z",
            "departure": "2024-06-26T16:19:26Z"
          },
          "distance": 979039,
          "location": {
            "lat": 50.1109,
            "lng": 8.6821
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-26T17:49:26Z",
                "end": "2024-06-26T18:19:26Z"
              }
            }
          ],
          "load": [
            2
          ],
          "time": {
            "arrival": "2024-06-26T17:49:26Z",
            "departure": "2024-06-26T18:19:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-26T20:19:26Z",
                "end": "2024-06-26T20:49:26Z"
              }
            }
          ],
          "load": [
            2
          ],
          "time": {
            "arrival": "2024-06-26T20:19:26Z",
            "departure": "2024-06-26T20:49:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-26T22:49:26Z",
                "end": "2024-06-26T23:19:26Z"
              }
            }
          ],
          "load": [
            2
          ],
          "time": {
            "arrival": "2024-06-26T22:49:26Z",
            "departure": "2024-06-26T23:19:26Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "job_4",
              "type": "delivery",
              "location": {
                "lat": 53.55108,
                "lng": 9.99368
              },
              "time": {
                "arrival": "2024-06-27T00:09:06Z",
                "start": "2024-06-27T10:09:06Z",
                "end": "2024-06-27T10:39:06Z"
              }
            },
            {
              "jobId": "dutyWorkingRestTime",
              "type": "dutyWorkingRestTime",
              "location": {
                "lat": 53.55108,
                "lng": 9.99368
              },
              "time": {
                "start": "2024-06-27T00:09:06Z",
                "end": "2024-06-27T10:09:06Z"
              }
            }
          ],
          "load": [
            1
          ],
          "time": {
            "arrival": "2024-06-27T00:09:06Z",
            "departure": "2024-06-27T10:39:06Z"
          },
          "distance": 1463765,
          "location": {
            "lat": 53.55108,
            "lng": 9.99368
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-27T12:09:06Z",
                "end": "2024-06-27T12:39:06Z"
              }
            }
          ],
          "load": [
            1
          ],
          "time": {
            "arrival": "2024-06-27T12:09:06Z",
            "departure": "2024-06-27T12:39:06Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-27T14:39:06Z",
                "end": "2024-06-27T15:09:06Z"
              }
            }
          ],
          "load": [
            1
          ],
          "time": {
            "arrival": "2024-06-27T14:39:06Z",
            "departure": "2024-06-27T15:09:06Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "location": {
                "lat": 51.3397,
                "lng": 12.3731
              },
              "time": {
                "start": "2024-06-27T17:09:06Z",
                "end": "2024-06-27T17:39:06Z"
              }
            },
            {
              "jobId": "dutyWorkingRestTime",
              "type": "dutyWorkingRestTime",
              "location": {
                "lat": 51.3397,
                "lng": 12.3731
              },
              "time": {
                "start": "2024-06-27T19:39:06Z",
                "end": "2024-06-28T05:39:06Z"
              }
            },
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "location": {
                "lat": 51.3397,
                "lng": 12.3731
              },
              "time": {
                "start": "2024-06-28T07:39:06Z",
                "end": "2024-06-28T08:09:06Z"
              }
            },
            {
              "jobId": "job_5",
              "type": "delivery",
              "location": {
                "lat": 51.3397,
                "lng": 12.3731
              },
              "time": {
                "arrival": "2024-06-27T16:38:50Z",
                "start": "2024-06-28T10:00:00Z",
                "end": "2024-06-28T11:00:00Z"
              }
            },
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "location": {
                "lat": 51.3397,
                "lng": 12.3731
              },
              "time": {
                "start": "2024-06-28T10:09:06Z",
                "end": "2024-06-28T10:39:06Z"
              }
            }
          ],
          "load": [
            0
          ],
          "time": {
            "arrival": "2024-06-27T16:38:50Z",
            "departure": "2024-06-28T11:00:00Z"
          },
          "distance": 1822125,
          "location": {
            "lat": 51.3397,
            "lng": 12.3731
          }
        },
        {
          "activities": [
            {
              "jobId": "workingRestTime",
              "type": "workingRestTime",
              "time": {
                "start": "2024-06-28T12:39:06Z",
                "end": "2024-06-28T13:09:06Z"
              }
            }
          ],
          "load": [
            0
          ],
          "time": {
            "arrival": "2024-06-28T12:39:06Z",
            "departure": "2024-06-28T13:09:06Z"
          }
        },
        {
          "activities": [
            {
              "jobId": "arrival",
              "type": "arrival",
              "location": {
                "lat": 52.531,
                "lng": 13.38461
              },
              "time": {
                "arrival": "2024-06-28T14:16:51Z",
                "start": "2024-06-28T14:16:51Z",
                "end": "2024-06-28T14:16:51Z"
              }
            }
          ],
          "load": [
            0
          ],
          "time": {
            "arrival": "2024-06-28T14:16:51Z",
            "departure": "2024-06-28T14:16:51Z"
          },
          "distance": 1994825,
          "location": {
            "lat": 52.531,
            "lng": 13.38461
          }
        }
      ],
      "typeId": "truck_1",
      "vehicleId": "truck_1_1"
    }
  ]
}

Next steps

  • For more information about formulating problems in the HERE Tour Planning API, see Problem.
  • For an in-depth exploration of the HERE Tour Planning API methods, endpoints, and parameters, see the API Reference.

Did this page help you?