POST /v2/labor/shifts

Creates a new Shift.

A Shift represents a complete workday for a single employee. You must provide the following values in your request to this endpoint:

An attempt to create a new Shift can result in a BAD_REQUEST error when:

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
shift Object Yes

A record of the hourly rate, start, and end times for a single work shift for an employee. This might include a record of the start and end times for breaks taken during the shift.

shift.status String No

Describes the working state of the current Shift.

shift.wage Object No

The hourly wage rate used to compensate an employee for this shift.

shift.wage.title String No

The name of the job performed during this shift. Square labor-reporting UIs might group shifts together by title.

shift.wage.hourly_rate Object No

Represents an amount of money. Money fields can be signed or unsigned. Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information.

shift.wage.hourly_rate.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

shift.wage.hourly_rate.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

shift.updated_at String No

A read-only timestamp in RFC 3339 format; presented in UTC.

shift.id String No

The UUID for this object.

shift.location_id String No

The ID of the location this shift occurred at. The location should be based on where the employee clocked in.

shift.team_member_id String No

The ID of the team member this shift belongs to. Replaced employee_id at version "2020-08-26".

shift.timezone String No

The read-only convenience value that is calculated from the location based on the location_id. Format: the IANA timezone database identifier for the location timezone.

shift.version Integer No

Used for resolving concurrency issues. The request fails if the version provided does not match the server version at the time of the request. If not provided, Square executes a blind write; potentially overwriting data from another write.

shift.breaks[] Array No

A list of all the paid or unpaid breaks that were taken during this shift.

shift.breaks[].id String No

The UUID for this object.

shift.breaks[].expected_duration String Yes

Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of the break.

shift.breaks[].name String Yes

A human-readable name.

shift.breaks[].break_type_id String Yes

The BreakType that this Break was templated on.

shift.breaks[].start_at String Yes

RFC 3339; follows the same timezone information as Shift. Precision up to the minute is respected; seconds are truncated.

shift.breaks[].end_at String No

RFC 3339; follows the same timezone information as Shift. Precision up to the minute is respected; seconds are truncated.

shift.breaks[].is_paid Boolean Yes

Whether this break counts towards time worked for compensation purposes.

shift.start_at String Yes

RFC 3339; shifted to the location timezone + offset. Precision up to the minute is respected; seconds are truncated.

shift.employee_id String No

The ID of the employee this shift belongs to. DEPRECATED at version 2020-08-26. Use team_member_id instead.

shift.end_at String No

RFC 3339; shifted to the timezone + offset. Precision up to the minute is respected; seconds are truncated.

shift.created_at String No

A read-only timestamp in RFC 3339 format; presented in UTC.

idempotency_key String No

A unique string value to ensure the idempotency of the operation.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.