updateShift API Endpoint

The updateShift API can be used to update shift details such as shift intervals, timezones, and the shift's name.

The default shift name (shift_name) cannot be updated, as it is system generated.

API Details

PUT https://api.zendrive.com/fleet/v1/shift/{shift_id}

Using the updateShift API Endpoint, you can update shift intervals, timezone and shift_name.

Headers

Name
Type
Description

API KEY <API_KEY>*

Application/ JSON

Authorization header.

Sample Request Payload

{
      "shift_name":"morning_shift",
      "shift_intervals":[
        {
          "start_time":{
            "day_of_week":"Sunday",
            "time":"11:00 PM"
          },
          "end_time":{
            "day_of_week":"Monday",
            "Time":"02:00 AM"
          }
        },
        {
          "start_time":{
            "day_of_week":"Monday",
            "time":"11:00 AM"
          },
          "end_time":{
            "day_of_week":"Monday",
            "time":"02:00 PM"
          }
        }
      ],
      "timezone":"America/Los_Angeles"
}

Request Fields

shift_name

Shift name as set by the fleet manager.

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.

Notes:

The shift name can be 50 characters long and comprise of alphanumeric characters, ‘_', '-’ and space. In shift_intervals, the day_of_week must be camel case. The timezone must be in ISO format.

Was this helpful?