Partner organisations only. A Payroll organisation calling this
endpoint receives 405 Method Not Allowed.
Creates a new employer in the managed organisation named by
organisation_id. The organisation must be one your organisation
manages; see Managed organisations above.
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.
Body
Required
-
The id of the managed organisation the employer goes into, from
POST /organisations. Asingle_employerorganisation can hold only one employer. -
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.
Responses
-
Employer created successfully
-
Bad request, the request is malformed or contains invalid data.
-
Unauthorized
-
Forbidden
-
The managed organisation does not exist or is not managed by your organisation, or the company is not found in Companies House.
-
Method not allowed
-
The employer conflicts with one Penfold already has, or cannot go into the organisation you named. Use
code, noterror, to tell the cases apart.erroris a human-readable message and its wording may change. -
Internal server error
curl \
--request POST 'https://payroll-api.getpenfold.dev/v4/employers' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"organisation_id": "cm1abcd2e0000xyz123456789",
"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
}'
{
"organisation_id": "cm1abcd2e0000xyz123456789",
"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
}
{
"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": "PEN12345678",
"organisation_id": "cm1abcd2e0000xyz123456789",
"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",
"payroll_frequencies": [
{
"frequency": "Monthly",
"expected_first_pay_period_start_date": "2025-03-01"
}
],
"expected_pay_period_cadence": "TaxYear"
}
{
"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": "CompanyAlreadyRegistered",
"error": "company already registered with Penfold"
}
{
"code": "OrganisationAlreadyHasEmployer",
"error": "organisation already has an employer"
}
{
"error": "Bad request: invalid data provided."
}