Timesheets - API Requests

This document provides information about the PurePro public API endpoints associated with timesheet operations and their objects.
Common operations;
Please select one of the options below: -

TIMESHEETS

GET

Method:
BaseURL: {{publicApiUrl}}/Timesheet/{{accountReference}}/{{businessUnitReference}}/Timesheet_REF
To retrieve details for a specific timesheet. To retrieve timesheet details, users would need to pass account and business unit reference to the base URL, along with the timesheet reference.
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
Timesheet
String
  • Cannot be Null
  • Cannot be left blank

Timesheet Add from Placement

Method:
Base URL: {{publicApiUrl}}/Timesheet/{{accountReference}}/{{businessUnitReference}}
To add a timesheet record from an existing placement 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 M  containing a sample of the request body.
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
The key dependencies and validations are:
Property
Acceptable Format
Validations
PlacementReference
String
  • Cannot be null
  • Cannot be blank
  • You must input a placement reference
Reference
String
  • Can be null
  • Cannot be blank
  • You must input a timesheet reference
Date
Date Time
  • Cannot be null
  • Cannot be blank
  • You must input a timesheet date
  • Acceptable format: "2020-06-22T00:00:00"
WorkedPeriodID
String
  • Can be null
  • Can be blank
  • Can be provided as 0
ExternalReference
String
  • Can be null
  • Can be blank
SupressNotification
Boolean
  • Cannot be null
  • Cannot be blank
  • You must input a valid value
  • accepted values are: “true”, “false”
Final
Boolean
  • Cannot be null
  • Cannot be blank
  • You must input a valid value;
  • Accepted values are “true”, “false”
APIBatch
Boolean
  • Can be Null
  • Can be blank
  • Accepted values are “true”, “false”
  • Will use default value of "true" if not provided
Timesheets with APIBatch set as "true" will not be processed automatically for payroll & invoicing. These invoices will be added as "Pending" and can be processed from {Account → Pending Invoices}.
BackingData
String
  • Can be null (if allowed in the billing scheme)
  • Can be blank (if allowed in the billing scheme)
  • Cannot be null (if set as required in the billing scheme)
  • Or input the following object in the body
Backing data records can only be added if they are enabled in the billing scheme
TimesheetRates
String
Timesheet Rates records must be provided.
  • Cannot be null
  • Cannot be blank
  • Following dependencies apply when providing Timesheet rates: -
  • rateReference cannot be null or blank
  • Description can be null or blank
  • Number of units cannot be null or blank.
  • Unit reference can be null or blank
  • Pay rate cannot be null or blank
  • Pay VAT code can be null
  • If Pay VAT code is not provided, system will use the default value V0 (Zero rated VAT code)
  • Bill Rate cannot be blank or null
  • Delete cannot be blank or null; accepted values are “true”, “false”
InheritFromPLacementRates
String
  • Cannot be null
  • Cannot be blank
  • You must input a valid value;
  • accepted values are: “true”, “false”
Sample Timesheet Backing Data -
"backingData": {
"consultantReference": "CS1000002",
"costCentre": "CS1000005",
"purchaseOrder": "CU10005A",
"industrySector": "IS0000001",
"jobClassification": "JC0000001",
"jobTitle": "JT0000001",
"HiringManagerContact": "3DD",
"WorkLocationAddress": "3DD",
"BillingAddress": "3DD",
"BillingContact": "3DD",
"externalReference": "EXT-1234",
"hasConsultantSplits": false,
"customBackingData": null
},
Sample Timesheet Rates -
"timesheetRates": [
{
"rateReference": "1000",
"description": null,
"numberOfUnits": 39.5,
"unitReference": "",
"payRate": 11.14,
"payVatCode": "V1",
"billRate": 0,
"billVatCode": "V1",
"delete": false
},
{
"rateReference": "1001",
"description": null,
"numberOfUnits": 0,
"unitReference": null,
"payRate": 16.71,
"payVatCode": "V1",
"billRate": 0,
"billVatCode": "V1",
"delete": false
}
],

Timesheet Add (Auto Create Placement)

Method:
Base URL: {{publicApiUrl}}/Timesheet/{{accountReference}}/{{businessUnitReference}}
To add a timesheet record without an existing placement 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 N  containing a sample of the request body.
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
The key dependencies and validations are:
Property
Acceptable Format
Validations
WorkerReference
String
  • Cannot be null
  • Cannot be blank
  • You must input a worker reference
CustomerReference
String
  • Can be null
  • Cannot be blank
  • You must input a customer reference
Reference
String
  • Cannot be null
  • Cannot be blank
  • You must input a worker reference
Date
Date Time
  • Cannot be null
  • Cannot be blank
  • You must input a timesheet date
  • Acceptable format: "2020-06-22T00:00:00"
WorkedPeriodID
String
  • Can be null
  • Can be blank
  • Can be provided as 0
ExternalReference
String
  • Can be null
  • Can be blank
SupressNotification
Boolean
  • Cannot be null
  • Cannot be blank
  • You must input a valid value
  • accepted values are: “true”, “false”
Final
Boolean
  • Cannot be null
  • Cannot be blank
  • You must input a valid value;
  • Accepted values are “true”, “false”
APIBatch
Boolean
  • Can be Null
  • Can be blank
  • Accepted values are “true”, “false”
  • Will use default value of "true" if not provided
Timesheets with APIBatch set as "true" will not be processed automatically for payroll & invoicing. These invoices will be added as "Pending" and can be processed from {Account → Pending Invoices}.
BackingData
String
  • Can be null (if allowed in the billing scheme)
  • Can be blank (if allowed in the billing scheme)
  • Cannot be null (if set as required in the billing scheme)
  • Or input the following object in the body
Backing data records can only be added if they are enabled in the billing scheme
TimesheetRates
String
Timesheet Rates records must be provided.
  • Cannot be null
  • Cannot be blank
  • Following dependencies apply when providing Timesheet rates: -
  • rateReference cannot be null or blank
  • Description can be null or blank
  • Number of units cannot be null or blank.
  • Unit reference can be null or blank
  • Pay rate cannot be null or blank
  • Pay VAT code can be null
  • If Pay VAT code is not provided, system will use the default value V0 (Zero rated VAT code)
  • Bill Rate cannot be blank or null
  • Delete cannot be blank or null; accepted values are “true”, “false”
InheritFromPLacementRates
String
  • Cannot be null
  • Cannot be blank
  • You must input a valid value;
  • accepted values are: “true”, “false”
Sample Timesheet Backing Data -
"backingData": {
"consultantReference": "CS1000002",
"costCentre": "CS1000005",
"purchaseOrder": "CU10005A",
"industrySector": "IS0000001",
"jobClassification": "JC0000001",
"jobTitle": "JT0000001",
"HiringManagerContact": "3DD",
"WorkLocationAddress": "3DD",
"BillingAddress": "3DD",
"BillingContact": "3DD",
"externalReference": "EXT-1234",
"hasConsultantSplits": false,
"customBackingData": null
},
Sample Timesheet Rates -
"timesheetRates": [
{
"rateReference": "1000",
"description": null,
"numberOfUnits": 39.5,
"unitReference": "",
"payRate": 11.14,
"payVatCode": "V1",
"billRate": 0,
"billVatCode": "V1",
"delete": false
},
{
"rateReference": "1001",
"description": null,
"numberOfUnits": 0,
"unitReference": null,
"payRate": 16.71,
"payVatCode": "V1",
"billRate": 0,
"billVatCode": "V1",
"delete": false
}
],

Timesheet Update

Method:
Base URL: {{publicApiUrl}}/Timesheet/{{accountReference}}/{{businessUnitReference}}
To update a timesheet 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 O  containing a sample of the request body.
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
The key dependencies and validations are:
Property
Acceptable Format
Validations
Reference
String
  • Cannot be null
  • Cannot be blank
  • You must input a worker reference
Date
Date Time
  • Cannot be null
  • Cannot be blank
  • You must input a timesheet date
  • Acceptable format: "2020-06-22T00:00:00"
WorkedPeriodID
String
  • Can be null
  • Can be blank
  • Can be provided as 0
ExternalReference
String
  • Can be null
  • Can be blank
SupressNotification
Boolean
  • Cannot be null
  • Cannot be blank
  • You must input a valid value
  • accepted values are: “true”, “false”
Final
Boolean
  • Cannot be null
  • Cannot be blank
  • You must input a valid value;
  • Accepted values are “true”, “false”
APIBatch
Boolean
  • Can be Null
  • Can be blank
  • Accepted values are “true”, “false”
  • Will use default value of "true" if not provided
Timesheets with APIBatch set as "true" will not be processed automatically for payroll & invoicing. These invoices will be added as "Pending" and can be processed from {Account → Pending Invoices}.
BackingData
String
  • Can be null (if allowed in the billing scheme)
  • Can be blank (if allowed in the billing scheme)
  • Cannot be null (if set as required in the billing scheme)
  • Or input the following object in the body
Backing data records can only be added if they are enabled in the billing scheme
TimesheetRates
String
Timesheet Rates records must be provided.
  • Cannot be null
  • Cannot be blank
  • Following dependencies apply when providing Timesheet rates: -
  • rateReference cannot be null or blank
  • Description can be null or blank
  • Number of units cannot be null or blank.
  • Unit reference can be null or blank
  • Pay rate cannot be null or blank
  • Pay VAT code can be null
  • If Pay VAT code is not provided, system will use the default value V0 (Zero rated VAT code)
  • Bill Rate cannot be blank or null
  • Delete cannot be blank or null; accepted values are “true”, “false”
Sample Timesheet Rates -
"timesheetRates": [
{
"Description": "Basic Payz",
"rateReference": "1000",
"numberOfUnits": 14.00,
"payVatCode": "V1",
"payRate": 14.57,
"billVatCode": "V1",
"billRate": 99,
"UnitReference": "Hour"
}]

Timesheet Batch Delete

Method:
Base URL: {{publicApiUrl}}/Timesheet/{{accountReference}}/{{businessUnitReference}}/DeleteTimesheets
To delete multiple timesheets simultaneously within the current payroll cycle. To delete timesheets, users would need to pass account and business unit reference to the base url,
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
The key dependencies and validations are:
Property
Acceptable Format
Validations
AccountReference
String
  • Cannot be Null
  • Cannot be left blank
BusinessUnit
String
  • Cannot be Null
  • Cannot be left blank
PeriodID
String
  • Cannot be Null
  • Cannot be left blank
  • You must provide the current period id
TimesheetReference
String
  • Cannot be null
  • Cannot be blank
  • You must provide at least one valid timesheet reference
  • When providing multiple timesheet references, use "," to separate each timesheet reference


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.