Creates a new leave category for the business.

Request

POST https://api.yourpayroll.co.uk/api/v2/business/{businessId}/leavecategory

Path parameters

Parameter name Value Description Additional
businessId string Required

Request body

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

{
    "accruesFirstPayRunPerPeriodOnly": "boolean",
    "apply30MinuteRoundingRules": "boolean",
    "automaticallyAccrues": "boolean",
    "daysWorkedBeforeRecalculating": "int32",
    "deductFromPayCategoryId": "int32",
    "deductFromPrimaryPayCategory": "boolean",
    "excludeFromTerminationPayout": "boolean",
    "externalId": "string",
    "hideAccrualsOnPayslip": "boolean",
    "id": "int32",
    "includeIn52WeekAverageCalculation": "boolean",
    "isBalanceUntracked": "boolean",
    "isNamePrivate": "boolean",
    "isOpenEnded": "boolean",
    "isPrivate": "boolean",
    "leaveAccrualRule": {
        "accrualType": "string",
        "accrueInAdvance": "boolean",
        "capType": "string",
        "carryOverAmount": "double",
        "carryOverBehaviour": "string",
        "id": "int32",
        "unitCap": "double"
    },
    "leaveCategoryType": "string",
    "leaveEntitlement": {
        "carryOverAmount": "double",
        "carryOverType": "string",
        "forfeitureAmount": "double",
        "forfeitureMonthsStartAfter": "int32",
        "forfeitureType": "string",
        "id": "int32",
        "isProRata": "boolean",
        "leaveBalanceType": "string",
        "leaveEntitlementTiers": [
            {
                "accrualAmount": "double",
                "accrualStartAfter": "int32",
                "accrualStartAfterUnitType": "string",
                "accrualUnitType": "string",
                "id": "int32",
                "isDeleted": "boolean"
            }
        ],
        "standardAllowanceUnitType": "string",
        "standardAllowanceUnitTypeAmount": "double"
    },
    "leaveUnitType": "string",
    "name": "string",
    "occupationalAbsencePaymentBands": [
        {
            "entitlementUnitType": "string",
            "paymentBandIndex": "int32",
            "rate": "double"
        }
    ],
    "occupationalAbsenceServiceBandType": "string",
    "occupationalAbsenceServiceBands": [
        {
            "addStatutory": "boolean",
            "entitlements": [
                {
                    "paymentBandIndex": "int32",
                    "units": "double"
                }
            ],
            "from": "int32",
            "id": "int32",
            "serviceLength": "int32",
            "to": "int32"
        }
    ],
    "payoutAsETP": "boolean",
    "payoutNegativeBalance": "boolean",
    "preventNegativeBalanceUnpaidLeaveCategoryId": "int32",
    "source": "string",
    "transferToPayCategoryId": "int32",
    "unitType": "string",
    "units": "double",
    "unpaidDaysAtStartOfSickPeriod": "int32",
    "useDeductFromPayCategoryRate": "boolean"
}

Properties

Name Type Description
accruesFirstPayRunPerPeriodOnly boolean Nullable
apply30MinuteRoundingRules boolean Boolean
automaticallyAccrues boolean Boolean
daysWorkedBeforeRecalculating int32 Nullable
deductFromPayCategoryId int32 Nullable
deductFromPrimaryPayCategory boolean Boolean
excludeFromTerminationPayout boolean Boolean
externalId string String
hideAccrualsOnPayslip boolean Boolean
id int32 Int32
includeIn52WeekAverageCalculation boolean Boolean
isBalanceUntracked boolean Boolean
isNamePrivate boolean Boolean
isOpenEnded boolean Boolean
isPrivate boolean Boolean
leaveAccrualRule object LeaveAccrualRuleModel
leaveAccrualRule.accrualType string LeaveAccrualType

Possible values are:

  • Ongoing
  • Yearly
  • BasedOnLengthOfService
leaveAccrualRule.accrueInAdvance boolean Boolean
leaveAccrualRule.capType string LeaveAccrualCapType

Possible values are:

  • NotLimited
  • Limited
leaveAccrualRule.carryOverAmount double Decimal
leaveAccrualRule.carryOverBehaviour string LeaveAccrualCarryOverBehaviour

Possible values are:

  • CarryEntireAmount
  • CarryHours
leaveAccrualRule.id int32 Int32
leaveAccrualRule.unitCap double Decimal
leaveCategoryType string LeaveCategoryTypeEnum

Possible values are:

  • Standard
  • LongServiceLeave
  • StatutorySickLeave
  • StatutoryMaternityLeave
  • PersonalCarersLeave
  • StatutoryAdoptionLeave
  • StatutoryPaternityLeave
  • StatutoryParentalBereavementLeave
  • OccupationalSickLeave
  • PaidFamilyandDomesticViolenceLeave
  • EntitlementBasedLeave
  • OccupationalMaternityLeave
  • StatutorySharedParentalPay
  • LeaveWithoutPay
leaveEntitlement object LeaveEntitlementModel
leaveEntitlement.carryOverAmount double Decimal
leaveEntitlement.carryOverType string LeaveEntitlementCarryOverType

Possible values are:

  • None
  • Unlimited
  • UpTo
leaveEntitlement.forfeitureAmount double Decimal
leaveEntitlement.forfeitureMonthsStartAfter int32 Int32
leaveEntitlement.forfeitureType string LeaveEntitlementForfeitureType

Possible values are:

  • None
  • Unlimited
  • UpTo
leaveEntitlement.id int32 Int32
leaveEntitlement.isProRata boolean Boolean
leaveEntitlement.leaveBalanceType string LeaveEntitlementLeaveBalanceType

Possible values are:

  • None
  • Full
  • ProRata
leaveEntitlement.leaveEntitlementTiers[] array
leaveEntitlement.leaveEntitlementTiers[].accrualAmount double Decimal
leaveEntitlement.leaveEntitlementTiers[].accrualStartAfter int32 Int32
leaveEntitlement.leaveEntitlementTiers[].accrualStartAfterUnitType string LeaveEntitlementAccrualStartDateUnitType

Possible values are:

  • Month
  • Year
leaveEntitlement.leaveEntitlementTiers[].accrualUnitType string LeaveEntitlementAccrualUnitType

Possible values are:

  • Monthly
  • Yearly
leaveEntitlement.leaveEntitlementTiers[].id int32 Int32
leaveEntitlement.leaveEntitlementTiers[].isDeleted boolean Boolean
leaveEntitlement.standardAllowanceUnitType string LeaveEntitlementAccrualUnitType

Possible values are:

  • Monthly
  • Yearly
leaveEntitlement.standardAllowanceUnitTypeAmount double Decimal
leaveUnitType string LeaveUnitTypeEnum

Possible values are:

  • Hours
  • Days
  • Weeks
name string String
occupationalAbsencePaymentBands[] array
occupationalAbsencePaymentBands[].entitlementUnitType string Nullable

Possible values are:

  • Days
  • Weeks
occupationalAbsencePaymentBands[].paymentBandIndex int32 Int32
occupationalAbsencePaymentBands[].rate double Decimal
occupationalAbsenceServiceBandType string LeaveCategoryUkOccupationalAbsenceServiceBandType

Possible values are:

  • Weeks
  • Months
  • Years
occupationalAbsenceServiceBands[] array
occupationalAbsenceServiceBands[].addStatutory boolean Boolean
occupationalAbsenceServiceBands[].entitlements[] array
occupationalAbsenceServiceBands[].entitlements[].paymentBandIndex int32 Int32
occupationalAbsenceServiceBands[].entitlements[].units double Decimal
occupationalAbsenceServiceBands[].from int32 Int32
occupationalAbsenceServiceBands[].id int32 Int32
occupationalAbsenceServiceBands[].serviceLength int32 Int32
occupationalAbsenceServiceBands[].to int32 Nullable
payoutAsETP boolean Boolean
payoutNegativeBalance boolean Boolean
preventNegativeBalanceUnpaidLeaveCategoryId int32 Nullable
source string String
transferToPayCategoryId int32 Nullable
unitType string UkLeaveAllowanceUnitType

Possible values are:

  • HoursPerHourWorked
  • HoursPerPayRun
  • StandardDays
  • StandardWeeks
  • DayPerCalendarDay
units double Decimal
unpaidDaysAtStartOfSickPeriod int32 Nullable
useDeductFromPayCategoryRate boolean Boolean

Response

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

Status code Description Resource
200 OK

OK

UkLeaveCategoryModel