v1

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

CreateScheduledShift

Creates a scheduled shift by providing draft shift details such as job ID, team member assignment, and start and end times.

The following draft_shift_details fields are required:

  • location_id
  • job_id
  • start_at
  • end_at
post/v2/labor/scheduled-shifts

Request body

idempotency_keystring

A unique identifier for the CreateScheduledShift request, used to ensure the idempotency of the operation.

Example request

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

Response

Success

Example response

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