This article will walk you through the Assets & Liabilities fetch method. The purpose of this method is to return all of the assets and liabilities page information for a specific contact.
Method Type: GET
returns a full list of a contact's Assets and Liabilities.
'/contacts/{contactid}/assets-liabilities'
The URI '/contacts/{contactid}/assets-liabilities', when paired with the Method Type 'GET', returns a List of Assets and Liabilities for a specific Contact.
A popular Contact used for testing in our test database is 'Mary Investor'. So we will use her ContactID in the URI below.
'contacts/{contactid}/assets-liabilities'
https://api2.redtailtechnology.com/crm/v1/rest/contacts/384843/assets-liabilities
The following tables represent the possible values for Asset Types and Liabilitiy Types.
Liability Types | |
TypeID |
Type
|
1
|
Auto Loan
|
2
|
Credit Card Debt
|
3
|
Mortgage
|
4
|
Other
|
5
|
Personal Loan
|
Asset Types | |
TypeID |
Type
|
1
|
Checking Account
|
2
|
Savings Account
|
3
|
Money Markey
|
4
|
CD
|
5
|
T-Bill
|
6
|
Stock
|
7
|
Mutual FUnd
|
8
|
Real Estate
|
9
|
Other
|
10
|
Bond
|
11
|
Automobile
|
12
|
Managed Accounts
|
13
|
IRA
|
14
|
Pension
|
15
|
Annuity
|
16
|
Collectables
|
17
|
401(k)
|
18
|
Life Insurance
|
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/assets-liabilities"); 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.
Comments