How to use the break times parameter
The breakTimes parameter allows you to specify certain times of the day as free or idle. During these designated periods, no stops or travel are planned. For example, this allows you to schedule lunch breaks without specifying a particular location.
By default, breaks interrupt service time and journeys. When the break ends, the service or journey resumes.
Limitations
The following limitations apply:
- If the value of the
breakTimesparameter falls within the service time of a waypoint and violates its constraints, such as its closing time, the sequence isn't generated. - You can't combine rest times and the break times.
- Overlapping breaks cause a validation error.
Prevent service times from being interrupted by breaks
To prevent service times from being interrupted by breaks, use the interruptible flag in the service time configuration and set it to false:
- The
interruptibleflag must be used with thebreakTimesparameter. - The
interruptibleflag can't be used with theclusteringparameter.
Examples
The following request examples show how you can use the breakTimes parameter when optimizing different waypoint sequences.
Break times can interrupt service
curl -gX GET 'https://wps.hereapi.com/v8/findsequence2?'\
'mode=fastest;car;traffic:disabled&'\
'start=DuisburgRuhrort;51.4541,6.7406&'\
'departure=2024-06-14T07:30:00%2B02:00&'\
'destination1=Gelsenkirchen;51.5053,7.1016;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination2=ZecheZollverein;51.486,7.0459;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination3=KokereiZollverein;51.49016,7.03141;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination4=MuehlheimRuhrHbf;51.432,6.886;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination5=BochumRathaus;51.4832,7.2186;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination6=DortmundHbf;51.5169,7.4605;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination7=Bochum;51.4732,7.1771;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination8=EssenGrugapark;51.4304,7.0011;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'destination9=Herne;51.537974,7.217826;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:1800&'\
'destination10=Bottrop;51.51936,6.95109;acc:fr08:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'improveFor=time&'\
'restTimes=disabled&'\
'end=DuisburgHafen;51.4576,6.7717&'\
'breakTimes=2024-06-14T12:00:00%2B02:00;3600&'\
'apikey=API_KEY'Click to expand/collapse the API response
The break of 3600 seconds (60 minutes) falls during travel between Zeche Zollverein and Grugapark Essen, as shown by "break": 3600 in that interconnection.
The driver departs Zeche Zollverein at 11:50:14 and travels until 12:00. The break runs from 12:00 to 13:00. The driver arrives at Grugapark Essen at 13:02:29. No service times are interrupted.
{
"results": [
{
"waypoints": [
{
"id": "DuisburgRuhrort",
"lat": 51.4541,
"lng": 6.7406,
"sequence": 0,
"estimatedArrival": null,
"estimatedDeparture": "2024-06-14T07:30:00+02:00",
"fulfilledConstraints": []
},
{
"id": "Herne",
"lat": 51.537974,
"lng": 7.217826,
"sequence": 1,
"estimatedArrival": "2024-06-14T07:56:36+02:00",
"estimatedDeparture": "2024-06-14T08:30:00+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:1800"
]
},
{
"id": "DortmundHbf",
"lat": 51.5169,
"lng": 7.4605,
"sequence": 2,
"estimatedArrival": "2024-06-14T08:50:22+02:00",
"estimatedDeparture": "2024-06-14T09:05:22+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "BochumRathaus",
"lat": 51.4832,
"lng": 7.2186,
"sequence": 3,
"estimatedArrival": "2024-06-14T09:26:30+02:00",
"estimatedDeparture": "2024-06-14T09:41:30+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "Bochum",
"lat": 51.4732,
"lng": 7.1771,
"sequence": 4,
"estimatedArrival": "2024-06-14T09:49:49+02:00",
"estimatedDeparture": "2024-06-14T10:04:49+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "Gelsenkirchen",
"lat": 51.5053,
"lng": 7.1016,
"sequence": 5,
"estimatedArrival": "2024-06-14T10:18:04+02:00",
"estimatedDeparture": "2024-06-14T10:33:04+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "Bottrop",
"lat": 51.51936,
"lng": 6.95109,
"sequence": 6,
"estimatedArrival": "2024-06-14T10:46:44+02:00",
"estimatedDeparture": "2024-06-14T11:01:44+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "KokereiZollverein",
"lat": 51.49016,
"lng": 7.03141,
"sequence": 7,
"estimatedArrival": "2024-06-14T11:15:32+02:00",
"estimatedDeparture": "2024-06-14T11:30:32+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "ZecheZollverein",
"lat": 51.486,
"lng": 7.0459,
"sequence": 8,
"estimatedArrival": "2024-06-14T11:35:14+02:00",
"estimatedDeparture": "2024-06-14T11:50:14+02:00", // driver departs; break begins at 12:00 during travel
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "EssenGrugapark",
"lat": 51.4304,
"lng": 7.0011,
"sequence": 9,
"estimatedArrival": "2024-06-14T13:02:29+02:00", // arrival after break ends at 13:00; service uninterrupted
"estimatedDeparture": "2024-06-14T13:17:29+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "MuehlheimRuhrHbf",
"lat": 51.432,
"lng": 6.886,
"sequence": 10,
"estimatedArrival": "2024-06-14T13:29:48+02:00",
"estimatedDeparture": "2024-06-14T13:44:48+02:00",
"fulfilledConstraints": [
"acc:fr08:00:00+02:00|fr18:00:00+02:00;st:900"
]
},
{
"id": "DuisburgHafen",
"lat": 51.4576,
"lng": 6.7717,
"sequence": 11,
"estimatedArrival": "2024-06-14T13:58:35+02:00",
"estimatedDeparture": null,
"fulfilledConstraints": []
}
],
"distance": "153064",
"time": "23315",
"interconnections": [
{
"fromWaypoint": "DuisburgRuhrort",
"toWaypoint": "Herne",
"distance": 38500,
"time": 1596,
"rest": 0,
"waiting": 204
},
{
"fromWaypoint": "Herne",
"toWaypoint": "DortmundHbf",
"distance": 24587,
"time": 1222,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "DortmundHbf",
"toWaypoint": "BochumRathaus",
"distance": 20437,
"time": 1268,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "BochumRathaus",
"toWaypoint": "Bochum",
"distance": 4289,
"time": 499,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "Bochum",
"toWaypoint": "Gelsenkirchen",
"distance": 10712,
"time": 795,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "Gelsenkirchen",
"toWaypoint": "Bottrop",
"distance": 13392,
"time": 820,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "Bottrop",
"toWaypoint": "KokereiZollverein",
"distance": 9556,
"time": 828,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "KokereiZollverein",
"toWaypoint": "ZecheZollverein",
"distance": 2431,
"time": 282,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "ZecheZollverein",
"toWaypoint": "EssenGrugapark",
"distance": 7807,
"time": 735,
"break": 3600, // 60-minute break falls during this leg
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "EssenGrugapark",
"toWaypoint": "MuehlheimRuhrHbf",
"distance": 11225,
"time": 739,
"rest": 0,
"waiting": 0
},
{
"fromWaypoint": "MuehlheimRuhrHbf",
"toWaypoint": "DuisburgHafen",
"distance": 10128,
"time": 827,
"rest": 0,
"waiting": 0
}
],
"description": "Targeted best time; without traffic",
"timeBreakdown": {
"driving": 9611,
"service": 9900,
"rest": 0,
"waiting": 204,
"break": 3600 // total break time (seconds)
}
}
],
"errors": [],
"processingTimeDesc": "211ms",
"responseCode": "200",
"warnings": null,
"requestId": "c78f0e53-4e87-4ee8-a326-1c2438872153"
}Break times don't interrupt service
curl -gX GET 'https://wps.hereapi.com/v8/findsequence2?'\
'departure=2024-08-27T09:30:00Z&'\
'mode=shortest;car;traffic:enabled&'\
'start=START;13.01322,77.72112&'\
'breakTimes=2024-08-27T13:00:00Z;3600&'\
'end=END;13.01322,77.72112;st:1;acc:tu09:30:00Z|tu23:59:59Z&'\
'destination1=D1;12.99119123438,77.71621874776;acc:tu09:30:00Z|tu23:59:00Z;st:2400,interruptible:false&'\
'destination2=D2;12.98021,77.71521;acc:tu09:30:00Z|tu23:59:00Z;st:2400,interruptible:false&'\
'destination3=D3;12.98051,77.74722;acc:tu09:30:00Z|tu23:59:00Z;st:2400,interruptible:false&'\
'destination4=D4;12.97958,77.75099;acc:tu09:30:00Z|tu23:59:00Z;st:2400,interruptible:false&'\
'destination5=D5;12.96802,77.72608;acc:tu09:30:00Z|tu23:59:00Z;st:2400,interruptible:false&'\
'destination6=D6;12.96731,77.71774;acc:tu09:30:00Z|tu23:59:00Z;st:2400,interruptible:false&'\
'destination7=D7;12.97122,77.71225;acc:tu08:00:00Z|tu12:00:00Z,tu12:00:00Z|tu18:00:00Z;st:2400,interruptible:false&'\
'destination8=D8;13.00073575196138,77.67540576871859;acc:tu09:30:00Z|tu23:59:00Z;st:2400,interruptible:false&'\
'apikey=API-KEY'Click to expand/collapse the API response
The break of 3600 seconds (60 minutes) falls in the interconnection between waypoints D8 and D7. The driver arrives at waypoint D7 at 12:59:35. The break begins at 13:00:00 and The driver waits for 25 seconds (as shown by "waiting": 25) and the break begins at 13:00. Since all destinations have interruptible:false set, service at waypoint D7 starts after the break ends at 14:00. The service time ends at 14:40.
{
"results": [
{
"waypoints": [
{
"id": "START",
"lat": 13.01322,
"lng": 77.72112,
"sequence": 0,
"estimatedArrival": null,
"estimatedDeparture": "2024-08-27T09:30:00Z",
"fulfilledConstraints": []
},
{
"id": "D3",
"lat": 12.98051,
"lng": 77.74722,
"sequence": 1,
"estimatedArrival": "2024-08-27T09:48:50Z",
"estimatedDeparture": "2024-08-27T10:28:50Z",
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "D4",
"lat": 12.97958,
"lng": 77.75099,
"sequence": 2,
"estimatedArrival": "2024-08-27T10:30:10Z",
"estimatedDeparture": "2024-08-27T11:10:10Z",
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "D1",
"lat": 12.99119123438,
"lng": 77.71621874776,
"sequence": 3,
"estimatedArrival": "2024-08-27T11:18:21Z",
"estimatedDeparture": "2024-08-27T11:58:21Z",
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "D8",
"lat": 13.00073575196138,
"lng": 77.67540576871859,
"sequence": 4,
"estimatedArrival": "2024-08-27T12:07:57Z",
"estimatedDeparture": "2024-08-27T12:47:57Z",
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "D7",
"lat": 12.97122,
"lng": 77.71225,
"sequence": 5,
"estimatedArrival": "2024-08-27T12:59:35Z", // arrives 25s before break begins at 13:00
"estimatedDeparture": "2024-08-27T14:40:00Z", // service starts after break ends at 14:00 (interruptible:false)
"fulfilledConstraints": [
"acc:tu12:00:00+00:00|tu18:00:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "D6",
"lat": 12.96731,
"lng": 77.71774,
"sequence": 6,
"estimatedArrival": "2024-08-27T14:41:35Z",
"estimatedDeparture": "2024-08-27T15:21:35Z",
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "D5",
"lat": 12.96802,
"lng": 77.72608,
"sequence": 7,
"estimatedArrival": "2024-08-27T15:27:27Z",
"estimatedDeparture": "2024-08-27T16:07:27Z",
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "D2",
"lat": 12.98021,
"lng": 77.71521,
"sequence": 8,
"estimatedArrival": "2024-08-27T16:13:51Z",
"estimatedDeparture": "2024-08-27T16:53:51Z",
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:00+00:00;st:2400,interruptible:false"
]
},
{
"id": "END",
"lat": 13.01322,
"lng": 77.72112,
"sequence": 9,
"estimatedArrival": "2024-08-27T17:10:29Z",
"estimatedDeparture": null,
"fulfilledConstraints": [
"acc:tu09:30:00+00:00|tu23:59:59+00:00;st:1"
]
}
],
"distance": "35347",
"time": "27630",
"interconnections": [
{
"fromWaypoint": "START",
"toWaypoint": "D3",
"distance": 7677.0,
"time": 1130.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "D3",
"toWaypoint": "D4",
"distance": 443.0,
"time": 80.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "D4",
"toWaypoint": "D1",
"distance": 4767.0,
"time": 491.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "D1",
"toWaypoint": "D8",
"distance": 5374.0,
"time": 576.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "D8",
"toWaypoint": "D7",
"distance": 6300.0,
"time": 698.0,
"break": 3600.0, // 60-minute break occurs during this leg
"rest": 0.0,
"waiting": 25.0 // 25s wait at D7 before break begins at 13:00
},
{
"fromWaypoint": "D7",
"toWaypoint": "D6",
"distance": 828.0,
"time": 95.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "D6",
"toWaypoint": "D5",
"distance": 1719.0,
"time": 352.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "D5",
"toWaypoint": "D2",
"distance": 2867.0,
"time": 384.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "D2",
"toWaypoint": "END",
"distance": 5372.0,
"time": 998.0,
"rest": 0.0,
"waiting": 0.0
}
],
"description": "Targeted best time; with , improvement for traffic",
"timeBreakdown": {
"driving": 4804,
"service": 19201,
"rest": 0,
"waiting": 25, // 25s wait before break
"break": 3600 // total break time (seconds)
}
}
],
"errors": [],
"processingTimeDesc": "556ms",
"responseCode": "200",
"warnings": null,
"requestId": "357700ce-cd98-4f91-9ecf-990455ca8288"
}Two waypoints with constraints and break times
curl -gX GET 'https://wps.hereapi.com/v8/findsequence2?'\
'mode=fastest;car;traffic:disabled&'\
'start=DuisburgRuhrort;51.4541,6.7406&'\
'departure=2024-07-01T09:30:00%2B02:00&'\
'destination1=ZecheZollverein;51.486,7.0459;acc:mo12:00:00%2B02:00|mo18:00:00%2B02:00;st:900&'\
'improveFor=time&'\
'restTimes=disabled&'\
'end=KokereiZollverein;51.49016,7.03141;acc:mo12:00:00%2B02:00|fr18:00:00%2B02:00;st:900&'\
'breakTimes=2024-07-01T12:00:00%2B02:00;7200&'\
'apikey=API_KEY'Click to expand/collapse the API response
The 7200-second (120-minute) break ("break": 7200 in the Duisburg-Ruhrort to Zeche Zollverein interconnection) falls before service begins at Zeche Zollverein. The driver arrives at Zeche Zollverein at 11:53:04 and departs at 12:15:00 after completing the 900-second (15-minute) service at that waypoint.
{
"results": [
{
"waypoints": [
{
"id": "DuisburgRuhrort",
"lat": 51.4541,
"lng": 6.7406,
"sequence": 0,
"estimatedArrival": null,
"estimatedDeparture": "2024-07-01T09:30:00+02:00",
"fulfilledConstraints": []
},
{
"id": "ZecheZollverein",
"lat": 51.486,
"lng": 7.0459,
"sequence": 1,
"estimatedArrival": "2024-07-01T11:53:04+02:00", // arrives before service window opens at 12:00
"estimatedDeparture": "2024-07-01T12:15:00+02:00", // departs after 900s service (12:00–12:15)
"fulfilledConstraints": [
"acc:mo12:00:00+02:00|mo18:00:00+02:00;st:900"
]
},
{
"id": "KokereiZollverein",
"lat": 51.49016,
"lng": 7.03141,
"sequence": 2,
"estimatedArrival": "2024-07-01T12:21:03+02:00",
"estimatedDeparture": null,
"fulfilledConstraints": [
"acc:mo12:00:00+02:00|fr18:00:00+02:00;st:900"
]
}
],
"distance": "31572",
"time": "11163",
"interconnections": [
{
"fromWaypoint": "DuisburgRuhrort",
"toWaypoint": "ZecheZollverein",
"distance": 28491,
"time": 1384,
"break": 7200, // 120-minute break falls before service begins at ZecheZollverein
"rest": 0,
"waiting": 416 // wait before service window opens at 12:00
},
{
"fromWaypoint": "ZecheZollverein",
"toWaypoint": "KokereiZollverein",
"distance": 3081,
"time": 363,
"rest": 0,
"waiting": 0
}
],
"description": "Targeted best time; without traffic",
"timeBreakdown": {
"driving": 1747,
"service": 1800,
"rest": 0,
"waiting": 416, // wait before service window opens
"break": 7200 // total break time (seconds)
}
}
],
"errors": [],
"processingTimeDesc": "117ms",
"responseCode": "200",
"warnings": null,
"requestId": "5a1b6802-b1f2-45bd-98ec-5d63f4f2e188"
}Sequence of waypoints with two breaks
curl -gX GET 'https://wps.hereapi.com/v8/findsequence2?'\
'mode=fastest;car;traffic:disabled&'\
'start=DuisburgRuhrort;51.4541,6.7406&'\
'departure=2024-07-01T07:30:00%2B02:00&'\
'destination1=ZecheZollverein;51.486,7.0459;acc:mo09:00:00%2B02:00|mo18:00:00%2B02:00;st:18000&'\
'improveFor=time&'\
'restTimes=disabled&'\
'end=KokereiZollverein;51.49016,7.03141;acc:mo09:00:00%2B02:00|mo18:00:00%2B02:00;st:5400&'\
'breakTimes=2024-07-01T12:00:00%2B02:00;3600,2024-07-01T15:00:00%2B02:00;3600&'\
'apikey=API_KEY'Click to expand/collapse the API response
Two 3600-second breaks are added to the total of 7200 seconds (120 minutes), as confirmed by the "break": 7200 value in timeBreakdown. Both breaks fall within the service time at Zeche Zollverein (18000 seconds / 300 minutes / 5 hours), which delays the departure from that waypoint to 15:00.
{
"results": [
{
"waypoints": [
{
"id": "DuisburgRuhrort",
"lat": 51.4541,
"lng": 6.7406,
"sequence": 0,
"estimatedArrival": null,
"estimatedDeparture": "2024-07-01T07:30:00+02:00",
"fulfilledConstraints": []
},
{
"id": "ZecheZollverein",
"lat": 51.486,
"lng": 7.0459,
"sequence": 1,
"estimatedArrival": "2024-07-01T08:53:04+02:00",
"estimatedDeparture": "2024-07-01T15:00:00+02:00", // departure delayed by two breaks during 5-hour service
"fulfilledConstraints": [
"acc:mo09:00:00+02:00|mo18:00:00+02:00;st:18000"
]
},
{
"id": "KokereiZollverein",
"lat": 51.49016,
"lng": 7.03141,
"sequence": 2,
"estimatedArrival": "2024-07-01T15:06:03+02:00",
"estimatedDeparture": null,
"fulfilledConstraints": [
"acc:mo09:00:00+02:00|mo18:00:00+02:00;st:5400"
]
}
],
"distance": "31572",
"time": "32763",
"interconnections": [
{
"fromWaypoint": "DuisburgRuhrort",
"toWaypoint": "ZecheZollverein",
"distance": 28491,
"time": 1384,
"break": 7200, // combined total of both 3600s breaks
"rest": 0,
"waiting": 416
},
{
"fromWaypoint": "ZecheZollverein",
"toWaypoint": "KokereiZollverein",
"distance": 3081,
"time": 363,
"rest": 0,
"waiting": 0
}
],
"description": "Targeted best time; without traffic",
"timeBreakdown": {
"driving": 1747,
"service": 23400,
"rest": 0,
"waiting": 416,
"break": 7200 // combined total of both 3600s breaks (seconds)
}
}
],
"errors": [],
"processingTimeDesc": "90ms",
"responseCode": "200",
"warnings": null,
"requestId": "1fa50dac-8d13-4d9c-a95c-1aea4fabe0a8"
}