WebAPI – How to get canceled and closed work orders assigned to the employee?

WebAPI – How to get canceled and closed work orders assigned to the employee?

This method returns a list with the key of the canceled and closed work orders assigned to each employee from a specific company.
The method to be used to get the work orders list assigned to the employee is:

GET /api/mytenant/myorganization/maintenance/workorders/GetWorkOrdersCanceledClosedByEmployee?modifiedOn=1900-01-01T00:00:00.0%2B00:00&assignedTo=user@domain.com&maxRecords=100&daysLimit=30&company=DEMO

The method parameters are optional, however, the method receives the employee to filter WOs.
If the parameter maxRecords is not specified, it returns a maximum of 100 records. The logic is the following:
  1. modifiedOn: date of the last synchronized work order;
  2. assignedTo: returns all WOs assigned to that employee, this parameter must be the username
  3. maxRecords: number of WOs to be returned, this parameter must be an integer, equal or inferior to 200
  4. daysLimit: returns all WOs assigned with a creation date inferior to the number of days defined in this parameter
  5. company: returns all WOs for the selected company, if not specified, the first company on the company list will be considered.

The server returns an answer HttpStatusCode.OK, with the WOs assigned to the employee.
If the parameter maxRecords is specified and the value is equal or inferior to 200, it returns the number of records.
If the parameter value is higher than 200, it returns an error message.