The YourPayroll API supports OData (v3) filtering for most GET operations.
OData Query Parameters:
The following OData query parameters are supported. Please note that
$expand is not supported. Refer http://msdn.microsoft.com/en-us/library/gg309461.aspx for more information about OData query parameters
$skip: number of results to skip. e.g.: to skip the first 20 results:
$top: number of results to retrieve. e.g.: to retrieve the first 10 results:
$orderby: specify the field(s) used to order the collection of results
$select: specify a subset of properties to return. Note that $select is only currently supported for the Employee API
$filter: filter on field values. e.g.:
$filter=FirstName eq 'Paul'
NOTE: property names for filtering are capitalised. This is different to the camelCase property names returned in the JSON results
- See http://msdn.microsoft.com/en-us/library/hh169248(v=nav.71).aspx for more information on available filter operations
The employee list API limits the number of results to 100 per request. To retrieve all results, paging must be implemented:
- retrieve first 100 records:
- retrieve the next 100 records:
- The following query would return all pay categories that have a default super rate that is not 9.5%
/api/v2/business/39/paycategory?$filter=DefaultSuperRate ne 9.5M (note the ‘M’ is required in ‘9.5M’ to specify the value as a decimal)
- The following query would return timesheets that start after 1/4/2016
/api/v2/business/39/timesheet?$filter=StartTime gt datetime'2016-04-01T00:00:00'
The following query would return work types ordered by name
- Subset of properties
The following query would return the Id,First name, Surname and date of birth (the first 100) employees