Method BenTekBenefitDef

Type: FusionOSServices.Controllers.BenTekController

Summary

This service returns benefit defintion information, including short and long description, effecive begin and end dates and employeer and employee cost.

Example

GET https://localhost/FusionOSServices:44398/v1/ONESolution/BenTek/BenefitDefinitions/

Parameters

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

Sample Code

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

public void MethodName(parms){

    string uri = "https://localhost:44398/v1/ONESolution/BenTek/BenefitDefinitions/KANSPTE0";
    

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

            foreach (var benefit in benefits)
            {
                string benePlan = (string)member["BenePlan"];
                
                // Your code goes here
            }
            // responses with more then 1000 benefit records are broken up into multiple requests
            uri = (string)response["RequestResponse"]["NextUri"];
        }
    }
}

Sample Responses


                        
            {
            "RequestResponse": {
            "Count": "5",
            "DATA": {
            "HRBENETBLES": [
            {
                "bene_plan": "KANSPTE0",
                "effbeg": "1/1/2010 0:00",
                "entity_id": "ROOT",
                "code": "KANS",
                "action_cd": "NEW",
                "calc_code": "FL",
                "category": "E0",
                "caxp": "P",
                "cbene_cd04": "HRAD",
                "cbene_cdh": 1110,
                "cbene_fq": "A",
                "cbene_st": "A",
                "cbenefqtyp": 0,
                "cdh_cont": 0,
                "cdh_dedu": 0,
                "clmt": 0,
                "clxp": "",
                "create_errors": 0,
                "create_time": 0,
                "create_when": "12/1/2009 9:25",
                "create_who": "ASKILLMA",
                "date_calc": "NA",
                "effend": "12/31/2050 0:00",
                "employee": 0,
                "employer": 534.85,
                "long_desc": "KAISER NON-SWORN PT E0",
                "short_desc": "KAISER NS PT E0",
                "sort": "MED",
                "sub_group": "",
                "total": 534.85,
                "type": "PT",
                "update_when": "12/1/2009 9:25",
                "update_who": "ASKILLMA",
                "unique_id": 507,
                "unique_key": "074C7D25-AC67-49B6-BB73-CC35DA5184B1"
                }
            ]
            }
            }
            }