To get the time entry records for the employees at your
restaurant, send a GET
request to the
/labor/v1/timeEntries
resource of the labor API. Time
entries record information about the shifts that employees complete. The
response contains an array of time entry objects that contain
information about the time entries.
If an employee has not clocked out of the work shift, the
outDate
value for the time entry is null
. The
time entry period is not yet complete. Time entry values can change as
the server takes new orders and payments during an active work
shift.
When the employee clocks out, the outDate
value is
set to the date and time that the employee closed the work shift. The
time entry is then complete. At this point, the monetary values in the
time entry are static and are not updated by other activities in the
restaurant. For example, if an employee has $100 of non-cash sales in
their time entry when they clock out, and then an order of $10 non-cash
sales is later transferred to the employee, the
nonCashSales
value of the time entry is still $100, not
$110. The same applies to tips.
The following example curl command sends a
GET
request to the
/labor/v1/timeEntries
endpoint.
Example request to GET the time entries for restaurant employees
curl -v -X GET \
-H "Authorization: Bearer eyJzI1NiJ9hbGciOiJSU.eyJhd9yaXR5Ij
oiQ1JVTkNIVElNRSIsInJzR3VpZCI6IjE4YzQ5YWJlLWFlODItNGFlYy04ND
M1LWJhYTRjMjVlYTY2MiIsInNjb3BlIjpbImxWQiOlsidG9hc3QiXSwibmFt
aW5nQXV0aGhYm9yIiwib3JkZXJzIiwidXNlcm1nbXQiXSwiZXhwIjoxNDg0M
zg5ODUwLCJqdGkiOiJlMDYzZjJkMy1jNGYyLTRiZjItODJmNi01MTg1NWMzZ
DAxM2YiLCJjbGllbnRfaWQiOiJjcnVuY2h0aW1lIn0.X1_0y9Hzj5F9gdOw2
o6VSYTyZwooAJiFMDmNakbZrtiUdYwLzuLwLpCMQzX5pKYtOqDUz_cetGJL3
txKL1L-K2j1Enoq8An8hEM6e8J0KdAiwrYFO3W3CmWedaoz95K9ghNZVCs28
Td2Sp3Ix3fObxbrvanocx9_OT8S9uM8hdSXmBI_ykTWvOVgK4hO24V3DJy4b
9bz1FtgOvrClhELxCe8dJy7jiwAR60xczlCF5rna98RMLN6zY4ffjmljKFZ6
QV0KkVppWjEiJn7oFHiIylCX1sSg7sddrGatj0xJzts3GJ8u8_lryUNHaEvJ
dWq4Yzwo007AMgxjH9d241Y-g" \
-H "Toast-Restaurant-External-ID: 4622e7a9-b4be-3fef-9220-b3dad273e0b4" \
"https://[toast-api-hostname]
/labor/v1/timeEntries?startDate=
2018-11-14T01:00:00.000-0000&endDate=2018-11-16T01:00:00.000-0000
&includeMissedBreaks=true"
Specify the GUID of the restaurant that you want to
|
|
Specify the start and end dates of the time period you
want to |
|
The |
The following example shows a time entry for an employee.
Example response containing an employee time entry
[ { "guid": "26ac616b-b0d2-4d4e-b89b-62291be33d80", "entityType": null, "externalId": null, "nonCashSales": 0, "outDate": "2018-11-15T19:17:34.653+0000", "overtimeHours": 0, "breaks": [ { "breakType": { "guid": "8ed442b0-ca52-416d-8976-f941184eba15", "entityType": "BreakType" }, "paid": true, "inDate": "2018-11-15T14:19:27.043+0000", "outDate": "2018-11-15T14:30:35.490+0000", "missed": false, "auditResponse": true }, { "breakType": { "guid": "8ed442b0-ca52-416d-8976-f941184eba15", "entityType": "BreakType" }, "paid": true, "inDate": "2018-11-15T18:13:46.894+0000", "outDate": null, "missed": true, "auditResponse": true } ], "employeeReference": { "guid": "a0c9070e-fffd-4e97-b3ea-fc356fbf9224", "entityType": "RestaurantUser", "externalId": null }, "shiftReference": "56387b8e-78df-47a4-9395-e5e1cb3f04d1", "nonCashGratuityServiceCharges": 0, "inDate": "2018-11-15T14:14:46.894+0000", "regularHours": 5.046599722222222, "jobReference": { "guid": "8b623183-7d6f-4f7c-babb-e74fe722ad30", "entityType": "RestaurantJob", "externalId": null }, "tipsWithheld": 0, "businessDate": "20181115", "cashGratuityServiceCharges": 12.95, "createdDate": "2018-11-15T14:14:47.503+0000", "deleted": false, "deletedDate": null, "cashSales": 139.02, "hourlyWage": 7.5, "nonCashTips": 0, "modifiedDate": "2018-11-15T19:17:35.801+0000", "declaredCashTips": 30 } ]
The |
|
The For example, If the |
|
The time entry object contains information about the shift
worked. For example, this |
|
The
|
|
The |
|
The GUID of the |
|
The |
|
The |
|
The |
|
The |
|
The If the |
|
The |
|
The |