GET
/
timesheets
cURL
curl --request GET \
  --url https://api.buildpass.global/timesheets \
  --header 'Authorization: Bearer <token>' \
  --header 'X-BuildPass-Api-Version: <x-buildpass-api-version>' \
  --header 'X-BuildPass-Builder-Id: <x-buildpass-builder-id>'
{
  "data": [
    {
      "id": "ts_clgbsb90b001qjy0f0eo1hspp",
      "status": "WAITING_REVIEW",
      "createdAt": "2023-10-03T23:19:35.771Z",
      "updatedAt": "2023-10-03T23:19:35.771Z",
      "date": "2023-10-03T23:19:35.771Z",
      "hours": 10,
      "notes": "This is a note",
      "timeType": "Annual Leave",
      "costCode": "001 - Foundation",
      "timesheetGroupId": "tsg_clgbsb90b001qjy0f0eo1hspp",
      "profile": {
        "id": "pers_clgbsb90b001qjy0f0eo1hspp",
        "fullName": "John Doe",
        "type": "worker"
      },
      "project": {
        "id": "project_clgbsb90b001qjy0f0eo1hspp",
        "name": "Project 1"
      }
    }
  ],
  "meta": {
    "totalCount": 100,
    "totalPages": 4,
    "offset": 0,
    "limit": 25
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-BuildPass-Builder-Id
string
required

Call the /builders endpoint to get a builder ID

Example:

"buil_clgbsb90b001qjy0f0eo1hspp"

X-BuildPass-Api-Version
enum<string>
default:v1
required

What API version to use.

Available options:
v1
Example:

"v1"

Query Parameters

projectId
string

Filter timesheets by project

Example:

"proj_clgbsb91b001qjy0f0eo1hscp"

status
enum<string>

Filter timesheets by status

Available options:
APPROVED_1,
APPROVED_2,
REJECTED,
WAITING_REVIEW
Example:

"WAITING_REVIEW"

startDate
string

Filter by date range start (ISO format)

Example:

"2023-10-03T23:19:35.771Z"

endDate
string

Filter by date range end (ISO format)

Example:

"2024-10-03T23:19:35.771Z"

offset
integer
default:0

The number of items to skip before starting to collect the result set

Example:

0

limit
integer
default:25

The number of items to return

Example:

25

Response

200
application/json

A list of timesheets

The response is of type object.