Request

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

Path parameters

Parameter name Value Description Additional
employeeId int32 Required
businessId string Required

Request body

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

{
    "canDelete": "boolean",
    "employeeId": "int32",
    "endDate": "date-time",
    "id": "int32",
    "leaveCategoryType": "string",
    "log": [
        {
            "category": "string",
            "message": "string",
            "messages": [
                "string"
            ],
            "type": "string"
        }
    ],
    "osp": {
        "amount": "double",
        "amountOverride": "double",
        "attachments": [
            {
                "employeeDocument": {
                    "dateCreated": "date-time",
                    "dateScanned": "date-time",
                    "friendlyName": "string",
                    "id": "int32",
                    "isInfected": "boolean",
                    "url": "string"
                },
                "id": "int32"
            }
        ],
        "basicPayAdjustmentType": "string",
        "employeeId": "int32",
        "entitlementFullyExhausted": "boolean",
        "halfDayFirstDay": "boolean",
        "halfDayLastDay": "boolean",
        "id": "int32",
        "isReadOnly": "boolean",
        "leaveCategoryId": "int32",
        "maximumEntitlementReached": "boolean",
        "notes": "string",
        "overriddenServiceBandId": "int32",
        "overrideAmount": "boolean",
        "overrideServiceBand": "boolean",
        "reportingTagId": "int32",
        "reportingTagName": "string",
        "sickDays": "double",
        "status": "string",
        "unpaidDays": "double"
    },
    "payRunId": "int32",
    "ssp": {
        "amount": "double",
        "attachments": [
            {
                "employeeDocument": {
                    "dateCreated": "date-time",
                    "dateScanned": "date-time",
                    "friendlyName": "string",
                    "id": "int32",
                    "isInfected": "boolean",
                    "url": "string"
                },
                "id": "int32"
            }
        ],
        "averageWeeklyEarnings": "double",
        "averageWeeklyEarningsOverride": "double",
        "basicPayAdjustmentType": "string",
        "calculationStatus": "string",
        "doNotPay": "boolean",
        "doNotPayReason": "string",
        "id": "int32",
        "isCalculated": "boolean",
        "isReadOnly": "boolean",
        "maximumOffsetDays": "double",
        "notes": "string",
        "overrideAverageWeeklyEarnings": "boolean",
        "overrideWaitingDaysUsed": "boolean",
        "qualifiesForSsp": "boolean",
        "qualifyingDays": "int32",
        "showSsp1Warning": "boolean",
        "showWeek2": "boolean",
        "status": "string",
        "statusDescription": "string",
        "statutoryPayCategoryType": "string",
        "waitingDaysUsed": "int32",
        "waitingDaysUsedOverride": "int32",
        "week1": {
            "friday": "boolean",
            "monday": "boolean",
            "saturday": "boolean",
            "sunday": "boolean",
            "thursday": "boolean",
            "tuesday": "boolean",
            "wednesday": "boolean"
        },
        "week2": {
            "friday": "boolean",
            "monday": "boolean",
            "saturday": "boolean",
            "sunday": "boolean",
            "thursday": "boolean",
            "tuesday": "boolean",
            "wednesday": "boolean"
        }
    },
    "startDate": "date-time"
}

Properties

Name Type Description
canDelete boolean Boolean
employeeId int32 Int32
endDate date-time Nullable
id int32 Int32
leaveCategoryType string Nullable

Possible values are:

  • Standard
  • LongServiceLeave
  • StatutorySickLeave
  • StatutoryMaternityLeave
  • PersonalCarersLeave
  • StatutoryAdoptionLeave
  • StatutoryPaternityLeave
  • StatutoryParentalBereavementLeave
  • OccupationalSickLeave
  • PaidFamilyandDomesticViolenceLeave
  • EntitlementBasedLeave
  • OccupationalMaternityLeave
  • StatutorySharedParentalPay
  • LeaveWithoutPay
  • StatutoryNeonatalCareLeave
log[] array
log[].category string StatutoryLeaveLogCategoryEnum

Possible values are:

  • General
  • AWE
log[].message string String
log[].messages[] array of string
log[].type string StatutoryLeaveLogEventTypeEnum

Possible values are:

  • Info
  • Error
  • Warning
  • Success
osp object UkOccupationalAbsenceModel
osp.amount double Decimal
osp.amountOverride double Nullable
osp.attachments[] array
osp.attachments[].employeeDocument object AttachmentModel
osp.attachments[].employeeDocument.dateCreated date-time Nullable
osp.attachments[].employeeDocument.dateScanned date-time Nullable
osp.attachments[].employeeDocument.friendlyName string String
osp.attachments[].employeeDocument.id int32 Nullable
osp.attachments[].employeeDocument.isInfected boolean Nullable
osp.attachments[].employeeDocument.url string String
osp.attachments[].id int32 Nullable
osp.basicPayAdjustmentType string Nullable

Possible values are:

  • ReduceByStatutoryAmount
  • PayStatutoryAmount
  • PayStatutoryAmountOnTop
osp.employeeId int32 Int32
osp.entitlementFullyExhausted boolean Boolean
osp.halfDayFirstDay boolean Boolean
osp.halfDayLastDay boolean Boolean
osp.id int32 Int32
osp.isReadOnly boolean Boolean
osp.leaveCategoryId int32 Nullable
osp.maximumEntitlementReached boolean Boolean
osp.notes string String
osp.overriddenServiceBandId int32 Nullable
osp.overrideAmount boolean Boolean
osp.overrideServiceBand boolean Boolean
osp.reportingTagId int32 Nullable
osp.reportingTagName string String
osp.sickDays double Decimal
osp.status string StatutoryPaymentStatus

Possible values are:

  • Processed
  • Current
  • Approved
  • Submitted
  • Dnp
osp.unpaidDays double Decimal
payRunId int32 Nullable
ssp object UkStatutorySickLeaveModel
ssp.amount double Nullable
ssp.attachments[] array
ssp.attachments[].employeeDocument object AttachmentModel
ssp.attachments[].employeeDocument.dateCreated date-time Nullable
ssp.attachments[].employeeDocument.dateScanned date-time Nullable
ssp.attachments[].employeeDocument.friendlyName string String
ssp.attachments[].employeeDocument.id int32 Nullable
ssp.attachments[].employeeDocument.isInfected boolean Nullable
ssp.attachments[].employeeDocument.url string String
ssp.attachments[].id int32 Nullable
ssp.averageWeeklyEarnings double Nullable
ssp.averageWeeklyEarningsOverride double Nullable
ssp.basicPayAdjustmentType string Nullable

Possible values are:

  • ReduceByStatutoryAmount
  • PayStatutoryAmount
  • PayStatutoryAmountOnTop
ssp.calculationStatus string Nullable

Possible values are:

  • NotEligible
  • Eligible
ssp.doNotPay boolean Boolean
ssp.doNotPayReason string Nullable

Possible values are:

  • CanClaimSocialSecurityBenefitAgain
  • FixedContractEnded
  • EmploymentEnded
  • SspCap
  • AverageEarningsNotHighEnough
  • Pregnancy
  • ConstantlySick
  • TradeDispute
  • InLegalCustody
  • WorkingOutsideUk
  • NotStarted
ssp.id int32 Int32
ssp.isCalculated boolean Boolean
ssp.isReadOnly boolean Boolean
ssp.maximumOffsetDays double Nullable
ssp.notes string String
ssp.overrideAverageWeeklyEarnings boolean Boolean
ssp.overrideWaitingDaysUsed boolean Boolean
ssp.qualifiesForSsp boolean Boolean
ssp.qualifyingDays int32 Int32
ssp.showSsp1Warning boolean Boolean
ssp.showWeek2 boolean Boolean
ssp.status string Nullable

Possible values are:

  • Processed
  • Current
  • Approved
  • Submitted
  • Dnp
ssp.statusDescription string String
ssp.statutoryPayCategoryType string Nullable

Possible values are:

  • Standard
  • LeaveLoading
  • GenuineRedundancyLeavePayment
  • OpeningBalanceAllowances
  • EtpTypeRTaxable
  • EtpTypeRTaxFree
  • EtpTypeOTaxable
  • EtpTypeOTaxFree
  • EtpLumpSumD
  • StatutorySickPay
  • StatutoryMaternityPay
  • StatutoryAdoptionPay
  • StatutoryPaternityPay
  • StatutorySharedParentalPay
  • ExtraPay
  • RedundancyPayRetirementAllowance
  • GenuineRedundancyLeaveLoading
  • KeepingInTouchDay
  • AnnualHolidaysCashOut
  • HolidayPay
  • AccLevy
  • AverageEarnings
  • TerminationHolidayPay
  • TerminationAverageEarnings
  • MethodB2AdditionalPaymentsOpeningBalance
  • TerminationRelevantDailyPay
  • RelevantDailyPay
  • LumpSumGratuity
  • LumpSumNoticePay
  • LumpSumExGratiaPayment
  • LumpSumOther
  • CompensationForLossOfOffice
  • Pre93RetirementBenefits
  • Post93RetirementBenefits
  • TerminationPublicHolidayPay
  • RestDayEmployerRequested
  • RestDayEmployeeRequested
  • PublicHoliday
  • EtpSuperableTypeOTaxable
  • EtpSuperableTypeOTaxFree
  • EtpTypeOUnusedLeavePayment
  • StatutoryParentalBereavementPay
  • UKPensionDeathBenefit
  • JobKeeperStart
  • JobKeeperFinish
  • JobKeeperTopUp
  • RestDay
  • GST
  • EtpTypeSTaxable
  • EtpTypeSTaxFree
  • EtpTypePTaxable
  • EtpTypePTaxFree
  • EtpSuperableTypePTaxable
  • EtpSuperableTypePTaxFree
  • EtpTypePUnusedLeavePayment
  • JobKeeperTier
  • JobKeeperCancelTier
  • TerminationPayment
  • FlexibleDrawdownPayment
  • FlexibleDrawdownPaymentNonTaxable
  • PayrollHistory
  • PreviousYearEarnings
  • JobMakerNomination
  • JobMakerRenomination
  • JobMakerPeriod
  • JobMakerCancelNomination
  • JobMakerCancelRenomination
  • JobMakerCancelPeriod
  • NormalTerminationLeaveLoading
  • PublicHolidayWorked
  • PublicHolidayNotWorked
  • UnusedLeavePaymentNormalTermination
  • BackPayment
  • UkOccupationalSickPay
  • PaidFamilyAndDomesticViolenceLeave
  • UkOccupationalMaternityPay
  • RolledUpHolidayPay
  • ShppInTouchPay
  • AlternativeHolidaysCashOut
  • StatutoryNeonatalCarePay
ssp.waitingDaysUsed int32 Nullable
ssp.waitingDaysUsedOverride int32 Nullable
ssp.week1 object WeekModel
ssp.week1.friday boolean Boolean
ssp.week1.monday boolean Boolean
ssp.week1.saturday boolean Boolean
ssp.week1.sunday boolean Boolean
ssp.week1.thursday boolean Boolean
ssp.week1.tuesday boolean Boolean
ssp.week1.wednesday boolean Boolean
ssp.week2 object WeekModel
ssp.week2.friday boolean Boolean
ssp.week2.monday boolean Boolean
ssp.week2.saturday boolean Boolean
ssp.week2.sunday boolean Boolean
ssp.week2.thursday boolean Boolean
ssp.week2.tuesday boolean Boolean
ssp.week2.wednesday boolean Boolean
startDate date-time Nullable

Response

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

Status code Description Resource
200 OK

OK

PeriodOfLeaveModel