API Documentation
Timesheets ¶
Timesheets ¶
A timesheet is an object that captures the submission of time entries for approval, linking all submitted time entries for a single day.
A timesheet must be unique to each person and date, meaning a submission for a specific day can only occur once.
Timesheets can only be created or deleted; they cannot be updated.
A timesheet can only be deleted if none of its associated time entries have been approved.
When a timesheet is created, all time entries belonging to the person on the timesheet that match the timesheets date will automatically associate with the new timesheet and be assigned the status “submitted.”
Supported filter params
-
date
-
person_id (array)
-
creator_id (array)
Supported sort params
-
id
-
date
-
person_id
GET /api/v2/timesheets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "1",
"type": "timesheets",
"attributes": {
"date": "2025-07-20",
"created_at": "2025-07-20T06:16:46.321+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2296"
}
},
"person": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/timesheets?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/timesheets?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get timesheetsGET/api/v2/timesheets
GET /api/v2/timesheets/2
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "2",
"type": "timesheets",
"attributes": {
"date": "2025-07-20",
"created_at": "2025-07-20T06:16:46.391+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2297"
}
},
"person": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/timesheets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "timesheets",
"attributes": {
"date": "2024-01-01"
},
"relationships": {
"person": {
"data": {
"type": "people",
"id": "9102"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "3",
"type": "timesheets",
"attributes": {
"date": "2024-01-01",
"created_at": "2025-07-20T06:16:46.454+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2298"
}
},
"person": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/timesheets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "timesheets",
"attributes": {
"date": null
},
"relationships": {
"person": {
"data": {
"type": "people",
"id": "9103"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/date"
}
}
]
}
Create a timesheetPOST/api/v2/timesheets
- date
date
(required) Example: 2024-01-01date
- person_id
number
(required) Example: 1person id
DELETE /api/v2/timesheets/4
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Deletes a timesheetDELETE/api/v2/timesheets/{id}
- id
number
(required) Example: 1timesheet id
Generated by aglio on 20 Jul 2025