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

# Get one timesheet

`GET https://{apiId}.execute-api.us-west-1.amazonaws.com/{stage}/v1/timesheets/{id}`

Module: Timesheets · operationId: `getTimesheet` · Auth: `Authorization: Bearer <token>`
Web page: https://apidocs.sequipay.com/#/api/get-timesheet

Returns a single timesheet by id, scoped to the authenticated company, with its time entries (line items, oldest work date first). Soft-deleted timesheets and soft-deleted entries are not returned. Compensation (`rate_cents`) is never included on an entry.

Requires the `timesheets:read` scope.

## Path parameters

- `id` (integer (int64), **required**): The timesheet's numeric id. Minimum: 1. Example: `42`.

## Example request

```bash
curl -X GET "https://{apiId}.execute-api.us-west-1.amazonaws.com/{stage}/v1/timesheets/42" \
  -H "Authorization: Bearer $SEQUIFI_TOKEN"
```

## Responses

### 200: The timesheet with its time entries.

- `status` (integer) Example: `200`.
- `message` (string) Example: `success`.
- `data` (object): A company timesheet for one employee over a pay period. Internal reviewer columns (reviewer id/note) are never returned. `time_entries` is present on the single-timesheet response only, not in the list.
  - `id` (integer (int64)) Example: `42`.
  - `employee_id` (integer (int64)) Example: `1024`.
  - `period_start` (string (date)) Example: `2024-01-01`.
  - `period_end` (string (date)) Example: `2024-01-14`.
  - `status` (string) Example: `submitted`.
  - `note` (string, nullable)
  - `submitted_at` (string (date-time), nullable) Example: `2024-01-15T12:00:00.000Z`.
  - `reviewed_at` (string (date-time), nullable)
  - `voided_at` (string (date-time), nullable)
  - `created_at` (string (date-time), nullable) Example: `2024-01-20T12:00:00.000Z`.
  - `updated_at` (string (date-time), nullable) Example: `2024-01-20T12:00:00.000Z`.
  - `time_entries` (array of object): Present only on GET /v1/timesheets/{id}.
    - `id` (integer (int64)) Example: `5001`.
    - `timesheet_id` (integer (int64)) Example: `42`.
    - `employee_id` (integer (int64)) Example: `1024`.
    - `work_date` (string (date)) Example: `2024-01-02`.
    - `started_at` (string (date-time), nullable) Example: `2024-01-02T16:00:00.000Z`.
    - `ended_at` (string (date-time), nullable) Example: `2024-01-02T20:00:00.000Z`.
    - `minutes` (integer) Example: `240`.
    - `break_minutes` (integer) Example: `0`.
    - `kind` (string) Example: `worked`.
    - `source` (string) Example: `manual`.
    - `job_ref` (string, nullable) Example: `J-1001`.
    - `job_label` (string, nullable) Example: `Install`.
    - `note` (string, nullable)
    - `created_at` (string (date-time), nullable) Example: `2024-01-20T12:00:00.000Z`.
    - `updated_at` (string (date-time), nullable) Example: `2024-01-20T12:00:00.000Z`.

### 400: The id is not a positive integer.

```json
{
  "status": 400,
  "message": "invalid timesheet id",
  "data": null
}
```

### 401: Missing, invalid, expired, or revoked token (from the authorizer).

### 403: The token lacks the required scope.

```json
{
  "error": "insufficient_scope",
  "required": "users:read"
}
```

### 404: No such timesheet for this company.

```json
{
  "status": 404,
  "message": "not found",
  "data": null
}
```

### 500: An infrastructure or data error. The endpoint fails closed — a 500, never a partial or empty-looking result.

```json
{
  "status": 500,
  "message": "internal error",
  "data": null
}
```
