GET /employers/{employerId}/uploads/{uploadId}/enrolments

Get the enrolments created for an upload, in the form of employee records.

Path parameters

  • employerId string(uuid) Required

    Penfold employer UUID

  • uploadId string Required

    Unique identifier for the upload

Query parameters

  • pageSize integer

    The maximum number of records to return per page.

    Minimum value is 100, maximum value is 500. Default value is 200.

  • pageNumber integer

    The page number to return.

    Minimum value is 1. Default value is 1.

Responses

  • 200 application/json

    Retrieved the upload enrolments successfully.

    Hide response attributes Show response attributes object
    • pageNumber integer Required

      The current page number.

    • pageSize integer Required

      The number of items per page.

    • totalItems integer Required

      The total number of items available.

    • items array[object] Required

      An array of Employee objects on the current page.

      Hide items attributes Show items attributes object
      • id string Required

        Unique identifier for the employee.

      • email string(email) Required

        Email address of the employee.

      • forename string Required

        The employee's first name.

      • surname string Required

        The employee's last name.

      • title string Required

        The employee's title, e.g., Mr., Mrs., Dr., etc.

      • dateOfBirth string(date) Required

        The employee's date of birth, in YYYY-MM-DD format.

      • addressLine1 string

        The first line of the employee's address.

      • postcode string

        The postal code of the employee's address.

      • nationalInsuranceNumber string Required

        The employee's National Insurance number.

      • employmentStartDate string(date) Required

        The date the employee started their employment, in YYYY-MM-DD format.

      • status string Required

        The employee's current status on the Penfold platform:

        • Enrolled: Employee has been enrolled but has not yet activated their Penfold account
        • Active: Employee has activated their Penfold account
        • OptedOut: Employee opted out of the pension scheme
        • Left: Employee has left employment

        Values are Enrolled, Active, OptedOut, or Left.

      • exitDate string(date) | null

        The date the employee's employment ended, in YYYY-MM-DD format (if applicable).

      • optOutDate string(date) | null

        The date the employee opted out of the pension scheme, in YYYY-MM-DD format (if applicable).

      • optInDate string(date) | null

        The date the employee opted into the pension scheme, in YYYY-MM-DD format (if applicable).

      • optOutWindowStartDate string(date) | null

        The date the employee's opt out window begins.

      • optOutWindowEndDate string(date) | null

        The date the employee's opt out window ends.

      • createdAt string(date-time) Required

        The date and time the employee record was created, in ISO 8601 format.

      • updatedAt string(date-time) Required

        The date and time the employee record was last updated, in ISO 8601 format.

  • 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}/uploads/{uploadId}/enrolments
curl \
 --request GET 'https://partner-api.getpenfold.com/v1/employers/{employerId}/uploads/{uploadId}/enrolments' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "pageNumber": 1,
  "pageSize": 200,
  "totalItems": 1,
  "items": [
    {
      "id": "e1234-abcd-5678-efgh",
      "email": "john.doe@example.com",
      "forename": "John",
      "surname": "Doe",
      "title": "Mr.",
      "dateOfBirth": "1990-01-01",
      "addressLine1": "123 Main Street",
      "postcode": "AB12 3CD",
      "nationalInsuranceNumber": "AA123456C",
      "employmentStartDate": "2023-01-01",
      "status": "Active",
      "exitDate": "2026-05-04",
      "optOutDate": "2026-05-04",
      "optInDate": "2026-05-04",
      "optOutWindowStartDate": "2023-01-01",
      "optOutWindowEndDate": "2023-01-31",
      "createdAt": "2023-03-01T12:00:00Z",
      "updatedAt": "2023-03-15T12:00:00Z"
    }
  ]
}
Response examples (401)
{
  "error": "unauthorized"
}
Response examples (404)
{
  "error": "not found"
}
Response examples (500)
{
  "error": "internal server error"
}