Hours Of Service API
Introduction
NextBillion.ai’s Hours of Service (HOS) API enables logistics platforms to optimize trip planning while ensuring compliance with Hours of Service regulations. By integrating the driver's current activity status, accumulated duty times, and detailed trip itineraries, the service evaluates the feasibility of planned stops. It allows users to choose which regulations that need to be applied for their fleets and accordingly identifies necessary HOS breaks, providing precise timing to maintain safety and regulatory adherence throughout the trip.
Request Parameters
Loading..Request Body
Loading..Response Schema
Loading..Current Driver State and its impact
All the different timers that determine and control HOS compliance - continuous driving, daily drive time, daily on-duty time and cycle duty time are impacted by the driver's current activity at the time of submitting an HOS request. Here is a quick summary of different driver states and its corresponding impact on different timers:
| **Driver Activity → ** | daily_drive_minutes_used | daily_duty_minutes_used | minutes_since_last_break | cycle_time |
|---|---|---|---|---|
| driving | ⬆️ Continues increasing from API time | ⬆️ Continues increasing | ⬆️ Continues increasing | ⬆️ Continues increasing |
| on_duty_not_driving | ⏸️ No increase until trip starts | ⬆️ Continues increasing | 🔁 Reset to 0 if break qualifies, else ⬆️ continues increasing | ⬆️ Continues increasing |
| off_duty | ⏸️ No increase until trip starts | ⏸️ No increase until trip starts | 🔁 Reset to 0 if break qualifies, else ⬆️ Continues increasing | ⬆️ Continues increasing |
| daily_break | 🔁 Reset to 0 at trip start | 🔁 Reset to 0 at trip start | 🔁 Reset to 0 | ⬆️ Continues to accumulate after trip starts |
| cycle_break | 🔁 Reset to 0 at trip start | 🔁 Reset to 0 at trip start | 🔁 Reset to 0 | 🔁 Clears the daily_cycle_duty_times array |
Short break qualification for a given current driver state
This section covers when a off_duty or on_duty_not_driving activity by the driver qualifies as a break against continuous driving limitations. Applies only when the driver current activity is one of the following:
on_duty_not_drivingoff_duty
| Condition | Result |
|---|---|
time_elapsed >= 1800 sec (30min) | ✅ Current break qualifies as a short break→ minutes_since_last_break = 0 |
time_elapsed < 1800 sec (30min) | Calculated projected time in the current status. Details in the next rows. |
Projected total break time:(time_elapsed + (trip_start_time - current_time)) >= 1800 sec (30min) | ✅ Current break will qualify before trip → reset minutes_since_last_break to 0 |
Otherwise | ❌ Does NOT qualify → minutes_since_last_break keeps increasing |
Sample API Query
Sample API Response
API Query Limits
- NextBillion.ai allows a maximum rate limit of 6000 queries per minute or 100 queries per second for continuous requests. Note: We can increase the quota if needed on request. Contact support@nextbillion.ai for more details.