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

Parameters: set_timesheet_status
NameTypeDescription
entry_ids array required array Entry ids from list_timesheet_entries.
status string required string One of approved, declined, pending.

Request

cURL
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"}'
Python
result = client.call("shiftbase", "set_timesheet_status", {"entry_ids":["40118","40119","40122"],"status":"approved"})
Node.js
const result = await cotlet.call('shiftbase', 'set_timesheet_status', {"entry_ids":["40118","40119","40122"],"status":"approved"});
CLI
cotlet call shiftbase set_timesheet_status --data '{"entry_ids":["40118","40119","40122"],"status":"approved"}'

Example response

JSON

{
  "updated": [
    {
      "id": "40118",
      "status": "approved"
    },
    {
      "id": "40119",
      "status": "approved"
    },
    {
      "id": "40122",
      "status": "approved"
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.