v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
Labor

UpdateScheduledShift

Updates the draft shift details for a scheduled shift. This endpoint supports sparse updates, so only new, changed, or removed fields are required in the request. You must publish the shift to make updates public.

You can make the following updates to draft_shift_details:

  • Change the location_id, job_id, start_at, and end_at fields.
  • Add, change, or clear the team_member_id and notes fields. To clear these fields, set the value to null.
  • Change the is_deleted field. To delete a scheduled shift, set is_deleted to true and then publish the shift.
put/v2/labor/scheduled-shifts/{id}

Path parameters

idstring required

The ID of the scheduled shift to update.

Request body

Example request

{
  "scheduled_shift": {
    "draft_shift_details": {
      "end_at": "2019-03-25T13:18:00-05:00",
      "is_deleted": false,
      "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M",
      "location_id": "PAA1RJZZKXBFG",
      "notes": "Dont forget to prep the vegetables",
      "start_at": "2019-03-25T03:11:00-05:00",
      "team_member_id": "ormj0jJJZ5OZIzxrZYJI"
    },
    "version": 1
  }
}

Response

Success

Example response

{
  "scheduled_shift": {
    "created_at": "2019-02-25T03:11:00-05:00",
    "draft_shift_details": {
      "end_at": "2019-03-25T13:18:00-05:00",
      "is_deleted": false,
      "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M",
      "location_id": "PAA1RJZZKXBFG",
      "notes": "Dont forget to prep the vegetables",
      "start_at": "2019-03-25T03:11:00-05:00",
      "team_member_id": "ormj0jJJZ5OZIzxrZYJI",
      "timezone": "America/New_York"
    },
    "id": "K0YH4CV5462JB",
    "updated_at": "2019-02-25T03:11:15-05:00",
    "version": 2
  }
}