Retrieve a list of contributions for a specified employer.
Optionally filter by pay_period_ids to return only the contributions
belonging to one or more pay periods (OR match). This is the recommended
way to reconcile a period: read the period ids from
GET /employers/{employer_id}/pay_periods, then request just those
periods' contributions rather than paging the employer's full history.
Contributions are returned for the employer that ran the pay period they belong to. Employees who have since left are therefore still included, so a historic period reconciles to the same totals after a leaver has gone.
Query parameters
-
The maximum number of contributions to return per page.
Minimum value is
1, maximum value is500. Default value is200. -
The page number to return in the list of contributions.
Minimum value is
1. Default value is1. -
Optional filter. When provided, only contributions belonging to at least one of these pay periods are returned. Pass as a single comma-separated value (
pay_period_ids=id1,id2). Do not repeat the query key. Plain commas between ids are fine; percent-encoding is not required for Penfold pay period ids. Maximum 100 ids (enforced by the API). Unknown ids, and ids belonging to another employer, simply contribute no matches (they do not cause a 404).Minimum length is
1. -
Sort Contributions by date
Values are
pay_period_start_date,pay_period_end_date, orcreated_at. Default value iscreated_at. -
Sort order (ascending or descending). Case-insensitive;
ascanddescare accepted.Default value is
desc.
Responses
-
A paginated list of contributions for the specified employer.
-
Bad request, the request is malformed or contains invalid data.
-
Unauthorized, the request requires authentication, and the provided credentials are either missing or incorrect.
-
Employer not found, the specified employer_id does not match any existing employer.
curl \
--request GET 'https://payroll-api.getpenfold.dev/v4/employers/{employer_id}/contributions' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"page_number": 1,
"page_size": 200,
"total_items": 1,
"items": [
{
"id": "c1234-abcd-5678-efgh",
"upload_id": "string",
"pay_period_id": "clxyz123payperiod",
"employee_id": "e9876-wxyz-4321-stuv",
"employer_contributions_amount": 1000.0,
"employee_contributions_amount": 250.0,
"employer_contributions_percent": 10,
"employee_contributions_percent": 20,
"created_at": "2023-03-22T12:00:00Z",
"pay_period_start_date": "2023-03-01",
"pay_period_end_date": "2023-03-15",
"status": "Pending"
}
]
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}