GET /employers/{employerId}/employees/{employeeId}/contributions

Retrieve the contributions for a specified employee.

Path parameters

  • employerId string(uuid) Required

    Penfold employer UUID

  • employeeId string Required

    Unique identifier for the employee

Query parameters

  • pageSize integer

    The maximum number of contributions 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.

  • sortBy string

    Sort contributions by date field.

    Values are payPeriodStartDate, payPeriodEndDate, or createdAt. Default value is createdAt.

  • sortOrder string

    Sort order (ascending or descending).

    Values are asc or desc. Default value is desc.

Responses

  • 200 application/json

    A paginated list of contributions for the specified employee.

    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 Contribution objects on the current page.

      Hide items attributes Show items attributes object
      • id string Required

        Unique identifier for the contribution record.

      • uploadId string

        ID of the file upload from which the contribution was created (if applicable).

      • employeeId string Required

        Identifier for the employee associated with the contribution.

      • employerContributionsAmount number Required

        The amount of the employer's contribution for the given pay period.

      • employeeContributionsAmount number Required

        The amount of the employee's contribution for the given pay period.

      • createdAt string(date-time) Required

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

      • payPeriodStartDate string(date) Required

        The start date of the pay period for which the contributions were made, in YYYY-MM-DD format.

      • payPeriodEndDate string(date) Required

        The end date of the pay period for which the contributions were made, in YYYY-MM-DD format.

      • status string Required

        The status of the contribution. Possible values are: - Cancelled: The contribution has been cancelled. - NotSubmitted: The contribution has not been submitted. - Deleted: The contribution has been deleted. - Pending: The contribution is currently being processed. - Completed: The contribution has been successfully processed.

        Values are Cancelled, NotSubmitted, Deleted, Pending, or Completed.

  • 400 application/json

    Request body failed validation

    Hide response attributes Show response attributes object
    • error string Required

      A descriptive error message.

    • validationErrors array[object]
      Hide validationErrors attributes Show validationErrors attributes object
      • field string Required

        The name of the field that failed validation.

      • message string Required

        A descriptive error message.

  • 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}/contributions
curl \
 --request GET 'https://partner-api.getpenfold.com/v1/employers/{employerId}/employees/{employeeId}/contributions' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "pageNumber": 1,
  "pageSize": 200,
  "totalItems": 1,
  "items": [
    {
      "id": "c1234-abcd-5678-efgh",
      "uploadId": "string",
      "employeeId": "e9876-wxyz-4321-stuv",
      "employerContributionsAmount": 1000.0,
      "employeeContributionsAmount": 250.0,
      "createdAt": "2023-03-22T12:00:00Z",
      "payPeriodStartDate": "2023-03-01",
      "payPeriodEndDate": "2023-03-15",
      "status": "Pending"
    }
  ]
}
Response examples (400)
{
  "error": "validation failed",
  "validationErrors": [
    {
      "field": "companyNumber",
      "message": "companyNumber is required"
    },
    {
      "field": "primaryContactEmail",
      "message": "must be a valid email address"
    }
  ]
}
Response examples (401)
{
  "error": "unauthorized"
}
Response examples (404)
{
  "error": "not found"
}
Response examples (500)
{
  "error": "internal server error"
}