POST
Workdiary.Entry.Save
Same as Workdiary.Attendance.Save.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Runs the Workdiary.Entry.Save function and returns JSON.
Push Service
No push is sent because this function only reads data or returns helper information.
Automation
No automation is run for this function.
Special Instructions
- user_id is optional: defaults to the logged-in user from the Bearer token. Send user_id when saving for another team member after Workdiary.Get.
- Dashboard hidden approve_id defaults to 1 (pending). If approve / approve_id is omitted, the DB default approve=2 (approved) is used — do not send empty string.
- Dashboard field names are accepted: work_dairy_add_date, work_dairy_check_in, work_dairy_check_out, work_dairy_notes, work_dairy_exit_date, sick_day, work_dairy_vacation_from_date, work_dairy_vacation_to_date, approve_id, hidden_user_id, data_id.
- sick_day values: 0 = normal attendance, 1 = sick / block day, 2 = vacation day.
- Create sick day: omit team_hours_id and send sick_day=1 (check-in/out default to 00:00).
- Create vacation: omit team_hours_id and send sick_day=2 with work_dairy_vacation_from_date and work_dairy_vacation_to_date (YYYY-MM-DD). Each day in the range gets its own team_hours row (same as dashboard). Check-in/out are not required.
- Edit vacation: pass team_hours_id with sick_day=2 and work_dairy_vacation_from_date (updates that single row only; to_date is ignored on edit).
- Clear sick day / set sick_day=0: same API — send team_hours_id (from create response or Workdiary.Entry.Get / Entries.List) with sick_day=0 and real work_dairy_check_in / work_dairy_check_out (or omit times to keep existing values). Alias: data_id, id.
- Sick day and vacation day are mutually exclusive in the dashboard UI; API accepts sick_day 0, 1, or 2.
- Alias route: Workdiary.Entry.Save.
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
work_dairy_add_datepost | date | 2026-08-20 | Entrance date. Required for normal/sick create. On update, optional if team_hours_id is set (reuses existing date). Not used for vacation create (use vacation from/to dates). Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
work_dairy_check_inpost | string | 09:00 | Check in H:i. Required for non-sick/non-vacation create; on update omitted values reuse the existing row. |
work_dairy_check_outpost | string | 17:00 | Check out H:i. Required for non-sick/non-vacation create; on update omitted values reuse the existing row. |
work_dairy_vacation_from_datepost | date | 2026-09-01 | Vacation range start (YYYY-MM-DD). Required when sick_day=2. Alias: vacation_from_date. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
work_dairy_vacation_to_datepost | date | 2026-09-05 | Vacation range end (YYYY-MM-DD). Required when sick_day=2 on create. Alias: vacation_to_date. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
team_hours_idpost | int | 99 | Existing row id to update (required to edit / clear sick_day). Alias: data_id, id. |
sick_daypost | int | 0 | 0 = normal attendance. 1 = sick / block day (end_time = start_time). 2 = vacation day (one row per day in from/to range on create). Send 0 with team_hours_id to clear a previously saved sick day. |
work_dairy_notespost | string | Family trip | Optional note. Alias: note, notes. |
approvepost | int | 2 | Optional. 1=pending, 2=approved (DB default when omitted), 3=rejected. Alias: approve_id. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Workdiary.Entry.Save",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body_create_sick": {
"work_dairy_add_date": "2026-08-20",
"sick_day": "1"
},
"body_create_vacation": {
"sick_day": "2",
"work_dairy_vacation_from_date": "2026-09-01",
"work_dairy_vacation_to_date": "2026-09-05",
"work_dairy_notes": "Summer vacation"
},
"body_clear_sick_update": {
"team_hours_id": "99",
"work_dairy_add_date": "2026-08-20",
"work_dairy_check_in": "09:00",
"work_dairy_check_out": "17:00",
"sick_day": "0"
},
"body": [],
"url_user": "https:\/\/{user}.bull36.com\/app\/Workdiary.Entry.Save",
"url_domain": "https:\/\/{domain}\/app\/Workdiary.Entry.Save"
}Endpoint
POST /app/Workdiary.Entry.Save
POST https://{user}.bull36.com/app/Workdiary.Entry.Save
POST https://{domain}/app/Workdiary.Entry.SaveSample Output
{
"success": 1,
"message": "added successfully",
"team_hours_id": 120,
"user_id": 211,
"sick_day": 2,
"current_date": "all_data",
"vacation_days_saved": 5,
"vacation_days_total": 5,
"vacation_from_date": "2026-09-01",
"vacation_to_date": "2026-09-05"
}JavaScript Example
const token = 'YOUR TOKEN';
// 1) Create sick day
const createSick = new URLSearchParams({ work_dairy_add_date: '2026-08-20', sick_day: '1' });
const sick = await (await fetch('/app/Workdiary.Entry.Save', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body: createSick })).json();
// 2) Create vacation (5 separate rows: Sep 1–5)
const createVacation = new URLSearchParams({
sick_day: '2',
work_dairy_vacation_from_date: '2026-09-01',
work_dairy_vacation_to_date: '2026-09-05',
work_dairy_notes: 'Summer vacation'
});
const vacation = await fetch('/app/Workdiary.Entry.Save', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body: createVacation });
console.log(await vacation.json()); // current_date: 'all_data', vacation_days_saved: 5
// 3) Clear sick day — pass team_hours_id from create response
const update = new URLSearchParams({
team_hours_id: String(sick.team_hours_id),
work_dairy_add_date: '2026-08-20',
work_dairy_check_in: '09:00',
work_dairy_check_out: '17:00',
sick_day: '0'
});
const res = await fetch('/app/Workdiary.Entry.Save', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body: update });
console.log(await res.json());Error Example
{
"success": 0,
"message": "Please Fill a From date And To date"
}