Get Timesheets
GET /v1/nextrestaurant/timesheets
Hours worked, overtime and pay
Needs staff:read and the Staff app. The same figures as Monitoring →
Payroll, for shifts that started on the venue days in range.
Request
GET https://your-site.example/api/index.php/v1/nextrestaurant/timesheets?from=<string>&to=<string>&location_id=<integer>
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
from |
string |
query |
Yes | First venue calendar day, inclusive. (date) |
to |
string |
query |
Yes | Last venue calendar day, inclusive. At most 366 days after from. (date) |
location_id |
integer |
query |
No | Only this location. Omit for all. (min 1) |
Responses
200 — The timesheets.
{
"data": {
"from": "2026-01-01",
"to": "2026-01-01",
"location_id": 1,
"staff": [
{}
],
"days": [
{}
],
"open_shifts": [
{}
]
}
}
| Field | Type | Meaning |
|---|---|---|
data.from |
string |
(date) |
data.to |
string |
(date) |
data.location_id |
integer|null |
|
data.staff[] |
object[] |
Per person over the range — hours, regular, overtime, break_minutes, hourly_rate, gross, shifts, and a per-week split. |
data.days[] |
object[] |
Per person per venue day. |
data.open_shifts[] |
object[] |
Clock-ins with no clock-out, which are not counted until closed. |
Errors
| Status | Code | When |
|---|---|---|
401 |
INVALID_TOKEN |
The token is missing, wrong, or none has been generated. |
403 |
INSUFFICIENT_SCOPE |
This API key does not have the permission this request needs. |
403 |
MODULE_DISABLED |
This module is disabled. |
403 |
API_DISABLED |
API is disabled |
404 |
UNKNOWN_LOCATION |
No such published location. |
422 |
VALIDATION_FAILED |
One error per invalid field, each with source.pointer. |
429 |
RATE_LIMITED |
Too many requests. RATE_LIMITED with a Retry-After header: this key used its budget for the minute, or this address sent 20 bad tokens in 5 minutes. Nothing ran, so the request is safe to retry after the wait. |
Examples
curl
curl -s "https://your-site.example/api/index.php/v1/nextrestaurant/timesheets?from=value&to=value" \
-H "Authorization: Bearer $API_TOKEN"
PHP
<?php
$ch = curl_init('https://your-site.example/api/index.php/v1/nextrestaurant/timesheets?from=<string>&to=<string>&location_id=<integer>');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('API_TOKEN'),
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
JavaScript
const API_TOKEN = process.env.API_TOKEN;
const response = await fetch("https://your-site.example/api/index.php/v1/nextrestaurant/timesheets?from=<string>&to=<string>&location_id=<integer>", {
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
},
});
const data = await response.json();