Validation

All data sent to the API will passed through three layers of validation, schema, logical and data integrity.

Schema Validation

Each data object has a schema file that represents it's required shape and some basic validation rules. Data must conform to the schema definition; even if you are using JSON.

The latest schema pack can be downloaded from here.

Logical Validation

Logical validation rules ensures data is not contradictory to itself; for example an employee leaving date cannot be before start date. The full list of logical validation rules and their meaning are detailed in the table below.


Rule Data Type Description
LOG1000 Employee Cannot apply employee data. Employee leaving date cannot be before start date.
LOG1001 Employee Cannot apply employee data. Employee leaver reason and leaving date must be set as a pair. You cannot set one without the other.
LOG1002 Address Cannot apply employee data. Non UK address cannot have postcode.
LOG1003 Address Cannot apply employee data. UK address must include a postcode.
LOG1400 PayInstruction Cannot apply pay instruction data. Pay instruction end date cannot be before the start date.
LOG1401 AbsencePayInstruction Cannot apply absence pay instruction data. Absence pay instruction end date cannot be before the start date.
LOG2700 SspPayInstruction Cannot apply SSP pay instruction data. The absence duration must be greater than or equal to 4 days.
LOG2800 SapPayInstruction Cannot apply SAP pay instruction data. The matching date is out of acceptable range.
LOG2801 SapPayInstruction Cannot apply SAP pay instruction data. The placement date is out of acceptable range.
LOG2802 SapPayInstruction Cannot apply SAP pay instruction data. The duration of the absence must be in complete weeks only. Partial weeks are not allowed.
LOG2803 SapPayInstruction Cannot apply SAP pay instruction data. The duration of the absence must be greater than or equal to 7 days.
LOG2804 SapPayInstruction Cannot apply SAP pay instruction data. SAP absence must have an absence end date.
LOG2805 SapPayInstruction Cannot apply SAP pay instruction data. Keep in touch day is out bounds. Keep in touch days must fall within the absence start and end dates.
LOG2806 SapPayInstruction Cannot apply SAP pay instruction data. Absence start date is out of bounds. SAP cannot be paid until 2 weeks before the placement date.
LOG2807 SapPayInstruction Cannot apply SAP pay instruction data. Absence start date is out of bounds. SAP must start no later than the day after placement.
LOG2900 SmpPayInstruction Cannot apply SMP pay instruction data. SMP absence must have an end date. The maximum duration of paid statutory maternity leave is 39 weeks.
LOG2901 SmpPayInstruction Cannot apply SMP pay instruction data. The specified baby due date is out of acceptable range.
LOG2902 SmpPayInstruction Cannot apply SMP pay instruction data. Keep in touch day is out bounds. Keep in touch days must fall within the absence start and end dates.
LOG3000 SppPayInstruction Cannot apply SPP pay instruction data. The baby due date is out of acceptable range.
LOG3001 SppPayInstruction Cannot apply SPP pay instruction data. The duration of the absence must be greater than or equal to 7 days.
LOG3002 SppPayInstruction Cannot apply SPP pay instruction data. The duration of the absence exceeds the statutory maximum allowed.
LOG3003 SppPayInstruction Cannot apply SPP pay instruction data. The duration of the absence must be a complete week. Partial weeks are not allowed.
LOG3004 SppPayInstruction Cannot apply SPP pay instruction data. SPP absence must have an absence end date.
LOG3005 SppPayInstruction Cannot apply SPP pay instruction data. Working days must fall within the absence start and absence end dates.
LOG3006 SppPayInstruction Cannot apply SPP pay instruction data. The baby born date is out of acceptable range.
LOG3007 SppPayInstruction Cannot apply SPP pay instruction data. The absence start date cannot be before the baby born date.
LOG3100 ShppPayInstruction Cannot apply ShPP pay instruction data. The baby due date is out of acceptable range.
LOG3101 ShppPayInstruction Cannot apply ShPP pay instruction data. The duration of the absence must be greater than or equal to 7 days.
LOG3102 ShppPayInstruction Cannot apply ShPP pay instruction data. The duration of the absence must be a complete week. Partial weeks are not allowed.
LOG3103 ShppPayInstruction Cannot apply ShPP pay instruction data. ShPP absence must have an absence end date.
LOG3104 ShppPayInstruction Cannot apply ShPP pay instruction data. The baby born date is out of acceptable range.
LOG3105 ShppPayInstruction Cannot apply ShPP pay instruction data. The absence start date cannot be before the baby born date.
LOG3106 ShppPayInstruction Cannot apply ShPP pay instruction data. Either both or neither start and end Shared Parental Leave (SPL) dates must be specified.
LOG3107 ShppPayInstruction Cannot apply ShPP pay instruction data. Shared Parental Leave (SPL) end date cannot be before SPL start date.
LOG3108 ShppPayInstruction Cannot apply ShPP pay instruction data. Absence must end before child's first anniversary.
LOG3200 Pension Cannot apply pension pay instruction data. Employee contribution invalid. You cannot supply both cash and percentage contributions.
LOG3201 Pension Cannot apply pension pay instruction data. Employer contribution invalid. You cannot supply both cash and percentage contributions.
LOG3202 Pension Cannot apply pension pay instruction data. Employee additional voluntary contribution value is invalid. You cannot supply both cash and percentage additional voluntary contributions.
LOG3400 Pension Cannot apply pension data. No employee contribution value is specified. You must supply either cash or percentage employee contribution value.
LOG3401 Pension Cannot apply pension data. No employer contribution value is specified. You must supply either cash or percentage employer contribution value.
LOG3402 Pension Cannot apply pension data. Employee contribution invalid. Employees can contribute either cash or percentage, but not both.
LOG3403 Pension Cannot apply pension data. Employer contribution invalid. Employers can contribute either cash or percentage, but not both.
LOG3500 ReportDefinition Cannot apply report definition data. The readonly flag is reserved for system generated reports.

Data Integrity Validation

Data integrity rules ensure submitted data does not invalidate any existing data; for example historic changes to an employee’s salary cannot contradict any existing pay runs. The full list of data integrity rules and their meaning are detailed in the table below.


Rule Data Type Description
DIR1000 Employee Cannot delete employee with calculation history.
DIR1001 Employee Cannot insert employee revision before existing revision. Revision dates must run sequentially.
DIR1002 Employee Cannot delete employee revision with dependent calculation.
DIR1003 Employee Cannot delete employee revision. There must be at least one revision.
DIR1004 Employee Cannot replace employee revision that has dependent calculation.
DIR1005 Employee Cannot delete historical employee revision. Revisions must be deleted in descending sequence.
DIR1006 Employee Cannot update employee revision. Revisions cannot be edited.
DIR1007 Employee Cannot add employee to another employers pay schedule. The specified pay schedule belongs to another employer.
DIR1008 Employee Cannot insert employee revision. Employee code must be unique within the employer and have not been used before.
DIR1009 Employee Cannot alter employee revision. The parent employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR1010 Employee Cannot alter employee core. The parent employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR1100 Employer Cannot delete employer with pay run history.
DIR1101 Employer Cannot insert employer revision before existing revision. Revision dates must run sequentially.
DIR1102 Employer Cannot delete employer revision with dependent calculation.
DIR1103 Employer Cannot delete employer revision. There must be at least one revision.
DIR1104 Employer Cannot replace employer revision that has dependent calculation.
DIR1105 Employer Cannot delete historical employer revision. Revisions must be deleted in descending sequence.
DIR1106 Employer Cannot update employer revision. Revisions cannot be edited.
DIR1107 Employer Cannot alter employer revision. The employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR1108 Employer Cannot alter employer core. The employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR1200 PayRun Cannot delete pay run out of sequence. The pay run has descendant(s). Only tail end pay runs can be deleted.
DIR1201 PayRun Cannot insert pay run. The pay run payment date cannot be before the previous pay run payment date. Expected payment date to be after {0:yyyy-MM-dd} but found {1:yyyy-MM-dd}
DIR1202 PayRun Cannot insert pay run. Incorrect tax period specified. Supplementary pay runs must share the proceeding pay runs tax period. Expected tax period ({0}) but found tax period ({1})
DIR1203 PayRun Cannot insert pay run. Supplementary payruns must specify a proceeding payrun.
DIR1204 PayRun Cannot insert pay run. Incorrect period date(s) specified. Re-run period dates must match proceeding period dates. Expected {0:yyyy-MM-dd} to {1:yyyy-MM-dd} but found {2:yyyy-MM-dd} to {3:yyyy-MM-dd}.
DIR1205 PayRun Cannot insert pay run. Incorrect period start date specified. Pay run start date must directly follow the proceeding pay run end date. Expected start date {0:yyyy-MM-dd} but found {1:yyyy-MM-dd}
DIR1206 PayRun Cannot insert pay run. All employees must be members of the specified pay schedule.
DIR1207 PayRun Cannot insert pay run. The specified duration does not match the pay schedule frequency. The duration between period start and period end must correspond to the pay schedule payment frequency.
DIR1208 PayRun Cannot insert pay run. The pay run payment date cannot be before the first employer revision date.
DIR1209 PayRun Cannot update pay run. The specified pay run has dependent runs and cannot be altered. Remove dependent runs and try again.
DIR1400 PayInstruction Cannot delete pay instruction. The pay instruction has dependant pay lines.
DIR1401 PayInstruction Cannot update pay instruction. The instruction end date cannot be before a dependent pay line payment date.
DIR1402 PayInstruction Cannot insert statutory absence instruction. The absence duration overlaps an existing statutory absence instruction. Only a single statutory absence can be active at any one time.
DIR1403 PayInstruction Cannot insert parental statutory absence instruction. The period of absence conflicts with previously paid salary.
DIR1404 PayInstruction Cannot insert pay instruction. A pay instruction exists for the given dates. [SingleInstance] pay instructions cannot overlap, either update or end the existing instruction.
DIR1405 PayInstruction Cannot insert NI instruction. Unable to set directorship calculation method because the employee directorship appointment date has not been set or is after the instruction start date.
DIR1406 PayInstruction Cannot update pay instruction. The instruction has dependent calculations, the existing instruction should be ended and a new pay instruction created.
DIR1407 PayInstruction Cannot alter pay instruction. The parent employer is marked as readonly. Please wait for all calculations to complete and try agian.
DIR2600 PayCode Cannot delete pay code with calculation history.
DIR2601 PayCode Cannot insert pay code revision before existing revision. Revision dates must run sequentially.
DIR2602 PayCode Cannot delete pay code revision with dependent calculation.
DIR2603 PayCode Cannot delete pay code revision. There must be at least one revision.
DIR2604 PayCode Cannot replace pay code revision that has dependent calculation.
DIR2605 PayCode Cannot delete historical pay code revision. Revisions must be deleted in descending sequence.
DIR2606 PayCode Cannot update pay code revision. Revisions cannot be edited.
DIR2607 PayCode Cannot insert read only pay code. Read only is reserved for system pay codes.
DIR2608 PayCode Cannot edit read only pay code. Read only system codes cannot be altered.
DIR2609 PayCode Cannot delete read only pay code. Read only system codes cannot be deleted.
DIR2610 PayCode Cannot edit pay code 'CODE'. The 'Code' property cannot be changed.
DIR2611 PayCode Cannot alter pay code revision. The parent employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR2612 PayCode Cannot alter pay code core. The parent employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR2700 SspPayInstruction Cannot insert SSP instruction. An open ended instruction already exists, either update or end the existing instruction.
DIR2701 SspPayInstruction Cannot insert SSP instruction. An existing SSP absence has overlapping dates.
DIR2800 SapPayInstruction Cannot insert SAP instruction. No effective employee core found for the specified matching data.
DIR2801 SapPayInstruction Cannot insert SAP instruction. The minimum length of employement has not been met.
DIR2802 SapPayInstruction Cannot insert SAP instruction. Employment ended before the start of the matching week.
DIR2900 SmpPayInstruction Cannot insert SMP instruction. SMP is only allowed for female employees.
DIR2901 SmpPayInstruction Cannot insert SMP instruction. The minimum length of employment has not been met. Employment must have began {0} weeks before expected week of childbirth.
DIR2902 SmpPayInstruction Cannot insert SMP instruction. Employment ended before baby due qualifying week began.
DIR2903 SmpPayInstruction Cannot insert SMP instruction. No employee information exists for the specified absence start data.
DIR2904 SmpPayInstruction Cannot insert SMP instruction. No employee core exists for qualifying week and no AWE override value has been supplied.
DIR3000 SppPayInstruction Cannot insert SPP instruction. The minimum length of employment has not been met.
DIR3100 ShppPayInstruction Cannot insert SHPP instruction. The minimum length of employment has not been met.
DIR3101 ShppPayInstruction Cannot insert SHPP instruction. (Non-Agency Workers) The absence start date cannot be before the Share Parental Leave (SPL) start date.
DIR3102 ShppPayInstruction Cannot insert SHPP instruction. (Non-Agency Workers) The absence must start at least 6 days before Share Parental Leave (SPL) end date.
DIR3103 ShppPayInstruction Cannot insert SHPP instruction. Share Parental Leave (SPL) start and end dates must be specified for non-agency workers.
DIR3104 ShppPayInstruction Cannot insert SHPP instruction. (Non-Agency Workers) Absence must end on or before Share Parental Leave (SPL) end date.
DIR3400 Pension Cannot delete pension with pay run history.
DIR3401 Pension Cannot insert pension revision before existing revision. Revision dates must run sequentially.
DIR3402 Pension Cannot delete pension revision with dependent calculation.
DIR3403 Pension Cannot delete pension revision. There must be at least one revision.
DIR3404 Pension Cannot replace pension revision that has dependent calculation.
DIR3405 Pension Cannot delete historical pension revision. Revisions must be deleted in descending sequence.
DIR3406 Pension Cannot update pension revision. Revisions cannot be edited.
DIR3407 Pension Cannot alter pension revision. The parent employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR3408 Pension Cannot alter pension core. The parent employer is marked as readonly. Please wait for all calculations to complete and try again.
DIR3500 ReportDefinition Cannot delete report definition. System generated reports cannot be deleted.
DIR3600 DpsMessage Cannot update DPS message. Only the [MessageStatus] and [ProcessingResult] properties can be updated, all other properties are readonly.