# openTermsDocument

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| GET | https://api.thomas.co/v1/terms-documents/{version}/document |

| Field | Value |
|---|---|
| operationId | openTermsDocument |
| method | GET |
| server | https://api.thomas.co |
| path | /v1/terms-documents/{version}/document |
| tags | `Legal Documents` |
| summary | Open an archived terms/privacy document by version (public, human-facing) |
| badges | None |
| scopes | None |

## Description

Serves the archived document file (the exact PDF that was published under this version) from the archive, with a strong ETag equal to its sha256; `If-None-Match` on it answers 304. A version archived without a file redirects to its source URL when it has one, and otherwise returns its stored text as `text/plain`. This is the target of the Privacy & Terms "View" link — use `GET /v1/terms-documents/{version}` for the machine-readable envelope.

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| version | path | true | string |  |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | The archived document file (`application/pdf`), or the stored document text (`text/plain`) for a version archived without a file |  |
| 302 | Archived without a file but with a source URL: redirects to that URL |  |
| 304 | ETag matched If-None-Match |  |
| 404 | No terms document exists for the given version | #/components/schemas/ApiErrorResponseDto |
| 429 | Rate limit exceeded. | #/components/schemas/ApiErrorResponseDto |

### Response 429 headers

| Name | Description | Schema |
|---|---|---|
| Retry-After | Seconds until the rate-limit block expires before retrying. | {"type":"integer","minimum":0} |
| RateLimit-Limit | Configured request limit for the active rate-limit window. | {"type":"integer"} |
| RateLimit-Remaining | Requests remaining in the active rate-limit window; zero when blocked. | {"type":"integer"} |
| RateLimit-Reset | Seconds until the rate-limit block expires. | {"type":"integer","minimum":0} |

## Artifact Examples

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Terms document not found",
  "error": "TERMS_DOCUMENT_NOT_FOUND"
}
```

### Response 429 example

```json
{
  "statusCode": 429,
  "message": "ThrottlerException: Too Many Requests",
  "error": "HTTP_TOO_MANY_REQUESTS"
}
```
