Time Entries & Day Summary
Create, close, list, edit, and delete time entries, then attach comments and files to a specific day. Owned-resource handlers return 404 when the record is missing or belongs to another user.
Time Entries#
Punch clock and entries#
Start a new open session for the authenticated user.
- No request body.
201with time entry object withid,userId,date,checkIn,checkOut,source,createdAt, andupdatedAt;409if a session is already open.
Close the current open session.
- No request body.
- time entry object with
id,userId,date,checkIn,checkOut,source,createdAt, andupdatedAt;404if no session is open,422if under one minute.
List entries ordered by date descending, then check-in ascending.
- query
dateorfrom/toasYYYY-MM-DD; optionallimitcapped at500andskip
- array of time entry object with
id,userId,date,checkIn,checkOut,source,createdAt, andupdatedAt.
Create a manual time entry and write an audit log.
- JSON
{ date: YYYY-MM-DD, checkIn: ISO datetime, checkOut?: ISO datetime | null }
201with time entry object withid,userId,date,checkIn,checkOut,source,createdAt, andupdatedAt.
checkInmust fall ondate; check-out must be later.
Update check-in and/or check-out on one owned entry.
- JSON
{ checkIn?: ISO datetime, checkOut?: ISO datetime | null }
- time entry object with
id,userId,date,checkIn,checkOut,source,createdAt, andupdatedAt;404when the entry is missing or not owned.
Delete one owned entry and write an audit log.
- No request body.
- JSON
{ success: true };404when missing or not owned.
Day Summary#
Comments and files#
Fetch all comments and files for one day.
- No request body.
- JSON
{ comments: DayComment[], files: DayFile[] }.
:datemust beYYYY-MM-DD.
List comments for one day, oldest first.
- No request body.
- array of comment object with
id,userId,date,content,time,createdAt, andupdatedAt.
Create a day comment and write an audit log.
- JSON
{ content: string, time?: ISO datetime | null };contentis1to10000chars
201with comment object withid,userId,date,content,time,createdAt, andupdatedAt.
List files for one day, oldest first.
- No request body.
- array of file object with
id,userId,date,filename,storagePath,mimeType,size,time,createdAt, andupdatedAt.
Upload one day file with multipart form data.
- multipart
fileplus optionaltime; allowed types are JPEG, PNG, GIF, WebP, PDF, text/plain, and text/csv
201with file object withid,userId,date,filename,storagePath,mimeType,size,time,createdAt, andupdatedAt.
- default max size is
52428800bytes (50 MiB) unlessMAX_FILE_SIZEis changed.
Update one owned comment.
- JSON
{ content?: string, time?: ISO datetime | null }
- comment object with
id,userId,date,content,time,createdAt, andupdatedAt;404when missing or not owned.
Delete one owned comment and write an audit log.
- No request body.
- JSON
{ success: true };404when missing or not owned.
Download one owned file as an attachment.
- No request body.
- file stream with
Content-Type,Content-Disposition, andContent-Lengthheaders.
Delete one owned file from storage and audit log.
- No request body.
- JSON
{ success: true };404when missing or not owned.