Timesheet module API (1.0.0)

Download OpenAPI specification:

Module-owned API fragment. All paths live under service.basePath (/api/timesheet) with the major version inside the module's own path space (/v1).

Liveness probe. Served on the service's own listener, not under `/api/<module>`.

Authorizations:
bearerAuth

Responses

Readiness probe (database ping). Served on the service's own listener, not under `/api/<module>`.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Read the company's timesheet configuration (defaults if never set)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update the company's timesheet configuration (timesheet.config.manage)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
Request Body schema: application/json
required
enforceBillableWithinActual
boolean
allowBillableAboveEightHours
boolean
allowedPreviousWeeks
integer
allowedFutureWeeks
integer

Responses

Request samples

Content type
application/json
{
  • "enforceBillableWithinActual": true,
  • "allowBillableAboveEightHours": true,
  • "allowedPreviousWeeks": 0,
  • "allowedFutureWeeks": 0
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

listProjects

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
query Parameters
page
integer >= 1
Default: 1
pageSize
integer [ 1 .. 100 ]
Default: 25

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create a project (timesheet.projects.manage)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
Request Body schema: application/json
required
code
required
string

^[A-Z0-9_-]{1,20}$

name
required
string [ 1 .. 100 ] characters
status
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "name": "string",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

updateProject

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
projectId
required
string <uuid>
Request Body schema: application/json
required
code
required
string

^[A-Z0-9_-]{1,20}$

name
required
string [ 1 .. 100 ] characters
status
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "name": "string",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

List submitter -> assigned-approver assignments (timesheet.approvers.manage)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
query Parameters
page
integer >= 1
Default: 1
pageSize
integer [ 1 .. 100 ]
Default: 25

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Assign memberId's approver (grants submitter/approver relations, timesheet.approvers.manage)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
Request Body schema: application/json
required
memberId
required
string <uuid>
approverMemberId
required
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e",
  • "approverMemberId": "5cbd94bc-8de0-41ee-b0f2-051bdd50002c"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

List the caller's own entries for a week (timesheet.entries.manage-own)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
query Parameters
weekStart
required
string <date>

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create or update a draft entry for the caller (timesheet.entries.manage-own)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
Request Body schema: application/json
required
projectId
required
string <uuid>
entryDate
required
string <date>
realHours
required
number [ 0 .. 24 ]
billableHours
number [ 0 .. 24 ]

Responses

Request samples

Content type
application/json
{
  • "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  • "entryDate": "2019-08-24",
  • "realHours": 24,
  • "billableHours": 24
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

deleteEntry

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
entryId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

List submissions (view=mine|approvals|all)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
query Parameters
view
string
Default: "mine"
Enum: "mine" "approvals" "all"
page
integer >= 1
Default: 1
pageSize
integer [ 1 .. 100 ]
Default: 25

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Submit the caller's draft week (timesheet.submissions.submit)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
header Parameters
Idempotency-Key
string <= 200 characters
Request Body schema: application/json
required
weekStart
required
string <date>

Responses

Request samples

Content type
application/json
{
  • "weekStart": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

getSubmission

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
submissionId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Approve (assigned approver only, timesheet.submissions.approve)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
submissionId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Reject with a reason (assigned approver only, timesheet.submissions.approve)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
submissionId
required
string <uuid>
Request Body schema: application/json
required
reason
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}