# Get Document PDF by Token Returns the PDF URL of the document identified by its public token, or indicates that PDF generation is in progress (poll again). Public endpoint — no API key needed; the document token itself grants access. Works for any document type. Endpoint: GET /api/v3/documents/{token}/pdf Version: 3.1.0 Security: ## Path parameters: - `token` (string, required) The unique identifier (token) of the document. Example: "abc123token" ## Query parameters: - `attachment` (boolean) When true, the returned URL serves the PDF as a download instead of inline display. Ignored by the legacy PDF service. ## Response 200 fields (application/json): - `pdf` (object) - `pdf.url` (string) Example: "https://s3.amazonaws.com/bucket/document.pdf" ## Response 202 fields (application/json): - `pdf` (object) - `pdf.message` (string) Example: "PDF file is being generated" ## Response 404 fields (application/json): - `errors` (array) Example: [{"error":"Resource not found"}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) Lista de erros retornada quando a geração do PDF falha. Example: [{"error":"There was an error generating PDF file"}] - `errors.error` (string) ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string)