Use Case Description
This use case helps get employees’ Work Schedule details
||Uniform Resource Identifier (URI)
||GitHub Sample Response Payload
||To retrieve the standard working hours
for an employee.
Mandatory OData Query
The $filter is mandatory and should contain a schedulePeriod of maximum one year, using the 'ge' and 'gt' operators, with an 'and' in between explaining the "from" date and the "till" date.
/workSchedules/schedulePeriod/startDate ge '2020-07-01' and /workSchedules/schedulePeriod/endDate lt '2018-07-04'
If you do not want holidays shown as a day off (which is the default behavior) you can use a queryParameter showHolidays. If showHolidays is false, holidays as defined in ADP Workforce will not be shown in the schedules.
For example, new year day is a holiday in the default schedule, so 0 hours are returned for the 1st of January. If you set showHolidays to false, the hours that would have been scheduled if Jan 1st was not a holiday are returned (This requires the option "Feestdagen in het rooster verwerken" in ADP Workforce).
The canonical URI corresponding to the Work Schedules API needs to be added in the Consumer Application Registry (CAR) for the subscription following which a user can access this API and make successful API calls.
The following canonical needs to be added to your application scope to enable this use case:
Sequence of Interactions
The following are the steps shown in the previous diagram:
- The consumer application makes a request to the ADP API endpoint for the Work Schedules API.
- The ADP API endpoint responds to the consumer application with the processing result.
The Work Schedules API exposes the GET Method. The following is the schema of the response payload.
||The workerID from ADP workforce
||The contract number from ADP Workforce
||The startDate and endDate of the $filter
||The sequence number of the result
||The date on which the total number of hours are scheduled
||The total amount of scheduled working hours
You may encounter exceptions outside your common success scenarios. You must account for these exceptions during your initial development. For more information, see API Common Exceptions and Tips for Handling.