Method BenTekEmployeeFamily

Type: FusionOSServices.Controllers.BenTekController

Summary

This service returns the following information about employee family: employee id,family member dob,family member first middle and last name,Address 1, Address 2,city,state,zip,relation,age,gender,phonecd, and status.

Example

GET https://localhost/FusionOSServices:44398/v1/ONESolution/BenTek/Family/E01010

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://localhost:44398/v1/ONESolution/BenTek/Family/E01010";
    

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

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

Sample Responses


                        
            {
            "RequestResponse": {
            	"Count": "5",
            	"DATA": {
            		"HRFAMILYS": [
            			{
            				"IDA": "E01010",
            				"FAMILYSSN": "789787894",
            				"BENEAGE": "0",
            				"CITY": "CHICO",
            				"FAMDOB": "6/19/1982 12:00:00 AM",
            				"GENDER": "F",
            				"MISCSTAT": "S",
            				"PHONECD": "HO",
            				"RELATION": "SP",
            				"ST1": "463 POSADA  WAY",
            				"ST2": "APT 3",
            				"STATE": "CA",
            				"FNAME": "Rebecca",
            				"MIDDLENAME": "",
            				"LNAME": "De Marco",
            				"SUFFIX": "",
            				"FAMAGE": 36
            
                        },
            			{
            				"IDA": "E01010",
            				"FAMILYSSN": "654564456",
            				"BENEAGE": "0",
            				"CITY": "CHICO",
            				"FAMDOB": "5/9/1979 12:00:00 AM",
            				"GENDER": "F",
            				"MISCSTAT": "S",
            				"PHONECD": "",
            				"RELATION": "12",
            				"ST1": "266 AIRPARK",
            				"ST2": "",
            				"STATE": "CA",
            				"FNAME": "Dawson",
            				"MIDDLENAME": "",
            				"LNAME": "Rosario",
            				"SUFFIX": "",
            				"FAMAGE": 39
            			},
            			{
            				"IDA": "E01010",
            				"FAMILYSSN": "654564456",
            				"BENEAGE": "0",
            				"CITY": "Chico",
            				"FAMDOB": "12/30/2015 12:00:00 AM",
            				"GENDER": "M",
            				"MISCSTAT": "S",
            				"PHONECD": "CL",
            				"RELATION": "CH",
            				"ST1": "CHICO CROSSROADS",
            				"ST2": "2005 DR MARTIN LUTHER KING JR",
            				"STATE": "CA",
            				"FNAME": "TYRION",
            				"MIDDLENAME": "KID",
            				"LNAME": "HANDFULL",
            				"SUFFIX": "",
            				"FAMAGE": 3
            			}
            		]
            	}
            }
            }