This help guide explains why employees or leavers may be missing from your HR API results, and how to check and correct your API key's filtering settings.
Contents
- Introduction
- Quick checklist
- Filtering settings
- How excluded people appear in the API
- Paging and query parameters
- Properties not enabled
- Good practice
Introduction
Each API key only returns the people allowed by its Filtering settings. If an employee, leaver or future starter is outside those settings, the API behaves as if they do not exist: they are left out of every entity, including PersonDetail, AllJobPay and Absence, and no error explains why.
Most cases of "missing" employees are caused by one of the following:
- The employee's record group or payroll code is not included on the key
- The employee is a leaver whose leaving date is outside the Past Leavers period
- The employee is a future starter whose start date is outside the Future Starters period
- The integration is only reading the first page of results
| Note: For full details on creating and configuring API keys, please review the API Configuration guide. |
Quick checklist
If a specific person is missing from your API results, work through these checks in order:
- Check their record group or payroll code. Open the employee's record in Ciphr HR and confirm their record group (or payroll code) is listed in the key's People Filtering.
- If they are a leaver, check their leaving date against the key's Past Leavers setting.
- If they have not started yet, check their start date against the key's Future Starters setting.
- Check your request. If you use paging, make sure every page is read (see Paging and query parameters).
- After any change, click Update at the bottom of the Filtering page. Changes, including newly added record groups, are not applied until you do.
Filtering settings
The filtering settings can be accessed via the following area:
- System Configuration > API Configuration
Click Filtering against the relevant key. The current Past Leavers and Future Starters settings for each key are also shown in the key list.
| Setting | What it controls | Options |
|---|---|---|
| Past Leavers | Which leavers are returned, based on their leaving date, counted back from today | 0 (no leavers), 1 to 12 months, or All |
| Future Starters | Which employees with a future start date are returned, counted forward from today | 0 (none until they start), 1 to 12 months, or All |
| People Filtering | Which employees the key can see, by Record Group or Payroll Code | Add or delete record groups or payroll codes using the associated buttons |
Past Leavers
The Past Leavers period is a rolling window. A leaver is returned only while their leaving date falls within the number of months selected, counted back from today. Once their leaving date moves outside the window, they drop out of all API results automatically.
For example, with Past Leavers set to 6 months on 14 October, leavers with leaving dates of 1 August, 29 May and 23 May are returned, but a leaver from 1 April is not.
| Note: A setting of 0 returns no leavers at all. If your integration needs to process leavers (for example, to disable accounts in another system), make sure the Past Leavers period is long enough for your integration to pick them up, including leavers who are processed in Ciphr HR after their leaving date. |
| Note: Each post an employee holds has its own record (PerID). If an employee leaves and is re-employed, or holds more than one post, the post they left is a leaver record and follows the Past Leavers setting, while their current post is returned as normal. Data warehouses that need full history should use All. |
Future Starters
Future Starters works in the same way for employees whose start date is in the future. With a setting of 0, new starters are not returned until their start date. If your integration needs to set up accounts or equipment before an employee starts, set a period that covers how far ahead your starters are entered.
People Filtering
Only employees in the record groups (or payroll codes) listed on the key are returned. To add one:
- Click Add under People Filtering
- Select the record group or payroll code and click Add
- Click Update at the bottom of the page to save
| Note: If an employee moves into a record group that is not on the key, they disappear from the API from that point, which can look like employees going "missing" at random. When you create a new record group, review each API key and add it where required. |
How excluded people appear in the API
The API does not tell you that a person has been filtered out. Instead, they are treated as if they do not exist:
| Request | Result for a person outside the key's filtering |
|---|---|
List or search, e.g. GET /api/PersonDetail?EmployeeNumber=<EmployeeNumber>
|
An empty list with a 200 response, and no error |
Single record, e.g. GET /api/PersonDetail/<PerID>
|
A 500 error (We have experienced a problem...), the same as for an ID that does not exist |
Related data, e.g. GET /api/AllJobPay?PerID=<PerID> or GET /api/Absence?PerID=<PerID>
|
An empty list: the filter applies to every entity, not just PersonDetail |
Create or update, e.g. POST /api/Absence
|
400 Access denied to this person |
To check how many people your key can currently see, use the count parameter:
GET https://<yoursystem>.ciphr.com/api/PersonDetail?count
{"Count": <number of people>}Compare this with the number you expect. If it is lower, review the filtering settings above.
Paging and query parameters
A request without paging parameters returns all matching records. If you use paging, the following applies:
| Request | Result |
|---|---|
/api/PersonDetail |
All records |
/api/PersonDetail?p=1 |
Only 10 records: when a page number is given without a limit, the default page size of 10 is used |
/api/PersonDetail?s=ID&p=1&l=100 |
The first 100 records, sorted by ID. Increase p until fewer than l records are returned |
Note: When paging, always include a sort (s) so that records are returned in a consistent order across pages. |
Properties not enabled
Fields can also appear to be "missing" if their properties are not enabled on the key:
- Filtering on a property that is not enabled, for example
/api/PersonDetail?WorkEmailAddress=..., returns400 Malformed query stringwithUnrecognised property. Enable Read Access on that property in the key's Configuration view. - Requesting a property that is not enabled in the
fparameter, for example?f=ID,WorkEmailAddress, does not return an error. The field is simply left out of the response.
If a field is missing from your results, check that the property is enabled on the entity in the key's Configuration view, and click Update to save.
Good practice
- Set Past Leavers to match your integration. Systems that remove access for leavers need enough months to catch late-processed leavers; data warehouses that keep history usually need All.
- Set Future Starters if you onboard in advance. With 0, new starters are not visible until their start date.
- Review API keys when record groups change. A new record group is not added to existing keys automatically.
- Always click Update. Changes on the Filtering page, including added record groups, are not applied until you save.
-
Use the count parameter to check coverage. A quick
?countafter any change confirms how many people the key can see. -
Read every page. If your integration uses paging, include
sandland loop through all pages.
Footer
Comments
0 comments
Please sign in to leave a comment.