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

# Get one worker document

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

Module: Documents · operationId: `getDocument` · Auth: `Authorization: Bearer <token>`
Web page: https://apidocs.sequipay.com/#/api/get-document

Returns a single worker-document record by id, scoped to the authenticated company. Returns metadata only (never the file, election detail, or signer IP). Soft-deleted documents are not returned.

Requires the `documents:read` scope.

## Path parameters

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

## Example request

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

## Responses

### 200: The worker document.

- `status` (integer) Example: `200`.
- `message` (string) Example: `success`.
- `data` (object): A worker-document record (metadata). Sensitive columns Core holds on this table (`elections`, `ip_address`) and the document files themselves are never returned; owner KYC identity documents are never exposed by this endpoint.
  - `id` (integer (int64)) Example: `1`.
  - `employee_id` (integer (int64)) Example: `1024`.
  - `document_type` (string) Example: `w4`.
  - `document_version` (string) Example: `2024`.
  - `signer_name` (string, nullable) Example: `Jane Doe`.
  - `completed` (boolean) Example: `true`.
  - `completed_at` (string (date-time), nullable) Example: `2024-01-20T12:00:00.000Z`.
  - `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 document 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 document 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
}
```
