Personal Profile Methods '/contacts/{contactid}/personalprofile'

The methods available for Personal Profile Information are exposed under their respective URIs, which are described below.


Personal Profile by ContactID Fetch

Method Type: GET

returns the Personal Profile information associated with a contact record

'/contacts/{contactid}/personalprofile'

 

Personal Profile by ContactID PUT

Method Type: PUT

Updates a specific Contact Record's Personal Profile information.

'/contacts/{contactid}/personalprofile'


 

Personal Profile By ContactID Fetch

 The URI '/contacts/{contactid}/personalprofile', when coupled with Method Type 'GET',  returns the Personal Profile information related to a specific contact record.

https://api2.redtailtechnology.com/crm/v1/rest/contacts/{ContactID}/personalprofile

https://api2.redtailtechnology.com/crm/v1/rest/contacts/384843/personalprofile


Below is a sample request in C# using our URI, sample credentials, and the method type. The content type "text/json" work equally well.

HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("https://api2.redtailtechnology.com/crm/v1/rest/contacts/384843/personalprofile");
req.Headers[System.Net.HttpRequestHeader.Authorization] = "Basic " + Convert.ToBase64String(System.Text.Encoding.Default.GetBytes("6C135EDF-C37C-4039-AEF3-5DFC079F9E6A:Statementone:sonedemo"));
req.Method = "GET";
req.ContentType = "text/xml";

//and here's the response stream.
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());

 

The corresponding response(xml) will be similar to the following.

 

Personal Profile By ContactID Put

 The URI '/contacts/{contactid}/personalprofile', when coupled with Method Type 'PUT',  Updates the Personal Profile information for a Contact Record.

https://api2.redtailtechnology.com/crm/v1/rest/contacts/{ContactID}/personalprofile/{PersonalProfileID}

https://api2.redtailtechnology.com/crm/v1/rest/contacts/384843/personalprofile/9464

 

Request Header example (C#)

HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("https://api2.redtailtechnology.com/crm/v1/rest/contacts/384843/personalprofile/9464");
req.Headers[System.Net.HttpRequestHeader.Authorization] = "Basic " + Convert.ToBase64String(System.Text.Encoding.Default.GetBytes("6C135EDF-C37C-4039-AEF3-5DFC079F9E6A:statementone:sonedemo"));
req.Method = "PUT";
req.ContentType = "text/json";

 

Request Body example (C#)

string reqJSON = "{""AnnualReview"":""\/Date(1336633200000-0700)\/"",""AnnualReview_Frequency"":""M"",""AnnualReview_Next"":""\/Date(1347260400000-0700)\/"",""BirthPlace"":""Sacramento, CA"",""ClientID"":384843,""DriversLicense_ExpirationDate"":""3\/1\/2011"",""DriversLicense_IssueDate"":""12\/1\/2000"",""DriversLicense_Number"":""A94658776"",""DriversLicense_State"":""MN"",""Greencard_Number"":""GENAD41"",""GrossAnnualIncome"":160000.0000,""Height"":""5'8\"""",""ImportantInformation"":""She loves shoes!"",""MaidenName"":""Tate"",""MedicalConditions"":""Hip replacement, PE, MS, and Sleep Apnea"",""Occupation"":""Business Executive"",""OccupationStartDate"":""\/Date(1004079600000-0700)\/"",""Passport_Number"":""2992\/dds"",""ProfessionalContact_Attorney"":1625755,""ProfessionalContact_CPA"":1626002,""ProfessionalContact_Doctor"":384551,""ProfessionalContact_InsuranceAgent"":1624346,""ProfessionalContact_Other"":1626028,""RecAdd"":""\/Date(1105666736390-0800)\/"",""RetirementDate"":""\/Date(2075958000000-0700)\/"",""Smoker"":false,""Weight"":""120""}";
byte[] reqBody = System.Text.Encoding.ASCII.GetBytes(reqJSON);

//Request Stream
req.GetRequestStream().Write(reqBody, 0, reqBody.Length);

//and here's the response stream.
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk