GET /employers/{employerId}/employees/{employeeId}/documents/{documentId}/download

Returns a pre-signed URL for downloading the document PDF. The URL is valid for 5 minutes.

The response body is a plain text URL. Redirect the user or make a GET request to the returned URL to download the PDF.

Path parameters

  • employerId string(uuid) Required

    Penfold employer UUID

  • employeeId string Required

    Unique identifier for the employee

  • documentId string Required

    Unique identifier for the document

Responses

  • 200 text/plain

    Pre-signed S3 URL for the document PDF (valid for 5 minutes).

  • 401 application/json

    Missing or invalid authentication token

    Hide response attribute Show response attribute object
    • error string Required
  • 404 application/json

    Resource not found

    Hide response attribute Show response attribute object
    • error string Required
  • 500 application/json

    Internal server error

    Hide response attribute Show response attribute object
    • error string Required
GET /employers/{employerId}/employees/{employeeId}/documents/{documentId}/download
curl \
 --request GET 'https://partner-api.getpenfold.com/v1/employers/{employerId}/employees/{employeeId}/documents/{documentId}/download' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
https://s3.eu-west-1.amazonaws.com/penfold-client-comms/...
Response examples (401)
{
  "error": "unauthorized"
}
Response examples (404)
{
  "error": "not found"
}
Response examples (500)
{
  "error": "internal server error"
}