Method ITLeaveTransactions

Type: FusionOSServices.Controllers.IntelliTimeController

Summary

This service returns the information about employee leave transactions

Example

GET https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/LeaveTransactions/2016-12-31/01050000

Parameters

TypeDescription
System.String If a date is provided, only leave transaction that occured on or after that date will be returned.
System.String If an employee ID is provided only information for that employee will be returned. If ID employee is provided, then a report date must be provided as well.

Sample Code

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

public void MethodName(parms){

    string uri = "https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/LeaveTransactions/2015-12-31";
    

    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 transactions = (JContainer)response["RequestResponse"]["DATA"]["Transaction"];

            foreach (var transaction in transactions )
            {
                // Your code goes here
                string leaveType = (string)transactions["LeaveType"];
                string transactionsDescription = (string)transactions["Description"];
                string transactionsEmployee = (string)transactions["IDA"];
                string transactionsHours = (string)transactions["Hours"];
                string transactionsDate = (string)transactions["TRNSDATE"];
            }
            // responses with more then 1000 positions are broken up into multiple requests
            uri = (string)response["RequestResponse"]["NextUri"];
        }
    }
}

Sample Responses


                        
             {
              "RequestResponse": {
                "Count": "3",
                "DATA": {
                  "Transaction": [
                    {
                         "HrPeId": "000000000001",
                         "HourBaseId": "1",
                         "EntityCd": "ROOT",
                         "TrnsHours": "8.00000",
                         "TrnsDate": "10/1/2018 12:00:00 AM",
                         "NumCd": "0",
                         "DescLong": "TOTAL"
                    },
                    {
                         "HrPeId": "00000803",
                         "HourBaseId": "11",
                         "EntityCd": "ROOT",
                         "TrnsHours": "8.00000",
                         "TrnsDate": "10/12/2018 12:00:00 AM",
                         "NumCd": "0",
                         "DescLong": "Military Leave"
                    }            
                  ]
                }
              }
            }