Partner organisations only. A Payroll organisation calling this
endpoint receives 405 Method Not Allowed.
Creates a new employer under your organisation.
The company number is validated against Companies House. If an employer with the same company number already exists in your organisation, a 409 is returned with the existing employer's external_reference.
The external_id is your platform's identifier for the employer. Penfold stores it to link the employer back to your platform. If the external_id is already linked to an employer, a 409 is returned and no employer is created.
Body
Required
-
Companies House registration number
-
Registered company name
-
Email address of the primary contact at the employer
-
Role of the primary contact at the employer
Values are
CompanyDirector,Finance, orHR. -
How often the employer runs payroll. One or more values.
At least
1element. Values areWeekly,Fortnightly,FourWeekly, orMonthly. -
Expected start date of the first pay period (YYYY-MM-DD)
-
Expected cadence for pay periods
Values are
TaxYear,CalendarYear, orOther. -
Default employee contribution percentage
Minimum value is
0, maximum value is100. -
Default employer contribution percentage
Minimum value is
0, maximum value is100. -
Basis on which pension contributions are calculated
-
Whether the employer allows salary sacrifice arrangements
Default value is
false. -
How the employer will pay pension contributions. It cannot be changed through this API once the employer is created.
Values are
BankTransferorDirectDebit. -
Approximate number of employees to be enrolled
Minimum value is
1. -
Your platform's unique identifier for this employer. Penfold stores it to link the employer back to your platform, for example when the employer's users sign in to Penfold through your platform. It must be unique across all employers you create; reusing a value that is already linked to an employer returns a 409.
Responses
-
Employer created successfully
-
Bad request, the request is malformed or contains invalid data.
-
Unauthorized
-
Forbidden
-
Company not found in Companies House
-
Method not allowed
-
An employer already exists for this company number, or the external_id is already linked to an existing employer. Check
codeto distinguish the two. -
Internal server error
curl \
--request POST 'https://payroll-api.getpenfold.dev/v4/employers' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"company_number": "12345678",
"company_name": "Acme Ltd",
"primary_contact_email": "payroll@acme.com",
"primary_contact_role": "HR",
"payroll_frequencies": [
"Monthly"
],
"expected_first_pay_period_start_date": "2025-03-01",
"expected_pay_period_cadence": "TaxYear",
"default_employee_contributions_percent": 5,
"default_employer_contributions_percent": 3,
"contribution_basis": "QualifyingEarnings",
"allows_salary_sacrifice": false,
"payment_method": "DirectDebit",
"number_of_employees": 50,
"external_id": "org_01HXYZ"
}'
{
"company_number": "12345678",
"company_name": "Acme Ltd",
"primary_contact_email": "payroll@acme.com",
"primary_contact_role": "HR",
"payroll_frequencies": [
"Monthly"
],
"expected_first_pay_period_start_date": "2025-03-01",
"expected_pay_period_cadence": "TaxYear",
"default_employee_contributions_percent": 5,
"default_employer_contributions_percent": 3,
"contribution_basis": "QualifyingEarnings",
"allows_salary_sacrifice": false,
"payment_method": "DirectDebit",
"number_of_employees": 50,
"external_id": "org_01HXYZ"
}
{
"id": "e1234-abcd-5678-efgh",
"created_at": "2023-03-01T12:00:00Z",
"updated_at": "2023-03-15T12:00:00Z",
"name": "Acme Corp.",
"contribution_basis": "QualifyingEarnings",
"allows_salary_sacrifice": false,
"external_reference": "ABC123",
"company_number": "12345678",
"payment_method": "DirectDebit",
"primary_contact_email": "john.doe@example.com",
"primary_contact_role": "HR",
"default_employee_contributions_percent": 5,
"default_employer_contributions_percent": 3,
"aml_verification_status": "Pending",
"status": "Active",
"direct_debit_mandate_status": "PendingCustomerApproval"
}
{
"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."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"code": "EmployerAlreadyExists",
"error": "employer already exists",
"external_reference": "PEN12345678"
}
{
"code": "ExternalIdAlreadyMapped",
"error": "external_id already mapped to an employer",
"external_id": "org_01HXYZ"
}
{
"error": "Bad request: invalid data provided."
}