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 "https://wps.hereapi.com/v8/findsequence2?mode=fastest%3Bcar%3Btraffic%3Adisabled&start=DuisburgRuhrort%3B51.4541%2C6.7406&departure=2024-06-14T07%3A30%3A00%2B02%3A00&destination1=Gelsenkirchen%3B51.5053%2C7.1016%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination2=ZecheZollverein%3B51.486%2C7.0459%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination3=KokereiZollverein%3B51.49016%2C7.03141%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination4=MuehlheimRuhrHbf%3B51.432%2C6.886%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination5=BochumRathaus%3B51.4832%2C7.2186%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination6=DortmundHbf%3B51.5169%2C7.4605%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination7=Bochum%3B51.4732%2C7.1771%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination8=EssenGrugapark%3B51.4304%2C7.0011%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&destination9=Herne%3B51.537974%2C7.217826%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A1800&destination10=Bottrop%3B51.51936%2C6.95109%3Bacc%3Afr08%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&improveFor=TIME&restTimes=disabled&end=DuisburgHafen%3B51.4576%2C6.7717&breakTimes=2024-06-14T12%3A00%3A00%2B02%3A00%3B3600&apikey=API_KEY"Click to expand/collapse the API response
{
"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",
"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",
"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,
"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
}
}
],
"errors": [],
"processingTimeDesc": "211ms",
"responseCode": "200",
"warnings": null,
"requestId": "c78f0e53-4e87-4ee8-a326-1c2438872153"
}Break times don't interrupt service
curl "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%7Ctu23:59:59Z&destination1=D1;12.99119123438,77.71621874776;acc:tu09:30:00Z%7Ctu23:59:00Z;st:2400%2Cinterruptible%3Afalse&destination2=D2;12.98021,77.71521;acc:tu09:30:00Z%7Ctu23:59:00Z;st:2400%2Cinterruptible%3Afalse&destination3=D3;12.98051,77.74722;acc:tu09:30:00Z%7Ctu23:59:00Z;st:2400%2Cinterruptible%3Afalse&destination4=D4;12.97958,77.75099;acc:tu09:30:00Z%7Ctu23:59:00Z;st:2400%2Cinterruptible%3Afalse&destination5=D5;12.96802,77.72608;acc:tu09:30:00Z%7Ctu23:59:00Z;st:2400%2Cinterruptible%3Afalse&destination6=D6;12.96731,77.71774;acc:tu09:30:00Z%7Ctu23:59:00Z;st:2400%2Cinterruptible%3Afalse&destination7=D7;12.97122,77.71225;acc:tu08:00:00Z%7Ctu12:00:00Z,tu12:00:00Z%7Ctu18:00:00Z;st:2400%2Cinterruptible%3Afalse&destination8=D8;13.00073575196138,77.67540576871859;acc:tu09:30:00Z%7Ctu23:59:00Z;st:2400%2Cinterruptible%3Afalse&apikey=API-KEY"Click to expand/collapse the API response
{
"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",
"estimatedDeparture": "2024-08-27T14:40:00Z",
"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,
"rest": 0.0,
"waiting": 25.0
},
{
"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,
"break": 3600
}
}
],
"errors": [],
"processingTimeDesc": "556ms",
"responseCode": "200",
"warnings": null,
"requestId": "357700ce-cd98-4f91-9ecf-990455ca8288"
}Two waypoints with constraints and break times
curl "https://wps.hereapi.com/v8/findsequence2?mode=fastest%3Bcar%3Btraffic%3Adisabled&start=DuisburgRuhrort%3B51.4541%2C6.7406&departure=2024-07-01T09%3A30%3A00%2B02%3A00&destination1=ZecheZollverein%3B51.486%2C7.0459%3Bacc%3Amo12%3A00%3A00%2B02%3A00%7Cmo18%3A00%3A00%2B02%3A00%3Bst%3A900&improveFor=TIME&restTimes=disabled&end=KokereiZollverein%3B51.49016%2C7.03141%3Bacc%3Amo12%3A00%3A00%2B02%3A00%7Cfr18%3A00%3A00%2B02%3A00%3Bst%3A900&breakTimes=2024-06-13T12%3A00%3A00%2B02%3A00%3B7200&apikey=API_KEY"Click to expand/collapse the API response
Break time occurs before the service starts.
{
"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",
"estimatedDeparture": "2024-07-01T12:15:00+02:00",
"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,
"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": 1800,
"rest": 0,
"waiting": 416,
"break": 7200
}
}
],
"errors": [],
"processingTimeDesc": "117ms",
"responseCode": "200",
"warnings": null,
"requestId": "5a1b6802-b1f2-45bd-98ec-5d63f4f2e188"
}Sequence of waypoints with two breaks
curl "https://wps.hereapi.com/v8/findsequence2?mode=fastest%3Bcar%3Btraffic%3Adisabled&start=DuisburgRuhrort%3B51.4541%2C6.7406&departure=2024-07-01T07%3A30%3A00%2B02%3A00&destination1=ZecheZollverein%3B51.486%2C7.0459%3Bacc%3Amo09%3A00%3A00%2B02%3A00%7Cmo18%3A00%3A00%2B02%3A00%3Bst%3A18000&improveFor=TIME&restTimes=disabled&end=KokereiZollverein%3B51.49016%2C7.03141%3Bacc%3Amo09%3A00%3A00%2B02%3A00%7Cmo18%3A00%3A00%2B02%3A00%3Bst%3A5400&breakTimes=2024-07-01T12%3A00%3A00%2B02%3A00%3B3600%2C2024-06-10T15%3A00%3A00%2B02%3A00%3B3600&apikey=API_KEY"Click to expand/collapse the API response
{
"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",
"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,
"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
}
}
],
"errors": [],
"processingTimeDesc": "90ms",
"responseCode": "200",
"warnings": null,
"requestId": "1fa50dac-8d13-4d9c-a95c-1aea4fabe0a8"
}Updated 7 days ago