• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Update shift

PUT /v2/labor/shifts/{id}

Updates an existing Shift.

When adding a Break to a Shift, any earlier Breaks in the Shift have the end_at property set to a valid RFC-3339 datetime string.

When closing a Shift, all Break instances in the shift must be complete with end_at set on each Break.


Permissions
TIMECARDS_WRITE
TIMECARDS_READ
Try in API Explorer
Name Description
id
string

Required

ID of the object being updated.

Name Description
shift
Shift

Required

The updated Shift object.

Response Fields

Name Description
shift
Shift

The updated Shift.

errors
Error [ ]

Any errors that occurred during the request.

Examples

You are viewing an old version of the API
PUT /v2/labor/shifts/{id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
curl https://connect.squareup.com/v2/labor/shifts/K0YH4CV5462JB \
  -X PUT \
  -H 'Square-Version: 2020-09-23' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "shift": {
      "team_member_id": "ormj0jJJZ5OZIzxrZYJI",
      "location_id": "PAA1RJZZKXBFG",
      "start_at": "2019-01-25T03:11:00-05:00",
      "end_at": "2019-01-25T13:11:00-05:00",
      "wage": {
        "title": "Bartender",
        "hourly_rate": {
          "amount": 1500,
          "currency": "USD"
        }
      },
      "breaks": [
        {
          "id": "X7GAQYVVRRG6P",
          "start_at": "2019-01-25T06:11:00-05:00",
          "end_at": "2019-01-25T06:16:00-05:00",
          "break_type_id": "REGS1EQR1TPZ5",
          "name": "Tea Break",
          "expected_duration": "PT5M",
          "is_paid": true
        }
      ],
      "version": 1
    }
  }'
Response JSON
{
  "shift": {
    "id": "K0YH4CV5462JB",
    "team_member_id": "ormj0jJJZ5OZIzxrZYJI",
    "employee_id": "ormj0jJJZ5OZIzxrZYJI",
    "location_id": "PAA1RJZZKXBFG",
    "timezone": "America/New_York",
    "start_at": "2019-01-25T03:11:00-05:00",
    "end_at": "2019-01-25T13:11:00-05:00",
    "wage": {
      "title": "Bartender",
      "hourly_rate": {
        "amount": 1500,
        "currency": "USD"
      }
    },
    "breaks": [
      {
        "id": "X7GAQYVVRRG6P",
        "start_at": "2019-01-25T06:11:00-05:00",
        "end_at": "2019-01-25T06:16:00-05:00",
        "break_type_id": "REGS1EQR1TPZ5",
        "name": "Tea Break",
        "expected_duration": "PT5M",
        "is_paid": true
      }
    ],
    "status": "CLOSED",
    "version": 2,
    "created_at": "2019-02-28T00:39:02Z",
    "updated_at": "2019-02-28T00:42:41Z"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?