getAllShifts API Endpoint

The getAllShifts API can be used to get latest shift details for a given fleet.

API Details

GET https://api.zendrive.com/fleet/v1/shifts

Returns list of shifts along with shift details for a given fleet.

Headers

Name
Type
Description

API KEY <API_KEY>*

Application/JSON

Sample Response

[
    {
        "timezone": "Asia/Kolkata",
        "is_default": false,
        "shift_name": "shift_1",
        "shift_intervals": [
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "monday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "monday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "tuesday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "tuesday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "wednesday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "wednesday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "thursday"
                },
                "start_time": {
                    "time": "11:00 AM",
                    "day_of_week": "thursday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "friday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "friday"
                }
            }
        ],
        "assigned_drivers": 5,
        "shift_id": "default_shift_lriianvzzf",
        "created_at": "2022-04-04"
    },
    {
        "timezone": "Asia/Kolkata",
        "is_default": true,
        "shift_name": "shift_2",
        "shift_intervals": [
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "sunday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "sunday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "monday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "monday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "tuesday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "tuesday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "wednesday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "wednesday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "thursday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "thursday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "friday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "friday"
                }
            },
            {
                "end_time": {
                    "time": "11:59 PM",
                    "day_of_week": "saturday"
                },
                "start_time": {
                    "time": "12:00 AM",
                    "day_of_week": "saturday"
                }
            }
        ],
        "assigned_drivers": 3875,
        "shift_id": "default_shift_tipbqnlglu",
        "created_at": "2022-04-12"
    }
]

Response Fields

shifts

List of shift detail objects.

shift_name

The shift name as set by the fleet manager.

shift_id

Shift ID assigned by Zendrive.

is_default

Denotes whether the shift is a default shift or not.

shift_intervals

List of shift interval objects. Each element of the list represents a single shift interval with start and end time.

timezone

Timezone as set by the fleet manager.

assigned_drivers

Number of drivers assigned to this shift

Was this helpful?