Sets the opening balances for this employee.

Request

POST https://api.yourpayroll.co.uk/api/v2/business/{businessId}/employee/{employeeId}/openingbalances

Path parameters

Parameter name Value Description Additional
businessId string Required
employeeId string Required

Request body

The request body takes a complete UkOpeningBalancesModel resource, containing the following writable properties:

{
    "deductions": [
        {
            "amount": "double",
            "deductionCategoryId": "int32",
            "name": "string",
            "taxExempt": "boolean"
        }
    ],
    "earningsLines": [
        {
            "amount": "double",
            "isStandardPayCategory": "boolean",
            "name": "string",
            "payCategoryId": "int32",
            "payCategoryType": "string"
        }
    ],
    "employeeId": "int32",
    "employerLiabilities": [
        {
            "amount": "double",
            "employerLiabilityCategoryId": "int32",
            "name": "string"
        }
    ],
    "financialYearStartingYear": "int32",
    "grossEarnings": "double",
    "leaveBalances": [
        {
            "amount": "double",
            "leaveCategoryId": "int32",
            "name": "string",
            "unitType": "string"
        }
    ],
    "locationName": "string",
    "nationalInsurance": {
        "categoryData": [
            {
                "category": "string",
                "directorsNi": "boolean",
                "eligibleEarnings": "double",
                "employeeContribution": "double",
                "employerContribution": "double",
                "lelCalculation": "double",
                "ptCalculation": "double",
                "ptToFustCalculation": "double",
                "stCalculation": "double",
                "stToFustCalculation": "double",
                "uelCalculation": "double",
                "uelPlusCalculation": "double",
                "ustCalculation": "double"
            }
        ]
    },
    "payeWithholdingAmount": "double",
    "payrolledBenefitsAmount": "double",
    "pension": {
        "employeePensionContributionAmount": "double",
        "employerPensionContributionAmount": "double",
        "taxReliefPensionAmount": "double"
    },
    "postGradLoanAmount": "double",
    "studentLoanAmount": "double",
    "totalHours": "double"
}

Properties

Name Type Description
deductions[] array
deductions[].amount double Decimal
deductions[].deductionCategoryId int32 Int32
deductions[].name string String
deductions[].taxExempt boolean Boolean
earningsLines[] array
earningsLines[].amount double Decimal
earningsLines[].isStandardPayCategory boolean Boolean
earningsLines[].name string String
earningsLines[].payCategoryId int32 Int32
earningsLines[].payCategoryType string UkPayCategoryType

Possible values are:

  • Standard
  • StatutorySickPay
  • StatutoryMaternityPay
  • StatutoryAdoptionPay
  • StatutoryPaternityPay
  • StatutorySharedParentalPay
  • KeepingInTouchDay
  • StatutoryParentalBereavementPay
  • RolledUpHolidayPay
  • ShppInTouchPay
  • StatutoryNeonatalCarePay
employeeId int32 Nullable
employerLiabilities[] array
employerLiabilities[].amount double Decimal
employerLiabilities[].employerLiabilityCategoryId int32 Int32
employerLiabilities[].name string String
financialYearStartingYear int32 Nullable
grossEarnings double Nullable
leaveBalances[] array
leaveBalances[].amount double Decimal
leaveBalances[].leaveCategoryId int32 Int32
leaveBalances[].name string String
leaveBalances[].unitType string LeaveUnitTypeEnum

Possible values are:

  • Hours
  • Days
  • Weeks
locationName string String
nationalInsurance object OpeningNationalInsuranceModel
nationalInsurance.categoryData[] array
nationalInsurance.categoryData[].category string Nullable

Possible values are:

  • A
  • B
  • C
  • H
  • J
  • M
  • X
  • Z
  • F
  • I
  • L
  • S
  • V
  • D
  • E
  • K
  • N
nationalInsurance.categoryData[].directorsNi boolean Boolean
nationalInsurance.categoryData[].eligibleEarnings double Decimal
nationalInsurance.categoryData[].employeeContribution double Decimal
nationalInsurance.categoryData[].employerContribution double Decimal
nationalInsurance.categoryData[].lelCalculation double Decimal
nationalInsurance.categoryData[].ptCalculation double Decimal
nationalInsurance.categoryData[].ptToFustCalculation double Decimal
nationalInsurance.categoryData[].stCalculation double Decimal
nationalInsurance.categoryData[].stToFustCalculation double Decimal
nationalInsurance.categoryData[].uelCalculation double Decimal
nationalInsurance.categoryData[].uelPlusCalculation double Decimal
nationalInsurance.categoryData[].ustCalculation double Decimal
payeWithholdingAmount double Nullable
payrolledBenefitsAmount double Nullable
pension object OpeningPensionsModel
pension.employeePensionContributionAmount double Nullable
pension.employerPensionContributionAmount double Nullable
pension.taxReliefPensionAmount double Nullable
postGradLoanAmount double Nullable
studentLoanAmount double Nullable
totalHours double Nullable

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
200 OK

OK