Announcing Our Connect v2 Labor API
Capture employee working hours with breaks and hourly pay rate
We’re very excited to announce the release of the Square Connect v2 Labor API. Having visibility into daily employee operations and labor costs is a critical part of managing a business. It helps business owners better understand the performance of their business, employees, and ultimately make more informed & cost-effective staffing decisions. With the Labor API, partners can build stronger, more accurate, and more comprehensive labor management integrations on behalf of our shared customers.
To highlight the changes and additional functionality recently implemented (i.e. break tracking, multiple wages, etc…), we updated the name from Timecard API to Labor API. The new name better aligns with the breadth of labor management functionalities our partners can power with the Labor API.
You can more easily manage employee’s hours, breaks, shift wages, and import/export labor data.
How to create a Shift (including break and wage information):
curl https://connect.squareup.com/v2/labor/shifts \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-d '{
"idempotency_key": "UUID",
"shift": {
"employee_id": "AN_EMPLOYEE_ID",
"location_id": "YOUR_LOCATION_ID",
"start_at": "2019-02-05T12:00:00Z",
"wage": {
"title": "Photographer",
"hourly_rate": {
"amount": 4500,
"currency": "USD"
}
},
"breaks": [
{
"start_at": "2018-10-16T04:00:00Z"
"break_type_id": "A_BREAK_TYPE_ID",
"name": "2nd Breakfast",
"expected_duration": "PT10M",
"is_paid": true
}
]
}
}'
How to query a set of closed shifts from a workweek:
curl https: //connect.squareup.com/v2/labor/shifts/search \
-H 'Content-Type: application/json'\ -
H 'Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN'\ -
d '{
"query": {
"filter": {
"location_id": ["YOUR_LOCATION_ID"],
"workday": {
"date_range": {
"start_date": "2018-10-01",
"end_date": "2018-10-08"
},
"match_on": "START_AT"
},
"Status": "CLOSED"
},
"sort": {
"field": "CREATED_AT",
"order": "ASC"
}
},
"limit": 20
}'
You will find below a list of functionalities we implemented with this release:
-
Employee shifts: View/create shifts worked by any employee, including the business location where the shift was worked, shift start/end times, and regular, overtime, and double time hours worked during the shift.
-
Employee break tracking: Track employee breaks over the course of a worked shift, including break start/end times, durations, and whether they were paid/unpaid.
-
Employee job tracking: View/edit the job (and wage) worked by an employee for any given shift, including the ability for one employee to have multiple jobs (and wages).
-
Search: Search shifts by employee, business location, workday, start/end time, and status (open/closed shifts).
If you want to keep up to date with the rest of our content, be sure to follow this blog & our Twitter account, and sign up for our developer newsletter! We also have a Slack community for connecting with and talking to other developers implementing Square APIs.