Initiate an upload of a Contribution or Enrolment file. Returns a URL where the file should be sent. The employer the upload is for should be defined in the "EmployerId" column, or other known alias for non-PAPDIS files, with a value of "external_reference" from the employer record, returned on GET of an employer.
Responses
-
Successfully created the upload. The response contains the ID of the upload, that can be used in querying
/uploads/{upload_id}endpoints. -
Bad request, the request is malformed or contains invalid data.
-
Unauthorized, the request requires authentication, and the provided credentials are either missing or incorrect.
-
The employer was not found.
POST
/uploads
curl \
--request POST 'https://payroll-api.getpenfold.dev/v4/uploads' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"filename":"papdis.csv","purpose":"contribution"}'
Request examples
{
"filename": "papdis.csv",
"purpose": "contribution"
}
Response examples (200)
{
"id": "string",
"employer_id": "string",
"put_destination_url": "string",
"created_at": "2026-05-04T09:42:00Z",
"updated_at": "2026-05-04T09:42:00Z",
"processing_started": "2023-03-01T11:00:00Z",
"processing_ended": "2023-03-01T12:00:00Z",
"processing_time": 47,
"total_errors": 10,
"contributions_created": 5,
"contributions_unprocessed": 0,
"contributions_already_existed": 0,
"employer_contributions": "500.34",
"employee_contributions": "734.11",
"total_contributions": "1234.45",
"filename": "papdis.csv",
"status": "Processed"
}
Response examples (400)
{
"error": "Bad request: invalid data provided.",
"validation_errors": [
{
"field": "email",
"message": "Email address is invalid."
}
]
}
Response examples (401)
{
"error": "Bad request: invalid data provided."
}
Response examples (404)
{
"error": "Bad request: invalid data provided."
}