curl --request GET \
--url https://api.example.com/v2/notifications/{id}/pdfcurl --request GET \
--url https://api.example.com/v2/notifications/{id}/pdfDownload the PDF for a letter notification. This endpoint is only available for letter notifications.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alphagov/notifications-api/llms.txt
Use this file to discover all available pages before exploring further.
Content-Type: application/pdf.
The PDF contains the fully rendered letter including:
curl -X GET https://api.notifications.service.gov.uk/v2/notifications/740e5834-3a29-46b4-9a6f-16142fde533a/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
--output letter.pdf
# Using curl
curl -X GET https://api.notifications.service.gov.uk/v2/notifications/740e5834-3a29-46b4-9a6f-16142fde533a/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-o letter.pdf
# Using wget
wget --header="Authorization: Bearer YOUR_API_KEY" \
https://api.notifications.service.gov.uk/v2/notifications/740e5834-3a29-46b4-9a6f-16142fde533a/pdf \
-O letter.pdf
{
"status_code": 400,
"errors": [
{
"error": "BadRequestError",
"message": "Notification is not a letter"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "PDFNotReadyError",
"message": "PDF not available yet, try again later"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "BadRequestError",
"message": "File did not pass the virus scan"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "BadRequestError",
"message": "PDF not available for letters in status technical-failure"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "ValidationError",
"message": "notification_id is not a valid UUID"
}
]
}
{
"status_code": 404,
"errors": [
{
"error": "NoResultFound",
"message": "No result found"
}
]
}
pending-virus-check status)PDFNotReadyError, wait a few seconds and try again.
accepted (created/sending)received (delivered)returned-letterpending-virus-check - Wait and retryvirus-scan-failed - Letter rejected, PDF not availablevalidation-failed - Letter rejected, PDF not availabletechnical-failure - Processing failed, PDF not available