Method ITEmployeePCN

Type: FusionOSServices.Controllers.IntelliTimeController

Summary

This service returns the following information about employees: employee ID, job title, departement, supervisor ID, record type. For each job the allowed hours are also provided grouped by hour type (Leave, Regular, OT and OT2)

Example

GET https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/Employees/E01010/JOBS

Parameters

TypeDescription
System.String If an employee ID is provided only information for that employee will be returned.

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms){

    string uri = "https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/Employees/JOBS";
    

    using (WebClient wc = new WebClient())
    {
        wc.Headers.Add("Content-Type", "application/json");
        // Replace "ID" with supplied AppID
        wc.Headers.Set("X-APPID", "ID");
        // Replace "KEY" with supplied AppKey
        wc.Headers.Set("X-APPKEY", "KEY");

        while (uri != null)
        {
            string result = wc.DownloadString(uri);

            var response = JObject.Parse(result);

            var count = (string)response["RequestResponse"]["Count"];
            var employees = (JContainer)response["RequestResponse"]["DATA"]["EMPLOYEES"];

            foreach (var employee in employees)
            {
                // Your code goes here
                string employeeId = (string)employee["IDA"];
                
                foreach(var job in employee["PCN"])
                {
                    string jobDescription = (string)job["LONGDESC"];
                    string departement = (string)job["DEPARTMENT"];
                    string recordType = (string)job["RECTYPE"];
                    string supervisorId = (string)job["SUPERID"];
                    foreach(var hour in job["HOURS"])
                    {
                        string hourNumber = (string)hour["CDHNO"];
                        string hourDescription = (string)hour["CDHTITLE"];
                    }
                }
            }
            // responses with more then 1000 employees are broken up into multiple requests
            uri = (string)response["RequestResponse"]["NextUri"];
        }
    }
}

Sample Responses


                        
            {
              "RequestResponse": {
                "Count": "1",
                "DATA": {
                  "EMPLOYEES": [
                    {
                      "DEPARTMENT": "04",
                      "IDA": "E00011",
                      "PCN": [
                        {
                          "DEPARTMENT": "",
                          "IDA": "E00011",
                          "PCN": "000041",
                          "RECTYPE": "PM",
                          "LONGDESC": "ACCOUNTING TECHNICIAN",
                          "POSLONG": "ACCOUNTING TECHNICIAN",
                          "SUPERID": "E00001",
                          "HOURS": [
                            {
                              "HOUR": [
                                {
                                  "CDHNO": "3002",
                                  "CDHTITLE": "SALARY"
                                },
                                {
                                  "CDHNO": "3200",
                                  "CDHTITLE": "OVERTIME"
                                },
                                {
                                  "CDHNO": "3270",
                                  "CDHTITLE": "FLSA1 OVERTIME -MISC"
                                },
                                {
                                  "CDHNO": "3402",
                                  "CDHTITLE": "VACATION USED"
                                },
                                {
                                  "CDHNO": "3422",
                                  "CDHTITLE": "SICK USED"
                                },
                                {
                                  "CDHNO": "3432",
                                  "CDHTITLE": "SICK USED-FAMILY"
                                },
                                {
                                  "CDHNO": "3442",
                                  "CDHTITLE": "PERSONAL USED"
                                },
                                {
                                  "CDHNO": "3488",
                                  "CDHTITLE": "COMP USED"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }