public IHttpActionResult personDetails(dynamic data)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                string serialized_data       = token_gen.Authorize_aesdecrpty(data);
                EndorsementListModel rootobj = JsonConvert.DeserializeObject <EndorsementListModel>(serialized_data);
                return(Ok(pensionDeptHelper.personDetails(rootobj)));
            }
            catch (Exception ex)
            {
                objdata.status = false;
                objdata.result = ex.Message.ToString();
            }
            return(Ok(objdata));
        }
        //UAT URLs


        #region DA Login

        public static dynamic personDetails(EndorsementListModel obj)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                obj.password = "******";
                obj.userName = "******";
                string pensionResponse = string.Empty;
                try
                {
                    pensionResponse = POST_RequestAsync(personDetailsUrl, JsonConvert.SerializeObject(obj));
                }
                catch (Exception ex)
                {
                    objdata.status = false;
                    objdata.result = "RESPONSE FROM PENSION DEPT : " + ex.Message.ToString();
                    return(objdata);
                }
                if (string.IsNullOrEmpty(pensionResponse))
                {
                    objdata.status = false;
                    objdata.result = "No Response from pension department service !!!, Please try after some time";
                    return(objdata);
                }

                PanchayatMastersModel panchayatReq = new PanchayatMastersModel();
                panchayatReq.flag          = "S";
                panchayatReq.password      = "******";
                panchayatReq.secretariatId = obj.secId;
                panchayatReq.userName      = "******";
                string panchayatResponse = string.Empty;
                try
                {
                    panchayatResponse = POST_RequestAsync(panchayatMasterUrl, JsonConvert.SerializeObject(panchayatReq));
                }
                catch (Exception ex)
                {
                    objdata.status = false;
                    objdata.result = "RESPONSE FROM PENSION DEPT : " + ex.Message.ToString();
                    return(objdata);
                }
                panchayatResponseModel panchayatRespObj = JsonConvert.DeserializeObject <panchayatResponseModel>(panchayatResponse);
                if (string.IsNullOrEmpty(panchayatResponse) || panchayatRespObj.PanchayatList == null)
                {
                    objdata.status = false;
                    objdata.result = "No Response from pension department panchayat list service !!!, Please try after some time";
                    return(objdata);
                }


                pensionResponseModel pensionRespObj = JsonConvert.DeserializeObject <pensionResponseModel>(pensionResponse);
                if (pensionRespObj.responseCode == "102")
                {
                    casteModel objCaste = new casteModel();
                    objCaste.type = "1";
                    DataTable dt = casteProc(objCaste);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        objdata.status        = true;
                        objdata.result        = pensionRespObj;
                        objdata.PanchayatList = panchayatRespObj.PanchayatList;
                        objdata.casteList     = dt;
                    }
                    else
                    {
                        objdata.status = false;
                        objdata.result = "Castes Not Available to load !!!";
                    }
                }
                else
                {
                    objdata.status = false;
                    objdata.result = "RESPONSE FROM PENSION DEPT : " + pensionRespObj.reason;
                }
            }
            catch (Exception ex)
            {
                objdata.status = false;
                objdata.result = ex.Message.ToString();
            }
            return(objdata);
        }