List timesheets

View as markdown
GET /timesheets

Manage your timesheets.

Query parameters

  • type string

    The timesheet type to filter timesheets by.

    Values are company or project.

  • status array[string]

    One or more statuses to filter the timesheets by.

    Values are draft, submitted, approved, or rejected.

  • person array[string]

    Filter by one or more people. This is the org's people[].person._id value

  • project array[string]

    Filter project timesheets by one or more projects. This is the project._id value.

  • planItem array[string]

    Filter project timesheets by one or more plan items. This is the planItem._id value.

  • weekStart string

    A date query to filter the results by the weekStart value. Format is weekStart=<operator> <date>, e.g. weekStart=gt 2025-02-24T00:00:00.000Z. Acceptable operations are lt = lower than, lte = lower than or equal, gt = greater than, gte = greater than or equal, eq = equal. The date is in ISOString.

  • weekEnd string

    A date query to filter the results by the weekEnd value. Format is weekEnd=<operator> <date>, e.g. weekEnd=gt 2025-02-24T00:00:00.000Z. Acceptable operations are lt = lower than, lte = lower than or equal, gt = greater than, gte = greater than or equal, eq = equal. The date is in ISOString.

  • department array[string]

    Filter project timesheets by one or more project departments. This is the org.departments[]._id value that is assigned to the timesheet's plan item project departments[] array.

  • office array[string]

    Filter project timesheets by one or more project offices. This is the org.offices[]._id value that is assigned to the timesheet's plan item project offices[] array.

  • role array[string]

    Filter project timesheets by one or more plan item roles. This is the org.roles[]._id value that is assigned to the timesheet's plan item role field.

  • id array[string]

    One or more IDs to filter the response by. Compares against the document's _id value.

  • archived boolean | number

    If true, only archived documents will be returned. Defaults to false. If you need both archived and non-archived, use withArchived instead.

    Values are false, true, 0, or 1.

  • withArchived boolean | number

    If true, both archived and non-archived documents will be returned. Defaults to false.

    Values are false, true, 0, or 1.

  • updatedAt string

    A date query to filter the results by the last updatedAt value. Format is updatedAt=<operator> <date>, e.g. updatedAt=gt 2025-02-24T00:00:00.000Z. Acceptable operations are lt = lower than, lte = lower than or equal, gt = greater than, gte = greater than or equal, eq = equal. The date is in ISOString.

  • select array[string]

    One or more properties to be included in the response, instead of the full payload. E.g. select=endDate,projectStatus. You can also exclude fields by prefixing with a minus sign, e.g. select=-endDate,-projectStatus, but you cannot mix both.

  • sortBy string

    Optionally, the field to sort the results by. By default, results are sorted by created date. Only updatedAt is supported at this moment (Note: updatedAt equals to createdAt for documents that have never been updated).

    Value is updatedAt.

  • sortDirection string

    Optionally, the direction to sort the documents by. For ascending (oldest first) use either 1 or asc. By default sorting is descending (latest first), -1 or desc.

    Values are 1, asc, -1, or desc.

  • limit integer

    Optionally, change the default document response limit of 40.

    Minimum value is 1, maximum value is 100. Default value is 40.

  • count boolean | number

    Includes a count property in the response, which holds the total number of results matching the query. The value does not change between pages and represents the accurate, total number of results to be expected.

    Note: The use of this parameter will have a performance impact on the first paginated request.

    Values are false, true, 0, or 1.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • value array[object]
      One of:
    • count number

      The total count of results for the specific request. It's included in the response only when the count boolean query parameter is provided and truthy, e.g. ?count=1. The value is being calculated only during the first request and then repeated on the subsequent paginated responses.

GET /timesheets
curl \
 --request GET 'https://open.api.missionx.ai/v2/timesheets' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "value": [
    {
      "_id": "string",
      "createdBy": "string",
      "createdAt": "2025-05-04T09:42:00Z",
      "updatedAt": "2025-05-04T09:42:00Z",
      "type": "company",
      "status": "draft",
      "customId": "string",
      "weekOfDate": "string",
      "weekStart": "string",
      "weekEnd": "string",
      "person": "string",
      "entries": [
        {
          "description": "string",
          "hours": [
            {
              "day": "MON",
              "value": 42.0
            }
          ],
          "codeId": "string"
        }
      ]
    }
  ],
  "nextLink": "string",
  "count": 42.0
}