This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.
Send a GET
request to the
/labor/v1/timeEntries
resource of the labor API to get the
time entry records for the employees at your restaurant. Time entries
record information about the shifts that employees complete. The resource
returns an array of JSON objects containing information about the time
entries.
Keep in mind that if an employee (such as a server) has not clocked
out of the work shift, the outDate
value for the time entry
is null
because the time entry period is not yet complete.
This means that the time entry values can change as the server takes new
orders and payments during the active work shift.
When the server clocks out, the outDate
value is set to
the date and time that the employee closed the work shift and 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 a server has $100 of non-cash sales in their
time entry when the server clocks out, and then an order of $10 non-cash
sales is later transferred to the server, the nonCashSales
value of the time entry will still be $100 (not $110). The same applies to
tips.
The following example curl command sends a
GET
request to the
/labor/v1/timeEntries
resource.
Get the Time Entries for the Employees of a Restaurant
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 get time entries for. This must be an individual restaurant, not the GUID for a restaurant group. |
|
Specify the start and end dates of the time period you want to get shifts for. You can select a period of up to 30 days. |
|
The |
The following example shows the JSON message body data that provides information about a time entry for an employee.
JSON Message Body Content for Time Entries
[ {"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 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 |