Method ITLeaveBanks

Type: FusionOSServices.Controllers.IntelliTimeController

Summary

This service returns list of leave type hour bases and the hour codes associated with them

Example

GET https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/LeaveBanks

Sample Code

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

public void MethodName(parms){

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

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

            foreach (var transaction in transactions )
            {
                // Your code goes here
                
            }
            // responses with more then 1000 positions are broken up into multiple requests
            uri = (string)response["RequestResponse"]["NextUri"];
        }
    }
}

Sample Responses


                        
            {
                "RequestResponse": {
                "Count": "none",
                 "DATA": {
                   "LEAVEBANKS": [
                     {
                       "LEAVEBANKID": "20",
                       "DESCRIPTION": "",
                       "HOURCODE": "3200",
                       "TITLE": "Non Exempt Salary",
                       "EFFECT": "+",
                       "BEGINDATE": "",
                       "ENDDATE": "",
                       "HOURTYPE": "P",
                       "RATETYPE": "R"
                     },
                     {
                       "LEAVEBANKID": "20",
                       "DESCRIPTION": "",
                       "HOURCODE": "3913",
                       "TITLE": "DESERT TRAVEL TIME",
                       "EFFECT": "+",
                       "BEGINDATE": "",
                       "ENDDATE": "",
                       "HOURTYPE": "O",
                       "RATETYPE": "C"
                     }
                   ]
                 }
               }
             }