Affinity Client Web API (4.0)

Download OpenAPI specification:Download

Welcome

Thank you for choosing our API. We've designed it to provide you with a seamless, efficient experience when handling large volumes of data. But first, let us help you get the most out of our API — from a technical standpoint overall and recommended best practice for inbound data.

About the API

The Affinity Client Web API lets clients send data direct to Affinity with the purpose of either creating, updating, or deleting/declining Affinity records. These records can be masterfiles, such as employees (deletions are prevented), departments and positions, or transactions such as timesheets, leave and work schedules.

Our API is designed around REST. It has a predictable resource-oriented URL, uses standard HTTP bearer authentication, and returns standard HTTP response codes. All requests return JSON. put can be used to create or update objects. When creating/updating Affinity resources, you have a few options:

  1. Thanks to the wait_for_completion request parameter, the API can be used either synchronously or asynchronously. If you choose to wait for completion, the API response will only occur after the create/update is complete.
  2. If you wish to verify whether or not a create/update will pass validation, you can choose to validate only.
  3. When doing a bulk create/update, you can specify whether to continue with subsequent records if validation fails for one or more records.

Documentation

Our API is defined using the OpenAPI Specification (OAS) v3.02. This industry-standard model allows us to define how our API functions and what you should expect from it. We describe in detail all available resources along with each request parameter — including data types, formatting, rules, plus sample values and if they are required. We also provide all of the errors and responses, along with schemas and sample data.

API version history

Release management

The latest version of the Affinity Web API is V4 and was released in May 2024. Whenever we release new versions of the API (or deprecate older versions), we update this documentation.

Additional response properties

From time to time, we may add new properties to responses. Your application must be able to cope with extra properties by ignoring them.

Release history

2024: v4 released with new standard objects.

Getting started

The API endpoint

All requests must be made using HTTPS against this URL: https://api.testaffinitylogon.com/.

Authentication

Our API uses bearer authentication over HTTPS. We provide you with a bearer token which you then use to verify that you are an authorised user. You do this by passing this bearer token in the HTTP header with every request. A request includes the basic authentication header with the Authorization field followed by the word 'Bearer' (indicating the type of authentication), and the encoded user credentials:

Authorization: Bearer some-opaque-token-goes-here

When authentication fails, error code 401 (Unauthorised) is returned, and the body includes this message:

Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.

Content-Type

The API currently only supports JSON-encoded data in requests and responses. You should provide either the Content-Type and Accept headers with the value application/json (or both) to identify both the request and response formats. For example:

Content-Type: application/json

Data quality and frequency

Blanks, duplicated data, and whole masterfile records

Sending blanks and data that has already been sent will slow things down, so please avoid this. The Affinity system only requires a single record containing the identifier, the field that changed, and optionally the effective date of that change — not the entire record.

Bulk updates

Sending multiple updates in a single request is more efficient than separate individual requests. Where possible, please batch updates into one request.

Frequency of sends

Think about how often you send data. To optimise processing, best practice is to consider the nature of the data and to align sends with your application and payroll needs. We reserve the right to limit connections in line with our fair use policy.

Effective date

For effective-date-enabled data, each transaction can contain an effective date. If no effective date is supplied, the Affinity system will assume the effective date is today's date.

Fair use policy

We believe in providing fair and equitable access to all of our clients — regardless of their size or complexity. Our fair use policy places some controls around the number of transactions that can be sent via our API. We do this to ensure that things run smoothly for everyone, and to maintain overall service stability.

Transaction limits and reasonable use

Our fair use policy is built on the principle of reasonable use. The daily transaction limit is meant to accommodate regular usage patterns. If you think you might exceed this limit (or you have specific requirements that necessitate a higher limit), please contact us to discuss a tailored solution. The following assumes that there are no duplications of the same records:

  • Timesheets: Unlimited, with a minimum processing capacity of 3,000 per hour.
  • Masterfiles and lookups: 10,000 updates per day.

The inbound masterfiles limit is designed to prevent abuse, ensure equitable access, and optimise performance for all clients.

Monitoring

We monitor API usage to ensure compliance with our fair use policy. If you exceed the daily transaction limit we will notify you straight away. We’ll provide details about the exceeded limit, actions taken (if any), and guidance on how to comply.

Periodic review and updates

We review our fair use policy regularly to ensure it continues to meet the needs of our clients and aligns to industry standards. As such, we may update this policy from time to time.

Request data types

GUID fields

We use RFC 4122 GUIDs, represented as a string with the structure xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx where each x is a hexidecimal character. GUIDs are not case sensitive.

Dates and date-times

We use ISO8601 dates/times. Dates must be formatted as YYYY-MM-DD. Times must be formatted as HH:MM. Dates/times are assumed to be in local time and must be formatted as YYYY-MM-DDTHH:MM:SS.

API requests

Get the details of any specific API request.

Our API is designed to be either synchronous or asyncronous. If you start an asyncronous request, you can use this to poll for the details and to find out the results.

Authorizations:
Bearer
path Parameters
apiRequestId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "path": "string",
  • "started_at_utc": "string",
  • "completed_at_utc": "string",
  • "total_records": 0,
  • "records_imported_successfully": 0,
  • "records_that_failed_to_import": 0,
  • "import_results": [
    ]
}

Audit logs

Get the audit logs for a particular employee.

Get all the audit logs for a particular employee, since a particular timestamp.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
sinceTimestamp
required
string <date-time>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Multiple employees

Retrieve combined information for multiple employees.

Returns a wide range of personal and payroll information about one or more employees. You can opt to include or exclude terminated employees and refine using several parameters including pay point.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update combined information for multiple employees.

Lets you update the existing personal and payroll details for one or more employees, or create new entries.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeeCombinedIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve biographical information for multiple employees.

Returns a wide range of personal information about one or more employees — from names and contact information through to start and termination dates. You can opt to include or exclude terminated employees and refine using several parameters including pay point.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update biographical information for multiple employees.

Lets you update the existing personal details for one or more employees (including names and contact details), or create new entries.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeeBiographicalIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve bank account details for multiple employees.

Returns the details of employee balance accounts (their primary bank accounts) and up to five additional accounts (per employee) as an array.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update bank details for multiple employees.

Lets you update the details of employee balance accounts (their primary bank accounts) and up to five additional accounts (per employee), or create new entries.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeeBankAccountsIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve emergency contact details for multiple employees.

Returns the details of employee emergency contacts.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update emergency contact details for multiple employees.

Lets you update the details of employee emergency contacts, or create new entries.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeeEmergencyContactIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve leave balances for one or more employees.

Returns a range of leave accrual and entitlement balances for all standard leave types that hold a balance (annual leave, sick leave, long service leave) along with customised leave (Leave C, D and E in Affinity).

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update leave balances for one or more employees.

Lets you update a range of leave accrual and entitlement balances for all standard leave types that hold a balance (annual leave, sick leave, long service leave) along with customised leave (Leave C, D and E in Affinity).

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeeLeaveBalancesIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve organisational details for multiple employees.

Returns a range of organisational details for one or more employees.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update organisational details for multiple employees.

Updates existing organisational details for one or more employees, or creates new entries.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeeOrganisationalIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve pay components for multiple employees.

Returns a range of pay components for one or more employees.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update pay components for multiple employees.

Updates existing pay components for one or more employees, or creates new entries.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeePayComponentIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve pay details for multiple employees.

Returns a range of pay details for one or more employees.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update pay details for multiple employees.

Updates existing pay details for one or more employees, or creates new entries.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeePayDetailIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve superannuation details for multiple employees.

This request returns a range of superannuation information for one or more employees.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update superannuation details for multiple employees.

This request updates existing superannuation information for one or more employees, or creates new entries.

Authorizations:
Bearer
query Parameters
create_empad
boolean
Default: false
Request Body schema: application/json
required
Array of objects (EmployeeSuperannuationIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Retrieve tax declaration details for multiple employees.

This request returns a range of tax declaration information for one or more employees. Tax declaration forms are completed by employees via an HR system and the results are stored in Affinity which then determines STP details based on those results.

Authorizations:
Bearer
query Parameters
idType
string
Enum: "Guid" "Number"
employeeIds
Array of strings
payPoints
Array of integers <int32> [ items <int32 > ]
includeTerminated
boolean
Default: false

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update one or more employee tax declarations.

This request updates existing tax declaration information for one or more employees, or creates new entries. Tax declaration forms are completed by employees via an HR system and the results are stored in Affinity which then determines STP details based on those results.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (EmployeeTaxDeclarationIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}

Pay points

Return all pay points (pay groups).

Returns an array of all pay points. Each entry in the array is a separate pay point object. If there are no more pay points, the resulting array will be empty.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve accounting dates for a specified pay point.

Returns an array of accounting dates for a specified pay point. The array is from six months ago to 18 months ahead. Some background about accounting dates. Automatic resets of YTD and MTD totals are critical to payroll reporting. Some organisations use calendar months for month-end financial reporting and others use specific dates. For instance, while March officially ends on the 31st, a company might choose 28 March as its accounting month-end, coinciding with the last Sunday of the month, and apply similar criteria for other months. The Affinity system needs the length of each reporting period to be standardised so it can identify an organisation’s forthcoming month-end date in order to initiate the appropriate resets during the first payroll cycle after the designated month-end date, allowing for consistent month-over-month comparisons. For example, a payroll executed on 27 March would contribute to March's MTD totals. However, a payroll processed on 3 April, following the company's specific month-end date, would reset the MTD figures, marking the commencement of a new financial month.

Authorizations:
Bearer
path Parameters
payPointNo
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "pay_point_no": 1,
  • "month_to_date_based_on": "Calendar month",
  • "accounting_months": [
    ]
}

Create or update accounting month-end dates for a single pay point.

Lets you create additional month-end dates or update existing month-end dates for a single pay point. Some background about accounting dates. Automatic resets of YTD and MTD totals are critical to payroll reporting. Some organisations use calendar months for month-end financial reporting and others use specific dates. For instance, while March officially ends on the 31st, a company might choose 28 March as its accounting month-end, coinciding with the last Sunday of the month, and apply similar criteria for other months. The Affinity system needs the length of each reporting period to be standardised so it can identify an organisation’s forthcoming month-end date in order to initiate the appropriate resets during the first payroll cycle after the designated month-end date, allowing for consistent month-over-month comparisons. For example, a payroll executed on 27 March would contribute to March's MTD totals. However, a payroll processed on 3 April, following the company's specific month-end date, would reset the MTD figures, marking the commencement of a new financial month.

Authorizations:
Bearer
path Parameters
payPointNo
required
integer <int32>
Request Body schema:
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}

Payroll costs

Retrieve payroll-costing information per timesheet.

Returns payroll-costing data based on timesheet transactions that have been processed in pay runs. Data from standard timesheet cost elements is returned (cost centres, projects, tasks etc.), along with any custom cost elements that the organisation uses.

Authorizations:
Bearer
path Parameters
payrollCostIdType
required
string
Enum: "TimesheetGuid" "IntegrationId" "ExternalReference"
payrollCostId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve payroll-costing information by timesheet for a selected employee.

Returns payroll-costing data based on timesheet transactions that have been processed in a specified pay period for a single employee. Data from standard timesheet cost elements is returned (cost centres, projects, tasks etc.), along with any custom cost elements that the organisation uses.

Authorizations:
Bearer
path Parameters
employeeIdType
required
string
Enum: "EmployeeGuid" "EmployeeNumber"
employeeId
required
string
periodEndDate
required
string <date>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve payroll-costing information by timesheet for all employees for a given pay point and pay period.

Returns payroll-costing data based on timesheet transactions that have been processed in a specified pay point and pay period. Data from standard timesheet cost elements is returned (cost centres, projects, tasks etc.), along with any custom cost elements that the organisation uses.

Authorizations:
Bearer
path Parameters
payPoint
required
integer <int32>
periodEndDate
required
string <date>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve payroll-costing information by timesheet for all employees in all payruns after a given payroll processing date/time.

Returns payroll-costing data based on timesheet transactions that have been processed in a specified pay point and pay period. Data from standard timesheet cost elements is returned (cost centres, projects, tasks etc.), along with any custom cost elements that the organisation uses.

Authorizations:
Bearer
path Parameters
payrunProcessedAt
required
string <date-time>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Single employee

Retrieve biographical information for a single employee.

Returns a wide range of personal information about a single employee — from name and contact information through to start and termination dates.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
{
  • "employee_guid": "string",
  • "employee_no": 0,
  • "pay_point_no": 0,
  • "first_names": "string",
  • "surname": "string",
  • "common_name": "string",
  • "title": "strin",
  • "preferred_name": "string",
  • "residential_address": {
    },
  • "nationality": "string",
  • "gender": "Not specified",
  • "birth_date": "2019-08-24",
  • "personal_email": "string",
  • "work_email": "string",
  • "mobile_phone": "string",
  • "home_phone": "string",
  • "work_phone": "string",
  • "pay_location": "string",
  • "start_date": "2019-08-24",
  • "termination_date": "2019-08-24",
  • "employee_position": "string",
  • "manager_employee_no": 0,
  • "record_version": 0
}

Create or update biographical information for one employee.

Lets you update the personal details of a single employee — including name and contact details — or create brand new entries.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Retrieve bank account details for one employee.

Returns the details of an employee's balance account (their primary bank account) and up to five additional accounts as an array.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
{
  • "employee_guid": "string",
  • "employee_no": 0,
  • "balance_account": {
    },
  • "additional_accounts": [
    ],
  • "record_version": 0
}

Create or update bank account details for one employee.

Lets you update the details of an employee's existing balance account (their primary bank account) and up to five additional accounts, or create new entries.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Retrieve emergency contact information for a single employee.

Returns the details of the emergency contact for a single employee.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
{
  • "employee_guid": "string",
  • "employee_no": 0,
  • "emergency_contact_name": "string",
  • "relationship_to_employee": "string",
  • "address": {
    },
  • "mobile_phone": "string",
  • "home_phone": "string",
  • "work_phone": "string",
  • "record_version": 0
}

Create or update emergency contact information for one employee.

Lets you update the emergency contact information for a single employee.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Retrieve leave balances for a single employee.

Returns a range of leave accrual and entitlement balances for all standard leave types that hold a balance (annual leave, sick leave, long service leave) along with customised leave (Leave C, D and E in Affinity).

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
{
  • "employee_guid": "string",
  • "employee_no": 0,
  • "annual_leave": {
    },
  • "sick_leave": {
    },
  • "long_service_leave": {
    },
  • "leave_c": {
    },
  • "leave_d": {
    },
  • "leave_e": {
    },
  • "record_version": 0
}

Update leave balances for a single employee.

Lets you update a range of leave accrual and entitlement balances for all standard leave types that hold a balance (annual leave, sick leave, long service leave) along with customised leave (Leave C, D and E in Affinity).

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Retrieve pay components for one employee.

Returns pay components for a single employee.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve payroll details for one employee.

Returns payroll details for a single employee.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
{
  • "employee_guid": "string",
  • "employee_no": 0,
  • "pay_point_no": 0,
  • "pay_type": "Salaried",
  • "annual_salary": 0.1,
  • "rate_1": 0.1,
  • "rate_2": 0.1,
  • "rate_3": 0.1,
  • "rate_4": 0.1,
  • "rate_5": 0.1,
  • "rate_6": 0.1,
  • "rate_7": 0.1,
  • "rate_8": 0.1,
  • "rate_9": 0.1,
  • "rate_service_date": "2019-08-24",
  • "rate_table_id": "string",
  • "rate_table_step": "string",
  • "service_start_date": "2019-08-24",
  • "total_remuneration": 0.1,
  • "suspend_from": "2019-08-24",
  • "suspend_until": "2019-08-24",
  • "worker_type": "Part-time, temporary (0)",
  • "award_id": "string",
  • "ta_award_id": "string",
  • "std_hours_per_day": 0.1,
  • "std_hours_per_week": 0.1,
  • "record_version": 0
}

Create or update payroll details for one employee.

Allows you to either update existing payroll details information for a single employee, or create new entries.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Retrieve organisational details for one employee.

Returns organisational details for a single employee.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
{
  • "employee_guid": "string",
  • "employee_no": 0,
  • "employee_position": "string",
  • "fte": 0.1,
  • "branch": "string",
  • "department": "string",
  • "division": "string",
  • "group": "string",
  • "pay_location": "string",
  • "ess_group": "string",
  • "cost_centres": [
    ],
  • "contractor_abn": "string",
  • "record_version": 0
}

Create or update organisational details for one employee.

Allows you to either update existing organisational details information for a single employee, or create new entries.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Retrieve superannuation details for one employee.

Returns superannuation details for a single employee. Note that there are different requirements for self-managed Super funds (SMSFs) than for other types of fund. These are explained in the individual field descriptions.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
effectiveDate
string <date>

The effective date of the data. 'Effective date' is the date when a value comes into effect in a record. For example, a pay rate increase. If no effective date is supplied then the data in the record as at the current period-end date will be returned.

Responses

Response samples

Content type
application/json
{
  • "employee_guid": "string",
  • "employee_no": 0,
  • "status": "Active",
  • "amount": 0.1,
  • "amount_type": "Percentage",
  • "super_type": "Employer contribution",
  • "fund_name": "string",
  • "fund_abn": "string",
  • "fund_usi": "string",
  • "fund_spin": "string",
  • "member_number": "string",
  • "fund_contact_name": "string",
  • "fund_address": {
    },
  • "fund_email": "string",
  • "fund_phone": "string",
  • "fund_account_name": "string",
  • "fund_bank_account": "string",
  • "fund_esa": "string",
  • "record_version": 0
}

Create or update superannuation details for one employee.

Allows you to either update existing superannuation information for a single employee, or create new entries.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Retrieve tax declaration details for one employee.

Returns tax declaration details for a single employee. Tax declaration forms are completed by employees via an HR system and the results are stored in Affinity which then determines STP details based on those results.

Authorizations:
Bearer
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "tax_declaration_id": "string",
  • "employee_guid": "string",
  • "employee_no": 0,
  • "declaration_date": "2019-08-24",
  • "tax_number": "string",
  • "reason_no_number": "string",
  • "primary_email": "string",
  • "prior_surname": "string",
  • "basis_of_payment": "Full-time",
  • "australian_resident": true,
  • "working_holiday_maker": true,
  • "claim_tax_free_threshold": true,
  • "claim_pensioners_offset": true,
  • "claim_zone_offset": true,
  • "visa_country": "st",
  • "has_stlr": true,
  • "seasonal_worker": true,
  • "information_correct": true,
  • "tax_treatment_code": "string",
  • "record_version": 0
}

Create or update tax declaration details for one employee.

Allows you to either update existing tax declaration information for a single employee, or create new entries. Tax declaration forms are completed by employees via an HR system and the results are stored in Affinity which then determines STP details based on those results.

Authorizations:
Bearer
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Delete tax declaration details for one employee.

Lets you delete existing tax declaration information for a single employee. Tax declaration forms are completed by employees via an HR system and the results are stored in Affinity which then determines STP details based on those results.

Authorizations:
Bearer
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "record_key": "string",
  • "message": "string"
}

Retrieve tax declaration details for one employee.

This request uses two mandatory parameters (idType and employeeId) to retrieve tax declaration information for a specific employee. Tax declaration forms are completed by employees via an HR system and the results are stored in Affinity which then determines STP details based on those results.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update tax declaration details for one employee.

This request uses three mandatory parameters (idType, employeeId, declarationDate) to either update tax declaration information for a specific employee or create new entries. Tax declaration forms are completed by employees via an HR system and the results are stored in Affinity which then determines STP details based on those results.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
declarationDate
required
string <date>
Request Body schema:
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

xxx

xxx

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "Number"
employeeId
required
string
query Parameters
dateFrom
string <date>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update a signifacnt date.

Authorizations:
Bearer
Request Body schema:
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Timesheets

Get a single timesheet.

Returns a single timesheet, including start and finish times, units, unit rates, pay elements, and costing allocations.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "ExternalReference"
timesheetId
required
string

Responses

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Create or update information in a single timesheet.

Lets you update an individual timesheet or create a new timesheet by the timesheetId.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "ExternalReference"
timesheetId
required
string
Request Body schema: application/json
required
object
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "wait_for_completion": true,
  • "validate_only": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Delete a single timesheet.

Lets you delete a single timesheet by the external refernce.

Authorizations:
Bearer
path Parameters
idType
required
string
Enum: "Guid" "ExternalReference"
timesheetId
required
string

Responses

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": {
    }
}

Get timesheets for one pay point and one timesheet date.

Returns timesheets for exactly one pay point and date combo, including start and finish times, units, unit rates, pay elements, and costing allocations.

Authorizations:
Bearer
query Parameters
payPoint
integer <int32>
timesheetDate
string <date>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update information in multiple timesheets.

Lets you update multiple timesheets or create new timesheets.

Authorizations:
Bearer
Request Body schema: application/json
required
Array of objects (TimesheetIn)
wait_for_completion
boolean or null
Default: true

Determines whether to wait for the request to completely import. If set to true (the default if not specified), the request will wait for the entire import to complete before returning a response. If set to false, the request will immediately return a 204 response and the import will continue in the background. The status of the import can be monitored using the ApiRequest endpoint.

validate_only
boolean or null
Default: false

Determines whether to only validate the request without importing any data. If set to true, the request will validate the data and return any validation errors without importing any data. If set to false (the default if not specified), the request will both validate the data, and import it if validation succeeded.

continue_on_validation_failure
boolean or null
Default: false

Determines whether to continue processing subsequent records if validation fails. If set to false (the default if not specified), the first validation failure will cause the entire request to fail and no records will be imported. If set to true, any records that fail validation will be skipped and the remaining records will be imported.

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "wait_for_completion": true,
  • "validate_only": false,
  • "continue_on_validation_failure": false
}

Response samples

Content type
application/json
{
  • "api_request_id": "string",
  • "data": [
    ]
}