Skip to main content

Vehicle Shift Timings

Description

By calling this REST endpoint, it provides vehicle shifts associated with a vehicle and day.

1. Endpoint for Data Retrieval

To access the API, use the Rest endpoint provided by the Fleet API team:

The endpoint accepts the following variables that need to be specified:

vehicle: Comma-separated names of the vehicle(s) for which you want to retrieve data.

startTime: Start timestamp for data retrieval. Note that the start time must not be from the current day; it should be at least one day old.

endTime: End timestamp for data retrieval. If no endtime is given, a default of 24 hours is added to the starttime.

REST-ENDPOINT/shift-timing?startTime=1690828364&endTime=1690828380&vehicle=marinara,mayble

2. Authorization Token

To use the API, you need to generate an authorization token. The token should have the scope set for batch operations:

Scope: The scope required to access this endpoint may differ from the real-time API endpoints. You will need to use the scope associated with the batch API. All other token generation parameters remain the same as when requesting a Realtime api token.

3. Output Format

[
{
"log_hash": "vehicle_2024-09-12_17-32-53",
"shift_start_time": "2024-09-12T21:33:15.377Z",
"shift_end_time": "2024-09-12T21:33:42.197Z",
"vehicle": "vehicle"
},
{
"log_hash": "vehicle_2024-09-12_20-31-09",
"shift_start_time": "2024-09-13T00:31:29.612Z",
"shift_end_time": "2024-09-13T00:36:57.842Z",
"vehicle": "vehicle"
}
]

If you have any questions or require further assistance, please don't hesitate to reach out to us. We are here to help you access and utilize May Mobility's fleet API effectively.