Shifts
Create, update, delete, and query the available shifts in Square..
Table Specific Information
Select
The adapter uses the Square API to process search criteria that refer to the Id column, while other filters are processed client side within the adapter.
Retrieve all shifts:
SELECT * FROM Shifts
Retrieve only one Shift:
SELECT * FROM Customers WHERE Id = 'T35HMQSN89SV4'
Insert
To create a Shift, you will need to specify the following values: EmployeeId, LocationId, and StartAt.
INSERT INTO Shifts(EmployeeId,LocationId,StartAt) VALUES('_77Nq6SzK0cH2YRX-q9a','92BYHNBR6W77E',StartAt='2022-02-23T18:00:00-05:00')
Update
Modify the details of an existing Shift by providing the Id of the Shift:
UPDATE Shifts SET Version=5, LocationId='92BYHNBR6W77E', StartAt='2022-02-23T18:00:00-05:00', EmployeeId='_77Nq6SzK0cH2YRX-q9a' where Id='T35HMQSN89SV4'
Delete
Delete a Shift by providing the Id of the shift:
DELETE FROM Shifts WHERE Id = 'T35HMQSN89SV4'
Columns
Name | Type | ReadOnly | Description |
Breaks | String | False |
A list of all the paid or unpaid breaks that were taken during this shift. |
CreatedAt | Datetime | True |
A read-only timestamp in RFC 3339 format; presented in UTC. |
DeclaredCashTipMoney | String | False |
The tips declared by the team member for the shift. |
EmployeeId | String | False |
The tips declared by the team member for the shift. |
EndAt | String | False |
RFC 3339; shifted to the timezone + offset. Precision up to the minute is respected; seconds are truncated. |
Id | String | True |
The UUID for this object. |
LocationId | String | False |
The ID of the location this shift occurred at. The location should be based on where the employee clocked in. |
StartAt | String | False |
RFC 3339; shifted to the location timezone + offset. Precision up to the minute is respected; seconds are truncated. |
Status | String | False |
Describes the working state of the current Shift. The allowed values are OPEN, CLOSED. |
TeammemberId | String | False |
The ID of the team member this shift belongs to. |
TimeZone | String | False |
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. |
UpdatedAt | Datetime | True |
A read-only timestamp in RFC 3339 format; presented in UTC. |
Version | Integer | False |
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. |
Wage | String | False |
Job and pay related information. If the wage is not set on create, it defaults to a wage of zero. If the title is not set on create, it defaults to the name of the role the employee is assigned to, if any. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
DateRangeEndDate | String |
String in YYYY-MM-DD format, e.g. 2017-10-31 per the ISO 8601 extended format for calendar dates. The end of a date range (inclusive) |
DateRangeStartDate | String |
String in YYYY-MM-DD format, e.g. 2017-10-31 per the ISO 8601 extended format for calendar dates. The beginning of a date range (inclusive). |
StartEndAt | String |
A datetime value in RFC-3339 format indicating when the time range ends. |
StartStartAt | String |
A datetime value in RFC-3339 format indicating when the time range starts. |
EndEndAt | String |
A datetime value in RFC-3339 format indicating when the time range ends. |
EndStartAt | String |
A datetime value in RFC-3339 format indicating when the time range starts. |