PSOhub API - Timesheets
Learn how to find timesheets and create them in PSOhub
With this endpoint, you can find timesheets that are related to a project and/or user and it will allow you to create timesheets on a project.
Let's get started with seeing how you can retrieve timesheets for a project and/or users
Get all timesheets (filtered)
To get all timesheets, you can use the following endpoint
GET https://www.psohubapp.com/rest/psohubapi/v1/timesheets?projectid=693467340
You can use the limit parameter to determine the number of records to return. If you don't send this, we will send back 50 timesheets.
IMPORTANT: Because the timesheets are always connected to a project and a user, it is required to filter on at least 1 of 2 parameters. Please see the mapping table below to understand which can be used.
If successful, the response will be this:
[
{
"DateTimeFrom": "2024-08-14T08:00:00.000Z",
"DateTimeTo": "2024-08-14T12:00:00.000Z",
"NumberOfHours": 4,
"AccountID": 39406496739494241,
"ProjectID": 13229323915858894,
"ContractLineID": 7036874429341080,
"RoleID": 9851624184876568,
"AccountName": "Martijn vd Hoeden",
"ProjectName": "Advice Hours Vd Hoeden",
"ContractLineName": "10.002 - Tax Services",
"RoleName": "Project Manager",
"Description": "vpb meeting",
"InvoiceNumber": "INV-2025-03",
"ExternalInvoiceNumber": "231",
"TaskID": "232362356236231",
"CreationDateTime": "2024-08-14T08:00:00.000Z"
},
{
"DateTimeFrom": "2024-08-13T08:00:00.000Z",
"DateTimeTo": "2024-08-13T12:00:00.000Z",
"NumberOfHours": 4,
"AccountID": 39406496739494241,
"ProjectID": 13229323915858894,
"ContractLineID": 7036874429341080,
"RoleID": 9851624184876568,
"AccountName": "Martijn vd Hoeden",
"ProjectName": "Advice Hours Vd Hoeden",
"ContractLineName": "10.002 - Tax Services",
"RoleName": "Project Manager",
"Description": "vpb done",
"InvoiceNumber": "INV-2025-03",
"ExternalInvoiceNumber": "231"
}]
The following fields will be returned to you
Name |
Type |
Description |
DateTimeFrom |
DateTime |
Start date and time of the booking |
DateTimeTo |
DateTime |
End date and time of the booking |
NumberOfHours |
Decimal |
the email of the contact |
AccountID |
Integer/long |
the PSOHub ID of the company |
ProjectID |
Integer/long |
The ID of the project |
ContractLineID |
Integer/long |
The ID of the contract line |
RoleID |
Integer/long |
The ID of the project role for the user |
AccountName |
String |
The name of the user that booked the hours |
ProjectName |
String |
The name of the project, for easy reference |
ContractLineName |
String |
The name of the contract line, for easy reference |
RoleName |
String |
The name of the project role, for easy reference |
Description |
String |
The description the user added for the booking |
InvoiceNumber |
String |
The invoice number of PSOhub. Draft invoices will always return Draft as number |
ExternalInvoiceNumber |
String |
External number that came from a financial integraton. Only appears when connected to a financial integration or if updated via API first |
TaskID |
Integer/Long |
The associated TaskID if hours are booked on a task |
CreationDateTime |
Date/Time |
Created datetime stamp of the timesheet |
Create a timesheet
Creating a timesheet in PSOhub requires several mandatory fields to be filled to make sure the timesheet ends up in the correct place. Please see the table below for the fields and how to retrieve them in PSOhub.
Name |
Required |
Type |
Description |
DateTimeFrom |
Yes |
DateTime |
Start date and time of the booking |
DateTimeTo |
Yes |
DateTime |
End date and time of the booking |
NumberOfHours |
Yes |
Decimal |
Total number of hours booked |
AccountID |
Yes |
Integer/long |
the PSOHub ID of the company |
ProjectID |
Yes |
Integer/long |
The ID of the project |
ContractLineID |
Yes |
Integer/long |
The ID of the contract line |
RoleID |
Yes |
Integer/long |
The ID of the project role for the user |
Description |
No |
String |
The description the user added for the booking |
POST https://www.psohubapp.com/rest/psohubapi/v1/timesheets
An example of this is
{
"DateTimeFrom": "2024-09-23T08:00:00.000Z",
"DateTimeTo": "2024-09-23T16:00:00.000Z",
"NumberOfHours": 8,
"AccountID": 39406496739494241,
"ProjectID": 13229323915858894,
"ContractLineID": 7036874429341080,
"RoleID": 9851624184876568,
"Description": "Booked via API"
}
If created successfully, you will get a response like below
{"TimesheetID":"ef2e44e2-9126-4012-9e02-25c1eb12e98d"}