We will return 200 as status code on success call of a method.
{
"code": 200,
"text": "string",
"additionalText": "string",
"data": [ ]
}
{
"code": 200,
"text": "string",
"additionalText": "string",
"paging": {
"CurrentPageNumber": 0,
"PageSize": 0,
"HasNextPage": true
},
"data": [ ]
}
We will return 0 as status code when failure the method calling.
{
"code": 0,
"text": "string",
"additionalText": "string",
"data": null
}
we will return -1 as status code when any error occured while calling the method.
{
"code": -1,
"text": "string",
"additionalText": "string",
"data": null
}
/v1/attorney/checkemail
This method is used to check if the given email is used by an existing attorney and returns JSON Object as response.
| Parameters | Validation |
|---|---|
| Required, should be a valid email. |
{
"code": 200,
"text": "success",
"additionalText": null,
"data": {
"EMail": "xyz@123.com",
"IsAlreadyUsed": true
}
}
{
"code": 200,
"text": "success",
"additionalText": null,
"data": {
"EMail": "xyz@1234.com",
"IsAlreadyUsed": false
}
}
{
"code": 0,
"text": "Invalid Email",
"additionalText": null,
"data": null
}
Request:
string Email = "xyz@123.com";
Code:
public Response<CheckEmailData> ChecKMailAPI(string Email)
{
Response<CheckEmailData> response = new Response<CheckEmailData>();
try
{
string url="https://tx.dharani.org/v1/attorney/checkemail?Email="+Email;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Accept = "application/json";
objRequest.Method = "GET";
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxxxxxxx");
string ResponseString = "";
HttpWebResponse objResponse = null;
objResponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(objResponse.GetResponseStream()).ReadToEnd();
response.data = new CheckEmailData();
response = new JavaScriptSerializer().Deserialize<Response<CheckEmailData>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
return response;
}
else
{
return response;
}
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "Success",
"additionalText": null,
"data": {
"EMail": "xyz@123.com",
"IsAlreadyUsed": false
}
}
/v1/attorney/referrallinks
This method is used to retrieve the "Attorney Referral Links" information associated for a given attorney. Returns a Referral Links as JSON array in response object.
| Parameters | Validation |
|---|---|
| AttorneyEmail | Required, should be a valid email |
| AttorneyPassword | Required |
{
"code": 200,
"text": "success",
"additionalText": null,
"data": [
{
"FirstCourse_ReferralLink": "XXXXXXXXXXXXX",
"SecondCourse_ReferralLink": "XXXXXXXXXXXXXX"
}
]
}
{
"code": 0,
"text": "Failed",
"additionalText": "Attorney EmailId Not Exists",
"data": null
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText": "Unexpected error occurred",
"data": null
}
Request:
public class AttorneyDetails
{
public string AttorneyEmail { get; set; }
public string AttorneyPassword { get; set; }
}
GetAttorneyUsersRequest objAttorneyDetailsforreferrallink = new GetAttorneyUsersRequest();
objAttorneyDetailsforreferrallink.attorneyEmail = "xyz@gmail.com";
objAttorneyDetailsforreferrallink.attorneyPassword = "123";
Code:
public Response<AttorneyReferralLinks> AttorneyReferralLinks(GetAttorneyUsersRequest objAttorneyDetailsforreferrallink)
{
Response<AttorneyReferralLinks> response = new Response<AttorneyReferralLinks>();
try
{
string AttorneyReferralLinks = (ConfigurationSettings.AppSettings["baseurl"] + ConfigurationSettings.AppSettings["getattorenyrefferallinks"]) + "?attorneyEmail=" + objAttorneyDetailsforreferrallink.attorneyEmail + "&attorneyPassword=" + objAttorneyDetailsforreferrallink.attorneyPassword;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(AttorneyReferralLinks);
objRequest.Accept = "application/json";
objRequest.Method = "GET";
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxxxxxxx");
string ResponseString = "";
HttpWebResponse Objresponse = null;
Objresponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(Objresponse.GetResponseStream()).ReadToEnd();
response.data = new AttorneyReferralLinks();
response=new JavaScriptSerializer().Deserialize<Response<AttorneyReferralLinks>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
response.data = null;
}
else
{
response.data = null;
}
return response;
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "Success",
"additionalText": null,
"data": [
{
"FirstCourse_ReferralLink": "XXXXXXXXXXXXX",
"SecondCourse_ReferralLink": "XXXXXXXXXXXXX"
},
]
}
/v1/attorney/getuserslist
This method is used to retrieve the users information associated for a given attorney. Returns a list of users as JSON array in response object.
{
"AttorneyEmail": "string",
"AttorneyPassword": "string",
"PageNumber": int,
"PageSize": int
}
| Parameters | Validation |
|---|---|
| AttorneyEmail | Required, should be a valid email |
| AttorneyPassword | Required |
| Page Number | Optional (Default is 1) |
| Page Size | Optional (Default is 25) |
{
"code": 200,
"text": "success",
"additionalText": null,
"paging": {
"CurrentPageNumber": 1,
"PageSize": 10,
"HasNextPage": true
},
"data": [
{
"UserFirstName": "user_firstname",
"UserLastName": "user_lastname",
"UserSSN": "1234",
"SpouseFirstname": "spouse_firstname",
"SpouseLastName": "spouse_lastname",
"SpouseSSN": "1234",
"DateofRegistered": "2018-04-17T09:02:24",
"DateofCompletion": "2018-05-24T09:09:36",
"Status": "10%",
"CertificateDownload": "",
"DownloadFormB423": "",
"SpouseCertificateDownload": "",
"SpouseDownloadFormB423": "",
"FiledTag": "",
"SpouseFiledTag": "",
"FirstCourse_ReferalLink": "",
"SecondCourse_ReferalLink": "",
"UniqueIdentifier": "Unique_Identifier"
},
{
"UserFirstName": "user_firstname",
"UserLastName": "user_lastname",
"UserSSN": "1234",
"SpouseFirstname": "spouse_firstname",
"SpouseLastName": "spouse_lastname",
"SpouseSSN": "1234",
"DateofRegistered": "2018-04-17T09:02:24",
"DateofCompletion": "2018-05-24T09:09:36",
"Status": "10%",
"CertificateDownload": "",
"DownloadFormB423": "",
"SpouseCertificateDownload": "",
"SpouseDownloadFormB423": "",
"FiledTag": "",
"SpouseFiledTag": "",
"FirstCourse_ReferalLink": "",
"SecondCourse_ReferalLink": "",
"UniqueIdentifier": "Unique_Identifier"
}
]
}
{
"code": 0,
"text": "Failed",
"additionalText": "Attorney EmailId Not Exists",
"paging": null,
"data": null
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText": "Unexpected error occurred",
"paging": null,
"data": null
}
Request:
public class PagingDetails
{
public int CurrentPageNumber { get; set; }
public int PageSize { get; set; }
public bool HasNextPage { get; set; }
}
public class ResponseWithPaging<T>
{
public ResponseCodes code { get; set; }
public string text { get; set; }
public string additionalText { get; set; }
public PagingDetails paging { get; set; }
public T data { get; set; }
}
public class AttorneyDetails
{
public string AttorneyEmail { get; set; }
public string AttorneyPassword { get; set; }
public int PageNumber { get; set; }
public int PageSize { get; set; }
}
AttorneyDetails objAttorneyDetails = new AttorneyDetails();
objAttorneyDetails.AttorneyEmail = "xyz@123.com";
objAttorneyDetails.AttorneyPassword = "123";
objAttorneyDetails.PageNumber = 1;
objAttorneyDetails.PageSize = 10;
Code:
public ResponseWithPaging<list<AttorneyUsers>> GetAttorneyUsersAPI(AttorneyDetails objGetAttorneyUsers)
{
ResponseWithPaging<List<AttorneyUsers>> response = new ResponseWithPaging<List<AttorneyUsers>>();
try
{
string url="https://tx.dharani.org/v1/attorney/getuserslist";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Accept = "application/json";
objRequest.Method = "POST";
JavaScriptSerializer jss1 = new JavaScriptSerializer();
string GetUsersRequest = jss1.Serialize(objGetAttorneyUsers);
var data = Encoding.ASCII.GetBytes(GetUsersRequest);
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxx");
objRequest.ContentLength = data.Length;
using (var stream = objRequest.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
string ResponseString = "";
HttpWebResponse Objresponse = null;
Objresponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(Objresponse.GetResponseStream()).ReadToEnd();
response.data = new List<AttorneyUsers>();
response=new JavaScriptSerializer().Deserialize<ResponseWithPaging<List<AttorneyUsers>>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
response.data = null;
}
else
{
response.data = null;
}
return response;
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "Success",
"additionalText": null,
"paging": {
"CurrentPageNumber": 1,
"PageSize": 1,
"HasNextPage": true
},
"data": [
{
"UserFirstName": "TU2",
"UserLastName": "H",
"UserSSN": "1111",
"SpouseFirstname": "DF",
"SpouseLastName": "DF",
"SpouseSSN": "1111",
"DateofRegistered": "2018-05-08T17:46:59",
"DateofCompletion": "2019-02-28T11:56:33",
"Status": "90%",
"CertificateDownload": "",
"DownloadFormB423": "",
"SpouseCertificateDownload": "",
"SpouseDownloadFormB423": "",
"FiledTag": "",
"SpouseFiledTag": "",
"FirstCourse_ReferalLink": "http://bit.ly/2KfyZHz",
"SecondCourse_ReferalLink": "http://bit.ly/2KeE2Il"
"UniqueIdentifier": "Q0M5OTk5OTk5OTY="
},
]
}
/v1/attorney/getuserslistbysearch
This method is used to retrieve the users information associated for a given attorney by searching with there names. Returns a list of users as JSON array in response object.
{
"AttorneyEmail": "string",
"AttorneyPassword": "string",
"SearchText": "string",
"PageNumber": int,
"PageSize": int
}
| Parameters | Validation |
|---|---|
| AttorneyEmail | Required, should be a valid email |
| AttorneyPassword | Required |
| Search Text | Required (Default is empty) |
| Page Number | Optional (Default is 1) |
| Page Size | Optional |
{
"code": 200,
"text": "success",
"additionalText": null,
"paging": {
"CurrentPageNumber": 1,
"PageSize": 10,
"HasNextPage": true
},
"data": [
{
"UserFirstName": "user_firstname",
"UserLastName": "user_lastname",
"UserSSN": "1234",
"SpouseFirstname": "spouse_firstname",
"SpouseLastName": "spouse_lastname",
"SpouseSSN": "1234",
"DateofRegistered": "2018-04-17T09:02:24",
"DateofCompletion": "2018-05-24T09:09:36",
"Status": "10%",
"CertificateDownload": "",
"DownloadFormB423": "",
"SpouseCertificateDownload": "",
"SpouseDownloadFormB423": "",
"FiledTag": "",
"SpouseFiledTag": "",
"FirstCourse_ReferalLink": "",
"SecondCourse_ReferalLink": "",
"UniqueIdentifier": "Unique_Identifier"
},
{
"UserFirstName": "user_firstname",
"UserLastName": "user_lastname",
"UserSSN": "1234",
"SpouseFirstname": "spouse_firstname",
"SpouseLastName": "spouse_lastname",
"SpouseSSN": "1234",
"DateofRegistered": "2018-04-17T09:02:24",
"DateofCompletion": "2018-05-24T09:09:36",
"Status": "10%",
"CertificateDownload": "",
"DownloadFormB423": "",
"SpouseCertificateDownload": "",
"SpouseDownloadFormB423": "",
"FiledTag": "",
"SpouseFiledTag": "",
"FirstCourse_ReferalLink": "",
"SecondCourse_ReferalLink": "",
"UniqueIdentifier": "Unique_Identifier"
}
]
}
{
"code": 0,
"text": "Failed",
"additionalText": "Attorney EmailId Not Exists",
"paging": null,
"data": null
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText": "Unexpected error occurred",
"paging": null,
"data": null
}
Request:
public class PagingDetails
{
public int CurrentPageNumber { get; set; }
public int PageSize { get; set; }
public bool HasNextPage { get; set; }
}
public class ResponseWithPaging<T>
{
public ResponseCodes code { get; set; }
public string text { get; set; }
public string additionalText { get; set; }
public PagingDetails paging { get; set; }
public T data { get; set; }
}
public class AttorneyUsers
{
public string AttorneyEmail { get; set; }
public string AttorneyPassword { get; set; }
public string SearchText { get; set; }
public int PageNumber { get; set; }
public int PageSize { get; set; }
}
AttorneyUsers objAttorneyUsers = new AttorneyUsers();
objAttorneyUsers.AttorneyEmail = "xyz@123.com";
objAttorneyUsers.AttorneyPassword = "123";
objAttorneyUsers.SearchText = "abc"
objAttorneyUsers.PageNumber = 1;
objAttorneyUsers.PageSize = 10;
Code:
public ResponseWithPaging<list<AttorneyUsers>> GetAttorneyUsersAPI(AttorneyUsers objGetAttorneyUsers)
{
ResponseWithPaging<List<AttorneyUsers>> response = new ResponseWithPaging<List<AttorneyUsers>>();
try
{
string url="https://tx.dharani.org/v1/attorney/getuserslistbysearch";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Accept = "application/json";
objRequest.Method = "POST";
JavaScriptSerializer jss1 = new JavaScriptSerializer();
string GetUsersRequest = jss1.Serialize(objGetAttorneyUsers);
var data = Encoding.ASCII.GetBytes(GetUsersRequest);
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxx");
objRequest.ContentLength = data.Length;
using (var stream = objRequest.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
string ResponseString = "";
HttpWebResponse Objresponse = null;
Objresponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(Objresponse.GetResponseStream()).ReadToEnd();
response.data = new List<AttorneyUsers>();
response=new JavaScriptSerializer().Deserialize<ResponseWithPaging<List<AttorneyUsers>>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
response.data = null;
}
else
{
response.data = null;
}
return response;
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "Success",
"additionalText": null,
"paging": {
"CurrentPageNumber": 1,
"PageSize": 1,
"HasNextPage": true
},
"data": [
{
"UserFirstName": "TU2",
"UserLastName": "H",
"UserSSN": "1111",
"SpouseFirstname": "DF",
"SpouseLastName": "DF",
"SpouseSSN": "1111",
"DateofRegistered": "2018-05-08T17:46:59",
"DateofCompletion": "2019-02-28T11:56:33",
"Status": "90%",
"CertificateDownload": "",
"DownloadFormB423": "",
"SpouseCertificateDownload": "",
"SpouseDownloadFormB423": "",
"FiledTag": "",
"SpouseFiledTag": "",
"FirstCourse_ReferalLink": "http://bit.ly/2KfyZHz",
"SecondCourse_ReferalLink": "http://bit.ly/2KeE2Il"
"UniqueIdentifier": "Q0M5OTk5OTk5OTY="
},
]
}
/v1/attorney/add
This method is used to create new attorney. Returns response as JSON object.
{
"FirmName": "string",
"AttorneyFirstName": "string",
"AttorneyLastName": "string",
"AddressLine1": "string",
"City": "string",
"State": "string",
"ZIP": "string",
"AttorneyPhone": "string",
"AttorneyFax": "string",
"EmailAddress": "string",
"AdditionalEmail1": "string",
"AdditionalEmail2": "string",
"AdditionalEmail3": "string",
"AdditionalEmail4": "string",
"AdditionalEmail5": "string",
"AdditionalEmail6": "string",
"AdditionalEmail7": "string",
"AdditionalEmail8": "string",
"AdditionalEmail9": "string",
"AdditionalEmail10": "string",
"AdditionalEmail11": "string",
"AdditionalEmail12": "string",
"AdditionalEmail13": "string",
"AdditionalEmail14": "string",
"AdditionalEmail15": "string",
"AdditionalEmail16": "string",
"AdditionalEmail17": "string",
"AdditionalEmail18": "string",
"AdditionalEmail19": "string",
"AdditionalEmail20": "string",
"IsCertificateFiled": true,
"IsBillingApproval": true,
"BillingAddressLine1": "string",
"BillingCity": "string",
"BillingState": "string",
"BillingZip": "string",
"Cardno": "string",
"CardMonth": "string",
"CardYear": "string",
"CVV" :"string",
"CardholderFirstName": "string",
"CardholderLastName": "string"
}
| Parameters | Validation |
|---|---|
| FirmName | Required |
| AttorneyFirstName | Required |
| AttorneyLastName | Required |
| AddressLine1 | Required |
| City | Required |
| State | Required and should 2 characters.See state codes in State Codes |
| ZIP | Required and should 5 digits. |
| AttorneyPhone | Required and should 10 digits. |
| AttorneyFax | Optional, should 10 digits |
| EmailAddress | Required and should be a valid email |
| AdditionalEmail1 | Optional, should be a valid email |
| AdditionalEmail2 | Optional, should be a valid email |
| AdditionalEmail3 | Optional, should be a valid email |
| AdditionalEmail4 | Optional, should be a valid email |
| AdditionalEmail5 | Optional, should be a valid email |
| AdditionalEmail6 | Optional, should be a valid email |
| AdditionalEmail7 | Optional, should be a valid email |
| AdditionalEmail8 | Optional, should be a valid email |
| AdditionalEmail9 | Optional, should be a valid email |
| AdditionalEmail10 | Optional, should be a valid email |
| AdditionalEmail11 | Optional, should be a valid email |
| AdditionalEmail12 | Optional, should be a valid email |
| AdditionalEmail13 | Optional, should be a valid email |
| AdditionalEmail14 | Optional, should be a valid email |
| AdditionalEmail15 | Optional, should be a valid email |
| AdditionalEmail16 | Optional, should be a valid email |
| AdditionalEmail17 | Optional, should be a valid email |
| AdditionalEmail18 | Optional, should be a valid email |
| AdditionalEmail19 | Optional, should be a valid email |
| AdditionalEmail20 | Optional, should be a valid email |
| IsCertificateFiled | Required and should be true or false |
| IsBillingApproval | Required and should be true or false |
| BillingAddressLine1 | Required if IsBillingApproval is true. |
| BillingCity | Required if IsBillingApproval is true. |
| BillingState | Required if IsBillingApproval is true and should 2 characters.See state codes in State Codes |
| BillingZip | Required if IsBillingApproval is true and should 5 digits. |
| Cardno | Required if IsBillingApproval is true. The card number should be valid. |
| CardMonth | Required if IsBillingApproval is true.The month should be in between 1-12 |
| CardYear | Required if IsBillingApproval is true.The card year should be 4 digits |
| CVV | Required if IsBillingApproval is true.The cvv should be 3 digits |
| CardholderFirstName | Required if IsBillingApproval is true. |
| CardholderLastName | Required if IsBillingApproval is true. |
{
"code": 200,
"text": "Success",
"additionalText": null,
"data": "Attorney added successfully"
}
{
"code": 0,
"text": "AuthorizePayment id's not created",
"additionalText":"AuthorizePayment id's not created",
"data": null
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText":"Unexpected error occurred",
"data": null
}
Request:
class AttorneyPortalDetails
{
public string FirmName { get; set; }
public string AttorneyFirstName { get; set; }
public string AttorneyLastName { get; set; }
public string AddressLine1 { get; set; }
public string City { get; set; }
public string State { get; set; }
public string ZIP { get; set; }
public string AttorneyPhone { get; set; }
public string AttorneyFax { get; set; }
public string EmailAddress { get; set; }
public string AdditionalEmail1 { get; set; }
public string AdditionalEmail2 { get; set; }
public string AdditionalEmail3 { get; set; }
public string AdditionalEmail4 { get; set; }
public string AdditionalEmail5 { get; set; }
public string AdditionalEmail6 { get; set; }
public string AdditionalEmail7 { get; set; }
public string AdditionalEmail8 { get; set; }
public string AdditionalEmail9 { get; set; }
public string AdditionalEmail10 { get; set; }
public string AdditionalEmail11 { get; set; }
public string AdditionalEmail12 { get; set; }
public string AdditionalEmail13 { get; set; }
public string AdditionalEmail14 { get; set; }
public string AdditionalEmail15 { get; set; }
public string AdditionalEmail16 { get; set; }
public string AdditionalEmail17 { get; set; }
public string AdditionalEmail18 { get; set; }
public string AdditionalEmail19 { get; set; }
public string AdditionalEmail20 { get; set; }
public bool IsCertificateFiled { get; set; }
public bool IsBillingApproval { get; set; }
public string BillingAddressLine1 { get; set; }
public string BillingCity { get; set; }
public string BillingState { get; set; }
public string BillingZip { get; set; }
public string Cardno { get; set; }
public string CardMonth { get; set; }
public string CardYear { get; set; }
public string Cvv { get;set;}
public string CardholderFirstName { get; set; }
public string CardholderLastName { get; set; }
}
AttorneyPortalDetails objAttorneyDetails = new AttorneyPortalDetails();
objAttorneyDetails.FirmName = "sampleapifirm";
objAttorneyDetails.AttorneyFirstName = "firstapi";
objAttorneyDetails.AttorneyLastName = "lastapi";
objAttorneyDetails.AddressLine1 = "address";
objAttorneyDetails.City = "city";
objAttorneyDetails.State = "AL";
objAttorneyDetails.ZIP = "12345";
objAttorneyDetails.AttorneyPhone = "1234567890";
objAttorneyDetails.AttorneyFax = "";
objAttorneyDetails.EmailAddress = "rssr4@g.c";
objAttorneyDetails.AdditionalEmail1 = "";
objAttorneyDetails.AdditionalEmail2 = "";
objAttorneyDetails.AdditionalEmail3 = "";
objAttorneyDetails.AdditionalEmail4 = "";
objAttorneyDetails.AdditionalEmail5 = "";
objAttorneyDetails.AdditionalEmail6 = "";
objAttorneyDetails.AdditionalEmail7 = "";
objAttorneyDetails.AdditionalEmail8 = "";
objAttorneyDetails.AdditionalEmail9 = "";
objAttorneyDetails.AdditionalEmail10 = "";
objAttorneyDetails.AdditionalEmail11 = "";
objAttorneyDetails.AdditionalEmail12 = "";
objAttorneyDetails.AdditionalEmail13 = "";
objAttorneyDetails.AdditionalEmail14 = "";
objAttorneyDetails.AdditionalEmail15 = "";
objAttorneyDetails.AdditionalEmail16 = "";
objAttorneyDetails.AdditionalEmail17 = "";
objAttorneyDetails.AdditionalEmail18 = "";
objAttorneyDetails.AdditionalEmail19 = "";
objAttorneyDetails.AdditionalEmail20 = "";
objAttorneyDetails.IsCertificateFiled = true;
objAttorneyDetails.IsBillingApproval = true;
objAttorneyDetails.BillingAddressLine1 = "sample billing address",
objAttorneyDetails.BillingCity = "sample billing city",
objAttorneyDetails.BillingState = "AL",
objAttorneyDetails.BillingZip = "00000",
objAttorneyDetails.Cardno = "4111111111111111";
objAttorneyDetails.CardMonth = "12";
objAttorneyDetails.CardYear = "2020";
objAttorneyDetails.Cvv = "123";
objAttorneyDetails.CardholderFirstName = "card first";
objAttorneyDetails.CardholderLastName = "card last";
Code:
public Response<string> Attorney_CreateAPI(AttorneyPortalDetails objAttorneyDetails)
{
Response<string> response = new Response<string>();
try
{
string url = "https://tx.dharani.org/v1/attorney/add";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Accept = "application/json";
objRequest.Method = "POST";
JavaScriptSerializer jss2 = new JavaScriptSerializer();
string RequestAttorneyCreate = jss2.Serialize(objAttorneyDetails);
var data = Encoding.ASCII.GetBytes(RequestAttorneyCreate);
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxxx");
objRequest.ContentLength = data.Length;
using (var stream = objRequest.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
string ResponseString = "";
HttpWebResponse objResponse = null;
objResponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(objResponse.GetResponseStream()).ReadToEnd();
response = new JavaScriptSerializer().Deserialize<Response<string>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
return response;
}
else
{
return response;
}
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "Success",
"additionalText": null,
"data": "Attorney added successfully"
}
/v1/attorney/flyers
This method can be used to request free flyers.
{
"FirmName": "string",
"AttorneyName": "string",
"AddressLine1": "string",
"City": "string",
"State": "string",
"ZIP": "string",
"AttorneyPhone": "string",
"AttorneyFax": "string",
"EmailAddress": "string",
"IsInculdeFlyersInSpanish": true
}
| Parameters | Validation |
|---|---|
| FirmName | Required |
| AttorneyName | Required |
| AddressLine1 | Required |
| City | Required |
| State | Required and It should 2 characters.See state codes in State Codes |
| ZIP | Required and should 5 digits |
| AttorneyPhone | Required and should 10 digits. |
| AttorneyFax | Optional, should 10 digits |
| EmailAddress | Required and should be a valid email |
| IsInculdeFlyersInSpanish | Required and should be true or false |
{
"code": 200,
"text": "success",
"additionalText": null,
"data": "Attorney request free flyers mail sent successfully"
}
{
"code": 0,
"text": "Failed",
"additionalText": null,
"data": "Attorney request free flyers mail sent failed"
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText": null,
"data": null
}
Request:
public class AttorneyFlyersDetails
{
public string FirmName { get; set; }
public string AttorneyName { get; set; }
public string AddressLine1 { get; set; }
public string City { get; set; }
public string State { get; set; }
public string ZIP { get; set; }
public string AttorneyPhone { get; set; }
public string AttorneyFax { get; set; }
public string EmailAddress { get; set; }
public bool IsInculdeFlyersInSpanish { get; set; }
}
AttorneyFlyersDetails objPreflyersRequestDetails = new AttorneyFlyersDetails();
objPreflyersRequestDetails.FirmName = "pre flyers api";
objPreflyersRequestDetails.AttorneyName = "pre flyers";
objPreflyersRequestDetails.AddressLine1 = "address";
objPreflyersRequestDetails.City = "city";
objPreflyersRequestDetails.State = "al";
objPreflyersRequestDetails.ZIP = "12345";
objPreflyersRequestDetails.AttorneyPhone = "1234567890";
objPreflyersRequestDetails.AttorneyFax = "";
objPreflyersRequestDetails.EmailAddress = "ameer.shaik@dharani.co.in";
objPreflyersRequestDetails.IsInculdeFlyersInSpanish = true;
Code:
public Response<string> Attorney_PreFlyers_API(PreflyersRequestDetails objPreflyersRequestDetails)
{
Response<string> response = new Response<string>();
try
{
string url = "https://tx.dharani.org/v1/attorney/flyers";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Accept = "application/json";
objRequest.Method = "POST";
JavaScriptSerializer jss3 = new JavaScriptSerializer();
string RequestFlyersDetails = jss3.Serialize(objPreflyersRequestDetails);
var data = Encoding.ASCII.GetBytes(RequestFlyersDetails);
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxx");
objRequest.ContentLength = data.Length;
using (var stream = objRequest.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
string ResponseString = "";
HttpWebResponse objResponse = null;
objResponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(objResponse.GetResponseStream()).ReadToEnd();
response = new JavaScriptSerializer().Deserialize<Response<string>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
return response;
}
else
{
return response;
}
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "Success",
"additionalText": null,
"data": "Attorney request free flyers mail sent successfully"
}
/v1/attorney/postflyers
This method can be used to request flyers for existing attorneys, returns response as JSON Object.
{
"AttorneyEmail": "string",
"AttorneyPassword": "string",
"IsInculdeFlyersInSpanish": true
}
| Parameters | Validations |
|---|---|
| AttorneyEmail | Required and should be a valid email |
| AttorneyPassword | Required |
| IsInculdeFlyersInSpanish | Required and should be true or false |
{
"code": 200,
"text": "success",
"additionalText": null,
"data": "Mail sent successfully."
}
{
"code": 0,
"text": "Failed",
"additionalText": "Attorney EmailId Not Exists",
"data": null
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText": "Unexpected error occurred",
"data": null
}
Request:
public class AttorneyPostFlyersDetails
{
public string AttorneyEmail { get; set; }
public string AttorneyPassword { get; set; }
public bool IsInculdeFlyersInSpanish { get; set; }
}
AttorneyPostFlyersDetails objPostFlyersDetails = new AttorneyPostFlyersDetails();
objPostFlyersDetails.AttorneyEmail = "xyz@123.com";
objPostFlyersDetails.AttorneyPassword = "1";
objPostFlyersDetails.IsInculdeFlyersInSpanish = true;
Code:
public Response<string> AttorneyPostFlyersAPI(PostFlyersRequestDetails objPostFlyersRequestDetails)
{
Response<string> response = new Response<string>();
try
{
string url = "https://tx.dharani.org/v1/attorney/postflyers";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Accept = "application/json";
objRequest.Method = "POST";
JavaScriptSerializer jss4 = new JavaScriptSerializer();
string RequestPostFlyersDetails = jss4.Serialize(objPostFlyersRequestDetails);
var data = Encoding.ASCII.GetBytes(RequestPostFlyersDetails);
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxxxxxx");
objRequest.ContentLength = data.Length;
using (var stream = objRequest.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
string ResponseString = "";
HttpWebResponse objResponse = null;
objResponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(objResponse.GetResponseStream()).ReadToEnd();
response = new JavaScriptSerializer().Deserialize<Response<string>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
return response;
}
else
{
return response;
}
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "Success",
"additionalText": null,
"data": "Mail sent successfully."
}
/v1/attorney/forgotpassword
This method can be used to get password to an attorney email, returns response as JSON Object.
| Parameters | Validations |
|---|---|
| AttorneyEmail | Required and should be a valid email |
{
"code": 200,
"text": "Your password reset link has been sent to your email address.",
"additionalText": null,
"data": {
"AttorneyEmail": "xyz@123.com"
}
}
{
"code": 0,
"text": "Your password reset link has been sent to your email address.",
"additionalText": null,
"data": null
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText": "Unexpected error occurred",
"data": null
}
Request:
class Forgotpassword
{
public string AttorneyEmail { get; set; }
}
ForgotPassword objForgotpassword = new ForgotPassword();
string attorneyemail = "xyz@123.com";
var objForgotpasswordResponse = objForgotpassword.ForgotPasswordAPI(attorneyemail);
Code:
public Response<Forgotpassword> ForgotPasswordAPI(string Email)
{
Response<Forgotpassword> response = new Response<Forgotpassword>();
try
{
string url="https://tx.dharani.org/v1/attorney/forgotpassword?Email="+Email;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(ForgotPasswordRequest);
objRequest.Accept = "application/json";
objRequest.Method = "GET";
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxxxxxxx");
string ResponseString = "";
HttpWebResponse objResponse = null;
objResponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(objResponse.GetResponseStream()).ReadToEnd();
response.data = new Forgotpassword();
response = new JavaScriptSerializer().Deserialize<Response<Forgotpassword>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
return response;
}
else
{
return response;
}
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
{
"code": 200,
"text": "Your password has been sent to your email address.",
"additionalText": null,
"data": {
"AttorneyEmail": "xyz@123.com"
}
}
}
/v1/attorney/loginverify
This method can be used to verify login, returns response as JSON Object.
{
"AttorneyEmail": "string",
"AttorneyPassword": "string",
}
| Parameters | Validations |
|---|---|
| AttorneyEmail | Required and should be a valid email |
| AttorneyPassword | Required |
{
"code": 200,
"text": "SUCCESS",
"additionalText": "Login verify success",
}
{
"code": 0,
"text": "INVALID",
"additionalText": "Invalid credentials",
}
{
"code": -1,
"text": "Unexpected error occurred",
"additionalText": "Unexpected error occurred",
}
Request:
public class AttorneyLoginVerifyDetails
{
public string AttorneyEmail { get; set; }
public string AttorneyPassword { get; set; }
}
AttorneyLoginVerifyDetails objLoginVerifyDetails = new AttorneyLoginVerifyDetails();
objLoginVerifyDetails.AttorneyEmail = "xyz@123.com";
objLoginVerifyDetails.AttorneyPassword = "123";
Code:
public Response<string> AttorneyLoginVerifyAPI(AttorneyLoginVerifyDetails objLoginVerifyDetails)
{
Response<string> response = new Response<string>();
try
{
string url = "https://tx.dharani.org/v1/attorney/loginverify";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Accept = "application/json";
objRequest.Method = "POST";
JavaScriptSerializer jss4 = new JavaScriptSerializer();
string RequestPostFlyersDetails = jss4.Serialize(objLoginVerifyDetails);
var data = Encoding.ASCII.GetBytes(RequestPostFlyersDetails);
objRequest.ContentType = "application/json";
objRequest.Headers.Add("apikey", "xxxxxxxxxxxxxxxxxxxxxxxxxxx");
objRequest.ContentLength = data.Length;
using (var stream = objRequest.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
string ResponseString = "";
HttpWebResponse objResponse = null;
objResponse = (HttpWebResponse)objRequest.GetResponse();
ResponseString = new StreamReader(objResponse.GetResponseStream()).ReadToEnd();
response = new JavaScriptSerializer().Deserialize<Response<string>>(ResponseString);
return response;
}
catch (WebException ex)
{
response.code = -1;
response.text = "Web Exception";
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webresponse = null;
webresponse = (HttpWebResponse)ex.Response;
var encoding = ASCIIEncoding.ASCII;
using (var reader = new System.IO.StreamReader(webresponse.GetResponseStream(), encoding))
{
response.text = reader.ReadToEnd();
}
return response;
}
else
{
return response;
}
}
catch (Exception ex)
{
throw ex;
}
}
Response:
{
"code": 200,
"text": "SUCCESS",
"additionalText": Login verify success,
}
| State Name | State Code |
|---|---|
| ALABAMA | AL |
| ALASKA | AK |
| ARIZONA | AZ |
| ARKANSAS | AR |
| CALIFORNIA | CA |
| COLORADO | CO |
| CONNECTICUT | CT |
| DELAWARE | DE |
| DISTRICT OF COLUMBIA | DC |
| FLORIDA | FL |
| GEORGIA | GA |
| HAWAII | HI |
| IDAHO | ID |
| ILLINOIS | IL |
| INDIANA | IN |
| IOWA | IA |
| KANSAS | KS |
| KENTUCKY | KY |
| LOUISIANA | LA |
| MAINE | ME |
| MARYLAND | MD |
| MASSACHUSETTS | MA |
| MICHIGAN | MI |
| MINNESOTA | MN |
| MISSISSIPPI | MS |
| MISSOURI | MO |
| MONTANA | MT |
| NEBRASKA | NE |
| NEVADA | NV |
| NEW HAMPSHIRE | NH |
| NEW JERSEY | NJ |
| NEW MEXICO | NM |
| NEW YORK | NY |
| NORTH CAROLINA | NC |
| NORTH DAKOTA | ND |
| OHIO | OH |
| OKLAHOMA | OK |
| OREGON | OR |
| PENNSYLVANIA | PA |
| RHODE ISLAND | RI |
| SOUTH CAROLINA | SC |
| SOUTH DAKOTA | SD |
| TENNESSEE | TN |
| TEXAS | TX |
| UTAH | UT |
| VERMONT | VT |
| VIRGINIA | VA |
| WASHINGTON | WA |
| WEST VIRGINIA | WV |
| WISCONSIN | WI |
| WYOMING | WY |
| AMERICAN SAMOA | AS |
| GUAM | GU |
| NORTHERN MARIANA ISLANDS | MP |
| PUERTO RICO | PR |
| VIRGIN ISLANDS | VI |