Initiate an upload of a Contribution or Enrolment file. Returns a pre-signed URL where the file should be sent via PUT request. We recommend using the AWS S3 client SDK to perform the upload.
POST
/employers/{employerId}/uploads
curl \
--request POST 'https://partner-api.getpenfold.com/v1/employers/{employerId}/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",
"employerId": "string",
"putDestinationUrl": "string",
"createdAt": "2026-05-04T09:42:00Z",
"updatedAt": "2026-05-04T09:42:00Z",
"processingStarted": "2023-03-01T11:00:00Z",
"processingEnded": "2023-03-01T12:00:00Z",
"processingTime": 47,
"totalErrors": 10,
"contributionsCreated": 5,
"contributionsUnprocessed": 0,
"contributionsAlreadyExisted": 0,
"employerContributions": 500.34,
"employeeContributions": 734.11,
"totalContributions": 1234.45,
"filename": "papdis.csv",
"status": "Processed"
}
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"
}