Skip to main content

Timesheets

Overview

Manages the creation and updating of timesheets. Use this instead of calling Decisively directly.

Note: the response format here is the base response format of Decisively, so some terminology will be different (eg: the use of session in place of timesheet)

tip

All endpoints in this service use the Base URL of /timesheets

1. Create Timesheet

  • Endpoint: /
  • Method: POST
  • Summary: Create a timesheet for an employee

Request Parameters:

In the JSON body

{
"startDate": "2025-01-01" // When the timesheet starts from. This must align with your configured time spans
}

Response:

{
"goal": "GUID", // the overall goal of this timesheet
"graph": {}, // A compressed version of the rule graph from Decisively. All data is contained within this
"id": "GUID",
"indices": [], // An array of attributes that will be indexed
"indicesValues": {}, // The values of the requested indices
"model": "GUID", // The Decisively model this is based on
"release": "GUID", // The Decisively release this is based on
"status": "in-progress", // The status of the session. Note: this is seperate from the status of the underlying timesheet. This will generally be in-progress, until the entire proces is complete in which case it will "complete" (or "error" if a non-recoverable error has been detected)
}

2. Update Timesheet

  • Endpoint: /{session}
  • Method: PATCH
  • Summary: Used to create timesheet entries within a timesheet or update existing timesheet entries.

Request Parameters:

Due to the dynamic nature of the API your specific request will differ.

{
"@parent": "path to the entry point to create this time entry",
"@day": "The timesheet day this entry is for",
// The GUID: value pairs of data to update for this timesheet entry
}

Response:

See the response for the Create Timesheet endpoint


3. Get Timesheet

  • Endpoint: /{session | date}
  • Method: GET
  • Summary: Get a timesheet. You can either provide the specific session id, or a date. Providing a date (in the form YYYY-MM-DD) will return your timesheet for that date (or whoever you have authenticated as)

Request Parameters:

None

Response:

See the response for the Create Timesheet endpoint


3. Get Timesheets

  • Endpoint: /
  • Method: GET
  • Summary: Get all timesheets. Note: generally you can only get timesheets for your authenticated user. The backend will perform RBAC checks to determine what timesheets are returned.

Request Parameters:

None

Response:

{
"total": 1, // Total number of timesheets in the system. Note: only 10 is returned at a time by default
"items": [{
// same response as the create timesheet response
}]
}

Authentication

Please refer to the authentication guide to understand how to authenticate your requests before interacting with the API.


Error Handling

Please refer to the error handling guide for details on common errors and how to handle them.