API Documentation

API Endpoint

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.”

Timesheet diagram

Supported filter params

  • date

  • person_id (array)

  • creator_id (array)

Supported sort params

  • id

  • date

  • person_id

GET /api/v2/timesheets
Requestsreturns timesheets

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
Responses200
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 timesheets
GET/api/v2/timesheets


GET /api/v2/timesheets/1
Requestsreturns timesheet

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
Responses200
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": {}
}

Gets a timesheet
GET/api/v2/timesheets/{id}

URI Parameters
HideShow
id
number (required) Example: 1

timesheet id


POST /api/v2/timesheets
Requestscreates timesheet when params valid and feature accessiblereturns errors when date not sent

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"
        }
      }
    }
  }
}
Responses201
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"
        }
      }
    }
  }
}
Responses422
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 timesheet
POST/api/v2/timesheets

URI Parameters
HideShow
date
date (required) Example: 2024-01-01

date

person_id
number (required) Example: 1

person id


DELETE /api/v2/timesheets/1
Requestsdestroyes timesheet

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
Responses204
This response has no content.

Deletes a timesheet
DELETE/api/v2/timesheets/{id}

URI Parameters
HideShow
id
number (required) Example: 1

timesheet id


Generated by aglio on 20 Jul 2025