To retrieve details for a specific worker. To retrieve worker details, users would need to pass account and business unit reference to the base URL, along with the worker reference.
Property
Validations
Account
Cannot be Null
Cannot be left blank
Business Unit
Cannot be Null
Cannot be left blank
Worker
Cannot be Null
Can be left blank
If Worker is left "blank" - the response will include all the relevant workers from the account and business unit.
To add a PAYE worker using the public API you must pass the account reference and business unit reference to the Base URL with the required objects in the body. Refer to Appendix A containing a sample of the request body.
Property
Validations
Account
Cannot be Null
Cannot be left blank
Business Unit
Cannot be Null
Cannot be left blank
The dependencies and validations are:
Property
Acceptable Format
Validations
Refrence
String
Cannot be null
Can be blank and the system will automatically generate a reference from the worker
Title
String
Cannot be Null
You must provide a Title for the worker
If contains Invalid Characters
Title must only contain Alpha Numeric characters
If contains Insufficient Characters
Title must be between 2 and 14 characters only
Surname
String
You must provide a worker surname
Must not contain Insufficient Characters
Worker Surname must be between 2 and 26 characters only
Must not contain Invalid Characters
Forename
String
You must provide a worker surname
Must not contain Insufficient Characters
Worker Forename must be between 2 and 26 characters only
Must not contain Invalid Characters
EngagementType
String
Cannot be Null
Cannot be Blank
Accepted value - Paye
DateOfBirth
Date Time
Cannot be Null
You must enter a worker DOB
Underage
Age must be greater than 16
Overage
Age must be less than 100
Acceptable format: 1986-04-21T00:00:00
StartDate
Date Time
Cannot be Null
You must enter a Start Date
Invalid Start Date
Start Date cannot be after the Leave Date
Acceptable format: 2020-01-28T00:00:00
LeaverReason
String
Can be Null
Cannot be blank
You must provide a reason for leaving when specifying Leave Date
If starterForm = “startingdeclaration” then employeeStatement needs to be either "A", "B", “C”, “Unknown”
EmployeeStatement will default to "Statement Unknown" if not provided in the API request
EmployeeStatement
String
If starterForm = “startingdeclaration” then employeeStatement needs to be either "A", "B", “C”, “Unknown”
EmployeeStatement will default to "Statement Unknown" if not provided in the API request
TaxCode
String
Cannot be Null
Cannot be blank
If invalid tax code value is provided then the following validation will appear
Invalid Tax Code provided - Please check the tax code provided is in a valid format
Accepted format: “1257L”
Address
String
Can be null
If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp
You must enter the Address Line 1
Address Line 1 must be between 1 and 35 characters
You must enter a postcode
Postcode - incorrect format
Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
InternationalAddress
String
Can be true or false
If InternationalAddress = true
Mandatory values:
address1
address2
Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
If InternationalAddress = false
Mandatory values:
address1 and
address2 or
address3 or
Town or
County
Postcode
InternationalAddress can be true or false
BankAccount
String
Can be null
If the bank details record doesn’t exist in the body, then will return 200 but record will display as failed validation error
Valid Account Name is required
Account Number must be 8 digits long
Sort Code must be 6 digits long
If the key paymentMethod = “cheque” then bank details are not required can be left blank otherwise you will receive the following validation: You must provide a valid Payment method.
InternationalBankAccount
String
When InternationalBankAccount = true
Mandatory values
AccountName
IBAN
BIC
Optional values:
BankReference
BankName
All other fields are ignored regardless of entry.
When InternationalBankAccount = false
Mandatory values:
AccountName
SortCode
AccountNumber
Optional values:
BankReference
BankName
InternationalBankAccount details can only be provided when BACS is set as "NatWest Bankline International"
PensionSchemeMember
String
Can be null
If the pensionSchemeMember record not provided, system will use the default pension scheme set in the configuration
schemeReference can be null
In the event, the provided pension scheme reference does not exist, the system assigns the default pension scheme set under account configuration
IsWeek1
String
Cannot be null
Can be true or false
If isWeek1 = true then P45LeavingDate, P45Frequency, P45Period, P45YtdGross and P45YtdTax are not required
Apprentice
String
Cannot be null
Can be true or false
If apprentice = true then NI Letter must be H otherwise will create the record and fail validation
NI Letter is not H but Worker is an apprentice
HolidayScheme
String
Cannot be null
Can be left blank holidayScheme = “”
PAYE Worker Update
Method:
Add a caption...
Base URL: {{publicApiUrl}}/Worker/{{accountReference}}/{{businessUnitReference}}
To update a PAYE worker using the public API you need to pass the account and business unit reference to the Base URL with the required objects in the body. Refer to Appendix B containing a sample of the request body.
Property
Acceptable Format
Validations
Account
String
Cannot be Null
Cannot be left blank
BusinessUnit
String
Cannot be Null
Cannot be left blank
Refrence
String
Cannot be null
Can be blank and the system will automatically generate a reference from the worker
Title
String
Cannot be Null
You must provide a Title for the worker
If contains Invalid Characters
Title must only contain Alpha Numeric characters
If contains Insufficient Characters
Title must be between 2 and 14 characters only
Surname
String
You must provide a worker surname
Must not contain Insufficient Characters
Worker Surname must be between 2 and 26 characters only
Must not contain Invalid Characters
Forename
String
You must provide a worker surname
Must not contain Insufficient Characters
Worker Forename must be between 2 and 26 characters only
Must not contain Invalid Characters
EngagementType
String
Cannot be Null
Cannot be Blank
Accepted value - Paye
DateOfBirth
Date Time
Cannot be Null
You must enter a worker DOB
Underage
Age must be greater than 16
Overage
Age must be less than 100
Acceptable format: 1986-04-21T00:00:00
StartDate
Date Time
Cannot be Null
You must enter a Start Date
Invalid Start Date
Start Date cannot be after the Leave Date
Acceptable format: 2020-01-28T00:00:00
LeaverReason
String
Can be Null
Cannot be blank
You must provide a reason for leaving when specifying Leave Date
If starterForm = “startingdeclaration” then employeeStatement needs to be either "A", "B", “C”, “Unknown”
EmployeeStatement will default to "Statement Unknown" if not provided in the API request
TaxCode
String
Cannot be Null
Cannot be blank
If invalid tax code value is provided then the following validation will appear
Invalid Tax Code provided - Please check the tax code provided is in a valid format
Accepted format: “1257L”
Address
String
Can be null
If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp
You must enter the Address Line 1
Address Line 1 must be between 1 and 35 characters
You must enter a postcode
Postcode - incorrect format
Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
BankAccount
String
Can be null
If the bank details record doesn’t exist in the body, then will return 200 but record will display as failed validation error
Valid Account Name is required
Account Number must be 8 digits long
Sort Code must be 6 digits long
If the key paymentMethod = “cheque” then bank details are not required can be left blank otherwise you will receive the following validation: You must provide a valid Payment method.
PensionSchemeMember
String
Can be null
If the pensionSchemeMember record not provided, system will use the default pension scheme set in the configuration
schemeReference can be null
In the event, the provided pension scheme reference does not exist, the system assigns the default pension scheme set under account configuration
IsWeek1
String
Cannot be null
Can be true or false
If isWeek1 = true then P45LeavingDate, P45Frequency, P45Period, P45YtdGross and P45YtdTax are not required
Apprentice
String
Cannot be null
Can be true or false
If apprentice = true then NI Letter must be H otherwise will create the record and fail validation
NI Letter is not H but Worker is an apprentice
HolidayScheme
String
Cannot be null
Can be left blank holidayScheme = “”
Contractor Workers
Contractor Worker Add
Method:
Add a caption...
Base URL: {{publicApiUrl}}/Worker/{{accountReference}}/{{businessUnitReference}}
To add a contractor worker using the public API you need to pass the account and business unit reference to the URL with the required objects in the body. Refer to Appendix C containing a sample of the request body.
Property
Validations
Account
Cannot be Null
Cannot be left blank
Business Unit
Cannot be Null
Cannot be left blank
The key dependencies are: -
Property
Acceptable Format
Validations
Supplier
String
Cannot be Null when engagementType = “Contractor”
If the supplier object is not supplied in the body, then an error will be returned
Refrence
String
Cannot be null
Can be blank and the system will automatically generate a reference from the worker
WorkerEngagement
String
Cannot be Null
Cannot be blank
Acceptable values for workerEngagement can be: “A”, “B”, “C”, “D”, “E”, “F”
Address
String
Can be null
If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp
You must enter the Address Line 1
Address Line 1 must be between 1 and 35 characters
You must enter a postcode
Postcode - incorrect format
Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
InternationalAddress
String
If InternationalAddress = true
Mandatory values:
address1
address2
Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
The acceptable values are: "Default", "Payment Term 1", "Payment Term 2", "Payment Term 3", "Payment Term 4", "Payment Term 5", "Payment Term 6", "Payment Term 7", "Payment Term 8", "Payment Term 9", "Payment Term 10"
SettlementTerms must be provided if InvoiceWorkflow = "SelfBilling" or "InvoiceMatching"
CompaniesHouse
String
Can be Null
If the worker engagementType = “D” (Limited company) then the company house number must not be null.
Accepted format: AANNNNNN or NNNNNNNN
SuppliedWorkerEngagementType
String
Cannot be NULL
Cannot be left blank
Accepted Value - Contractor
ConstructionIndustryScheme
Boolean
Cannot be Null
Cannot be Left blank
Accepted values - True/False
Construction Industry Scheme must be enabled under Account Configuration
Users can add PayrollDataUK for contractors to add them as IR35
Property
Acceptable Format
Validations
PayrollDataUK
String
To add contractors as IR35, PayrollDataUK is required.
Can be NULL
Cannot be left blank
Sample PayrollDataUK -
"payrollDataUK":{
"niLetter":"A",
"starterForm":"P45",
"employeeStatement":"A",
"taxCode":"1250L",
"isWeek1":false,
"p45LeavingDate":"2022-02-02T00:00:00",
"p45Frequency":"Week",
"p45Period":"2",
"p45YtdGross":120.00,
"p45YtdTax":12.00
}
Contractor worker Update
Method:
Add a caption...
Base URL: {{publicApiUrl}}/Worker/{{accountReference}}/{{businessUnitReference}}
To update a contractor worker using the public API you need to pass the account and business unit reference to the Base URL with the required objects in the body. Refer to Appendix D containing a sample of the request body.
Property
Validations
Account
Cannot be Null
Cannot be left blank
Business Unit
Cannot be Null
Cannot be left blank
MovetoBusinessUnit
Move a worker to another Business Unit
Can be null
Requires the destination business unit reference
If blank, no action will be taken
If wrong reference provided, 404 will be returned
Most of the key dependencies and validations are the same as the Worker ADD as described in previous sections.
Property
Acceptable Format
Validations
Refrence
String
Cannot be null
Can be blank and the system will automatically generate a reference from the worker
Supplier
String
Cannot be Null when engagementType = “Contractor”
If the supplier object is not supplied in the body, then an error will be returned
SupplierReference
String
Can be null when updating the contractor worker
The response will return from the worker reference
PayslipDeliveryMethod
String
Cannot be null
If Payslipdeliverymethod key updated from email to paper then email address is not required
If the contractor update is to become IR35 then the payrollDataUK keys can be added to the body with values
Address
String
Can be null
If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp
You must enter the Address Line 1
Address Line 1 must be between 1 and 35 characters
You must enter a postcode
Postcode - incorrect format
Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
InternationalAddress
Boolean
Can be true or false
If InternationalAddress = true
Mandatory values:
address1
address2
Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
If InternationalAddress = false
Mandatory values:
address1 and
address2 or
address3 or
Town or
County
Postcode
InternationalAddress can be true or false
InternationalBankAccount
Boolean
If InternationalAddress = true
Mandatory values:
address1
address2
Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
If InternationalAddress = false
Mandatory values:
address1 and
address2 or
address3 or
Town or
County
Postcode
InternationalAddress can be true or false
PaymentMethod
String
Cannot be Null
Cannot be Left Blank
Accepted values - Cash/BACS/Cheque/Manual/CHAPS
WorkerEngagement
String
Cannot be Null
Cannot be blank
Acceptable values for workerEngagement can be: “A”, “B”, “C”, “D”, “E”, “F”
SettlementTerms must be provided if InvoiceWorkflow = "SelfBilling" or "InvoiceMatching"
ConstructionIndustryScheme
Boolean
Cannot be Null
Cannot be Left blank
Accepted values - True/False
Construction Industry Scheme must be enabled under Account Configuration
Sample PayrollDataUK -
"payrollDataUK":{
"niLetter":"A",
"starterForm":"P45",
"employeeStatement":"A",
"taxCode":"1250L",
"isWeek1":false,
"p45LeavingDate":"2022-02-02T00:00:00",
"p45Frequency":"Week",
"p45Period":"2",
"p45YtdGross":120.00,
"p45YtdTax":12.00
}
Supplied Workers (Agency & Umbrella)
Agency/Umbrella worker Add
Method:
Add a caption...
Base URL: {{publicApiUrl}}/Worker/{{accountReference}}/{{businessUnitReference}}
To add an Agency or Umbrella worker record using the public API you need to pass the account and business unit reference to the BASE URL with the required objects in the body. Refer to Appendix G containing a sample of the request body.
Note: A worker record can be created with or without contact and address objects
Property
Validations
Account
Cannot be Null
Cannot be left blank
Business Unit
Cannot be Null
Cannot be left blank
The key dependencies and validations are:
Property
Acceptable Format
Validations
Refrence
String
Cannot be null
Can be blank and the system will automatically generate a reference from the worker
Name
String
Cannot be null
You must enter a Supplier Name
SupplierReference
String
Can be null when updating the contractor worker
The response will return from the worker reference
Email
String
Cannot be null
Cannot be blank
You must enter a Supplier Email Address
You must provide a valid Supplier Email Address
String
Cannot be null
Cannot be blank
Accepted values are: “Agency” or “Umbrella”
If the EngagementType = “Umbrella” and the SupplierReference provided is an Agency then the system will inherit the worker EngagementType from the supplier.
WorkerEngagement
String
Cannot be Null
Cannot be blank
Acceptable values for workerEngagement can be: “A”, “B”, “C”, “D”, “E”, “F”
If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp
You must enter the Address Line 1
Address Line 1 must be between 1 and 35 characters
You must enter a postcode
Postcode - incorrect format
Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
InternationalAddress
Boolean
Can be true or false
If InternationalAddress = true
Mandatory values:
address1
address2
Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
If InternationalAddress = false
Mandatory values:
address1 and
address2 or
address3 or
Town or
County
Postcode
InternationalAddress can be true or false
Agency/Umbrella worker Update
Method:
Add a caption...
Base URL: {{publicApiUrl}}/Worker/{{accountReference}}/{{businessUnitReference}}
To update an Agency or Umbrella worker record using the public API you need to pass the account and business unit reference to the BASE URL with the required objects in the body. Refer to Appendix H containing a sample of the request body.
A worker record can be updated with or without contact and address objects
Property
Acceptable Format
Validations
Account
String
Cannot be Null
You must select an existing Account to add a worker
BusineesUnit
String
Cannot be Null
You must select an existing Business Unit to add a worker
Reference
String
Cannot be null
Can be blank and the system will automatically generate a reference from the worker
Name
String
Cannot be null
You must enter a Supplier Name
SupplierReference
String
Can be null when updating the contractor worker
The response will return from the worker reference
Email
String
Cannot be null
Cannot be blank
You must enter a Supplier Email Address
You must provide a valid Supplier Email Address
SuppliedEngagementType
String
Cannot be null
Cannot be blank
Accepted values are: “Agency” or “Umbrella”
If the EngagementType = “Umbrella” and the SupplierReference provided is an Agency then the system will inherit the worker EngagementType from the supplier.
WorkerEngagement
String
Cannot be Null
Cannot be blank
Acceptable values for workerEngagement can be: “A”, “B”, “C”, “D”, “E”, “F”
If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp
You must enter the Address Line 1
Address Line 1 must be between 1 and 35 characters
You must enter a postcode
Postcode - incorrect format
Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
InternationalAddress
Boolean
Can be true or false
If InternationalAddress = true
Mandatory values:
address1
address2
Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
To search a worker using a specific search term. This parameter can also be used as a "Global Search" to search for the term across all accounts and business units (user has access to)
To enable payment after leaving for a left worker, users would need to pass the account and business unit reference to the base URL, along with the worker reference.
Property
Acceptable Format
Validations
Account
String
Cannot be Null
Cannot be left blank
BusinessUnit
String
Cannot be Null
Cannot be left blank
WorkerReference
String
Cannot be Null
Cannot be left blank
For further information on worker transfers, please refer to our Payment After Leaving guide.
The contents of this document, along with any associated documents, are the property of PurePro Solutions Ltd. and are shared in strict confidence with the intended recipient. These materials may not be reproduced, shared, or used in any manner without prior written consent from PurePro Solutions Ltd. Unauthorized use or distribution is prohibited.