<!-- Generated by scripts/build-docs.js. Edit docs/swagger.yaml or docs/guides/, then run `npm run docs:build`. -->

# Get a user's current timesheet

`GET https://marketplace-api.sequifi.com/v1/timesheet/{id}`

Module: Timesheet · operationId: `getUserTimesheet` · Auth: `Authorization: Bearer <token>`
Web page: https://apidocs.sequifi.com/#/api/get-user-timesheet

Returns the current pay period's day-by-day time records for one user. The path `id` is a user id, not a timesheet id. This is the same as GET /v1/timesheet with `pay_period=current`.

**What happens:**

- The response has the same shape as GET /v1/timesheet. See that endpoint for the four shapes a `day` can take.
- The current period is the one containing today's date in UTC.
- Deleted records are included: skip any day or event whose `deleted_at` is set.
- An unknown user id returns `200` with `pay_frequency: null` and an empty `timesheets` array.

**Errors:**

- `400 Cannot use query parameters when fetching a single user by id`: remove the query string. Use GET /v1/timesheet for the previous period.
- `400 Position pay frequency not found`: the user's position has no pay frequency, or it is Daily, which timesheets do not support.
- `400 Pay period not found`: no pay period covers today.

**Related:**

- GET /v1/timesheet reads the current or previous period.
- POST /v1/timesheet records time.

## Path parameters

- `id` (integer, **required**): User id (not a timesheet id). Minimum: 1. Example: `4821`.

## Example request

```bash
curl -X GET "https://marketplace-api.sequifi.com/v1/timesheet/4821" \
  -H "Authorization: Bearer $SEQUIFI_TOKEN"
```

## Responses

### 200: The user's current-period timesheet

- `status` (integer): The HTTP status code, repeated. Example: `200`.
- `message` (string): Short text. Wording varies by endpoint; branch on the HTTP status, not on this text. Example: `success`.
- `data` (object)
  - `requested_by` (string): Label of the API credential that made the call.
  - `pay_frequency` (object, nullable): The pay period shown, or null when the user does not exist. Other fields of the period may be present.
    - `id` (integer): Pay period id.
    - `pay_period_from` (string): Start of the period, `YYYY-MM-DD HH:MM:SS`.
    - `pay_period_to` (string): End of the period, `YYYY-MM-DD HH:MM:SS`.
  - `timesheets` (array of object): One entry per calendar day of the period, oldest first. See GET /v1/timesheet for the shapes of `day`.
    - `day` (object | string): An object for a day with records, an absence or an adjustment, or a plain `YYYY-MM-DD` string when nothing applies.

```json
{
  "status": 200,
  "message": "success",
  "data": {
    "requested_by": "acme",
    "pay_frequency": {
      "id": 412,
      "pay_period_from": "2026-10-05 00:00:00",
      "pay_period_to": "2026-10-11 00:00:00"
    },
    "timesheets": [
      {
        "day": {
          "date": "2026-10-05",
          "user_attendance_list": {
            "attendance_type": "absent",
            "attendance_time": "08:00:00"
          }
        }
      },
      {
        "day": {
          "id": 90812,
          "user_id": 4821,
          "current_time": "04:00:00",
          "lunch_time": "00:00:00",
          "break_time": "00:00:00",
          "is_synced": 1,
          "date": "2026-10-06 00:00:00",
          "status": 1,
          "deleted_at": null,
          "user_attendance_list": [
            {
              "id": 551203,
              "type": "clock in",
              "attendance_type": "present",
              "attendance_date": "2026-10-06 08:00:00",
              "attendance_time": "04:00:00",
              "entry_type": "Marketplace-API",
              "external_reference_id": "fieldtool:entry:10482",
              "job_id": "1042",
              "job_name": "Unit turn clean",
              "labor_rate": "20.000",
              "earnings": "80.000",
              "office_id": 0,
              "deleted_at": null
            },
            {
              "id": 551204,
              "type": "clock out",
              "attendance_type": "clock out",
              "attendance_date": "2026-10-06 12:00:00",
              "attendance_time": null,
              "entry_type": "Marketplace-API",
              "external_reference_id": "fieldtool:entry:10482",
              "job_id": "1042",
              "job_name": "Unit turn clean",
              "labor_rate": null,
              "earnings": null,
              "office_id": 0,
              "deleted_at": null
            }
          ]
        }
      },
      {
        "day": "2026-10-07"
      }
    ]
  }
}
```

### 400: Query parameters sent with the id, or the user's pay period cannot be found

Example (query_params_not_allowed): Query parameters sent with the id

```json
{
  "status": 400,
  "message": "Cannot use query parameters when fetching a single user by id",
  "data": {}
}
```

### 401: Missing, invalid or expired token. The gateway rejects the call before it reaches Sequifi, so the body has only a `message`.

```json
{
  "message": "Unauthorized"
}
```

### 500: Internal server error

```json
{
  "status": 500,
  "message": "Internal Server Error",
  "data": {}
}
```
