JDBC Driver for Square

Build 25.0.9434

Shifts

Create, update, delete, and query the available shifts in Square.

Table Specific Information

Select

The driver uses the Square API to process search criteria that refer to the Id column, while other filters are processed client side within the driver.

Retrieve all shifts:

SELECT * FROM Shifts

Retrieve only one Shift:

SELECT * FROM Customers WHERE Id = 'T35HMQSN89SV4'

The StartAt column supports the =, >, >=, <, <= operators.

SELECT Id, StartAt FROM Shifts WHERE StartAt = '2025-07-03 05:26:00.0';
SELECT Id, StartAt FROM Shifts WHERE StartAt > '2025-07-03 05:26:00.0';
SELECT Id, StartAt FROM Shifts WHERE StartAt >= '2025-07-03 05:26:00.0';
SELECT Id, StartAt FROM Shifts WHERE StartAt < '2025-07-03 05:26:00.0';
SELECT Id, StartAt FROM Shifts WHERE StartAt <= '2025-07-03 05:26:00.0';
SELECT Id, StartAt FROM Shifts WHERE StartAt >= '2025-03-21 01:38:00.0' AND StartAt < '2025-07-03 05:26:00.0';

The EndAt column supports the =, >, >=, <, <= operators.

SELECT Id, EndAt FROM Shifts WHERE EndAt = '2025-07-03 05:26:00.0';
SELECT Id, EndAt FROM Shifts WHERE EndAt > '2025-07-03 05:26:00.0';
SELECT Id, EndAt FROM Shifts WHERE EndAt >= '2025-07-03 05:26:00.0';
SELECT Id, EndAt FROM Shifts WHERE EndAt < '2025-07-03 05:26:00.0';
SELECT Id, EndAt FROM Shifts WHERE EndAt <= '2025-07-03 05:26:00.0';
SELECT Id, EndAt FROM Shifts WHERE EndAt > '2025-07-04T02:22:00-07:00' AND EndAt <= '2025-07-04T03:42:00-07:00';

The resultset can be filtered using both StartAt and EndAt together.

SELECT Id, StartAt, EndAt FROM Shifts WHERE StartAt >= '2025-03-21 01:38:00.0' AND EndAt < '2025-07-04 06:42:00.0';

Insert

To create a Shift, you will need to specify the following values: TeamMemberId, LocationId, and StartAt.

INSERT INTO Shifts(TeamMemberId, LocationId, StartAt,  WageTitle, WageHourlyRateAmount, WageHourlyRateCurrency, WageTipEligible, DeclaredCashTipMoneyAmount, DeclaredCashTipMoneyCurrency, Breaks) VALUES ('TMpveKF7plf5H7eZ','92BYHNBR6W77E', '2025-07-03T07:20:14.382-04:00', 'insert1', 100, 'USD', true, 500, 'USD', '[{"start_at": "2025-07-03T07:20:00-04:00", "end_at": "2025-07-03T07:21:00-04:00", "break_type_id": "REGS1EQR1TPZ5", "name": "Tea Break", "expected_duration": "PT5M", "is_paid": true}]');

Update

Modify the details of an existing Shift by providing the Id of the Shift:

UPDATE Shifts SET Version=1, LocationId='92BYHNBR6W77E', StartAt='2025-07-03T07:50:40.017-04:00', TeamMemberId='TMyvF-_wObMpErVh', WageTitle='updated', WageHourlyRateAmount = 2043, WageHourlyRateCurrency = 'USD' where Id='RX3KS4G3VH00N';

Delete

Delete a Shift by providing the Id of the shift:

DELETE FROM Shifts WHERE Id = 'T35HMQSN89SV4'

Columns

Name Type ReadOnly Description
Id [KEY] String True

The UUID for this object.

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.

DeclaredCashTipMoneyAmount Integer False

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.

DeclaredCashTipMoneyCurrency String False

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

The allowed values are UNKNOWN_CURRENCY, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SLE, SOS, SRD, SSP, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XTS, XXX, YER, ZAR, ZMK, ZMW, BTC, XUS.

EndAt Datetime False

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

LocationId String False

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

StartAt Datetime 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.

WageTitle String False

The name of the job performed during this shift.

WageHourlyRateAmount Integer False

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.

WageHourlyRateCurrency String False

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

The allowed values are UNKNOWN_CURRENCY, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SLE, SOS, SRD, SSP, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XTS, XXX, YER, ZAR, ZMK, ZMW, BTC, XUS.

WageJobId String True

The id of the job performed during this shift. Square labor-reporting UIs might group shifts together by id. This cannot be used to retrieve the job.

WageTipEligible Boolean False

Whether team members are eligible for tips when working this job.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434