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.
With an organisation-scoped token, the employer’s AML verification and Direct Debit mandate are checked once
the file is processed. If the employer has not passed AML, or pays by Direct Debit and has no chargeable mandate,
the upload is blocked and GET /uploads/{upload_id}/errors returns a File scoped error with the code
EmployerAmlPending, EmployerAmlFailed, EmployerMandateMissing or EmployerMandateInactive.
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.
-
Conflict — a
Contributionsupload cannot be initiated with an employer-scoped token because the employer’s AML verification has not been accepted, or because the employer pays by Direct Debit and has no chargeable mandate. No upload is created. Retry once the employer’saml_verification_statusisAcceptedand the employer has set up a Direct Debit. Enrolment uploads are not affected.
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"
}'
{
"filename": "papdis.csv",
"purpose": "Contribution"
}
{
"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"
}
{
"error": "Bad request: invalid data provided.",
"validation_errors": [
{
"field": "email",
"message": "Email address is invalid."
}
]
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"code": "EmployerAmlPending",
"error": "contributions cannot be submitted until the employer's AML verification is accepted",
"aml_verification_status": "Pending"
}
{
"code": "EmployerAmlFailed",
"error": "contributions cannot be submitted because the employer's AML verification has failed",
"aml_verification_status": "Failed"
}
{
"code": "EmployerMandateMissing",
"error": "contributions cannot be submitted until the employer sets up a Direct Debit in the Penfold workplace platform",
"mandate_status": null
}
{
"code": "EmployerMandateInactive",
"error": "contributions cannot be submitted because the employer's Direct Debit mandate is invalid or has been cancelled. The employer must set up a new Direct Debit in the Penfold workplace platform",
"mandate_status": "Cancelled"
}