# requestAssessmentPdf

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

## Operation

| Method | URL |
|---|---|
| POST | https://staging-api.thomas.co/v1/assessments/profile/{individualId}/pdf |

| Field | Value |
|---|---|
| operationId | requestAssessmentPdf |
| method | POST |
| server | https://staging-api.thomas.co/v1 |
| path | /assessments/profile/{individualId}/pdf |
| tags | `Reports` |
| summary | Request PDF generation for a behaviour profile |
| badges | None |

## Request Parameters

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

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/PdfDownloadRequestDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 202 | PDF generation job enqueued | #/components/schemas/PdfDownloadResponseDto |
| 400 | Invalid request payload | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Cannot generate PDF for another user's profile | #/components/schemas/ApiErrorResponseDto |
| 404 | No behaviour profile found (neutral 404) | #/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 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 403 example

```json
{
  "statusCode": 403,
  "message": "Cannot generate PDF for another user's profile",
  "error": "ASSESSMENT_FORBIDDEN"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "No behaviour profile found",
  "error": "ASSESSMENT_PROFILE_NOT_FOUND"
}
```

### Response 429 example

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