Set timesheet status
Approve, decline or restore timesheet entries to pending.
PUT https://cotlet.dev/api/v1/shiftbase/timesheet-status
write Confirm
Changes the status of every listed entry and returns the new status of each. Approved hours go on to the payroll report. A closed timesheet period rejects the change. Your role needs the right to approve hours. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| entry_ids array required | array | Entry ids from list_timesheet_entries. |
| status string required | string | One of approved, declined, pending. |
Request
curl -X PUT https://cotlet.dev/api/v1/shiftbase/timesheet-status \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"entry_ids":["40118","40119","40122"],"status":"approved"}' result = client.call("shiftbase", "set_timesheet_status", {"entry_ids":["40118","40119","40122"],"status":"approved"}) const result = await cotlet.call('shiftbase', 'set_timesheet_status', {"entry_ids":["40118","40119","40122"],"status":"approved"}); cotlet call shiftbase set_timesheet_status --data '{"entry_ids":["40118","40119","40122"],"status":"approved"}' Example response
{
"updated": [
{
"id": "40118",
"status": "approved"
},
{
"id": "40119",
"status": "approved"
},
{
"id": "40122",
"status": "approved"
}
]
}