Shift History
Retrieve the full audit trail for a shift โ who created it, every edit made, and every status change.
Endpointโ
GET /v1/staff/shifts/{id}/history
Authenticationโ
Requires an API key with the staff:read scope.
Path Parametersโ
| Parameter | Type | Description |
|---|---|---|
id | integer | ID of the shift |
Responseโ
Success (200 OK)โ
{
"data": [
{
"id": 101,
"staff_shift_id": 42,
"shift_reference": "SH-42",
"user": {
"id": 3,
"name": "Sarah Johnson",
"email": "sarah@example.com"
},
"source": "web",
"action": "created",
"changes": null,
"description": "Shift created",
"created_at": "2026-03-10T08:00:00+00:00"
},
{
"id": 108,
"staff_shift_id": 42,
"shift_reference": "SH-42",
"user": {
"id": 3,
"name": "Sarah Johnson",
"email": "sarah@example.com"
},
"source": "web",
"action": "updated",
"changes": {
"start_time": { "from": "09:00:00", "to": "10:00:00" }
},
"description": "Start time changed",
"created_at": "2026-04-01T09:30:00+00:00"
}
],
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-04-01T10:00:00+00:00"
}
}
Response Fieldsโ
| Field | Type | Description |
|---|---|---|
id | integer | Audit log entry ID |
staff_shift_id | integer | Associated shift ID |
shift_reference | string|null | Human-readable shift reference |
user | object|null | User who made the change (id, name, email) |
source | string | Change source (e.g., web, api) |
action | string | Action type (e.g., created, updated, deleted, status_changed) |
changes | object|null | Key/value map of changed fields with from and to values |
description | string|null | Human-readable description |
created_at | string | ISO 8601 datetime |
Errorsโ
| Status | Code | Description |
|---|---|---|
| 401 | authentication_required | No API key provided |
| 401 | invalid_api_key | Invalid API key |
| 403 | insufficient_scope | API key lacks staff:read scope |
| 404 | not_found | Shift not found or belongs to another supplier |
Example Requestโ
curl -X GET "https://app.equipdash.com/api/v1/staff/shifts/42/history" \
-H "Authorization: Bearer eqd_live_abc123xyz789..."