Capitect API Documentation
API Endpoint
https://api.capitect.comThe Capitect API is organized around REST, providing predictable, resource-oriented URLs for data exchange with Capitect.
Getting Started ¶
Authentication
All requests to Capitect via the API require authentication and authorization. When building your integration, you will access Capitect on behalf of your user. You will need to first retrieve an access token, then use the token on all subsequent requests to get access to Capitect resources.
To retrieve an access token you will need a Consumer Capid (username), Consumer API Key (password), User Capid (userCapid), and User API Key (userApiKey). Capitect will provide you a Consumer Capid and Consumer API Key. Your user will provide their User Capid and User API Key. The access token can then be obtained using the Access Token API endpoint (ie /v1/tokens).
Once an access token is obtained, all subsequent requests to Capitect will require the access token in the request header to gain access to Capitect resources.
Errors
-
401
- Missing consumer credentials - Consumer credentials (username and password) are required for basic authentication.
- Invalid consumer capid - Consumer Capid (username) is required for basic authentication.
- Invalid consumer API key - Consumer API Key (password) is required for basic authentication.
- Missing access token - Missing access token in api request.
- Expired access token - Access token has expired. Request new access token via access token request.
- Invalid access token - Access token provided is invalid. Request new access token via access token request.
-
403
- Access Denied - Permission denied to access the requested resource.
- HTTPS is required - HTTPS is required on auth and api calls.
-
404
- Invalid client capid - An invalid client capid was provided.
- Invalid account capid - An invalid account capid was provided.
- Resource not found - Resource could not be found.
Authentication ¶
Access Token ¶
Retrieve access token to start interacting with the API.
Headers
Content-Type: application/x-www-form-urlencoded
Authorization: Basic <encoded_string>
Body
{
userCapid : <user_capid>,
userApiKey : <user_api_key>
}
Headers
Content-Type: application/json
Body
{
"token": <access_token>
"expiry": "2016-12-08T03:06:35.422Z"
}
Headers
Content-Type: application/json
Body
{
"status": 401,
"message": "Invalid consumer capid"
}
{
"status": 401,
"message": "Invalid consumer API key"
}
{
"status": 401,
"message": "Missing consumer credentials"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "HTTPS is required"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "Resource not found"
}
Retrieve Access TokenPOST/v1/tokens
Utilize host https://auth.capitect.com to retrieve access token.
Request authorization settings:
-
Type : Basic Auth
-
Username : <consumer_capid>
-
Password : <consumer_api_key>
Note: Request header is automatically generated.
Request body parameters:
-
userCapid : <user_capid>,
-
userApiKey : <user_api_key>
Access tokens have a one hour time limit upon first retrieval. A new access token will need to be retrieved again if previous token expires.
Clients ¶
Client List ¶
Retrieve list of clients associated with a user.
Headers
Content-Type: application/json
Authorization: Bearer <access_token>
Headers
Content-Type: application/json
Body
[
{
"capid": "cli012dd1npCne9",
"name": "MGP",
"members": [
{
"capid": "usr01EiyoB8QrAD",
"firstName": "User1fn",
"lastName": "User1ln",
"email": "201612012c3@yahoo.com"
},
{
"capid": "usr01PqbyHO0Bid",
"firstName": "User2fn",
"lastName": "User2ln",
"email": "201612012c4@yahoo.com"
}
]
},
{
"capid": "cli01syZWlhdIuy",
"name": "20161202c1",
"members": [
{
"capid": "usr01MXaTA7Qhd0",
"firstName": "20161202c1",
"lastName": "20161202c1",
"email": "20161202c1@yahoo.com"
},
{
"capid": "usr01s7aZvPkBfI",
"firstName": "20161202c2",
"lastName": "20161202c2",
"email": "20161202c2@yahoo.com"
}
]
}
]
Headers
Content-Type: application/json
Body
{
"status": 401,
"message": "Missing access token"
}
{
"status": 401,
"message": "Expired access token"
}
{
"status": 401,
"message": "Invalid access token"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "HTTPS is required"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "Resource not found"
}
{
"status": 403,
"message": "Invalid client capid"
}
Retrieve Client ListGET/v1/clients
Utilize host https://api.capitect.com to retrieve Capitect resources.
Client Search ¶
Search a user’s client list by name.
Headers
Content-Type: application/json
Authorization: Bearer <access_token>
Headers
Content-Type: application/json
Body
[
{
"capid": "cli012dd1npCne9",
"name": "MGP",
"members": [
{
"capid": "usr01EiyoB8QrAD",
"firstName": "User1fn",
"lastName": "User1ln",
"email": "201612012c3@yahoo.com"
},
{
"capid": "usr01PqbyHO0Bid",
"firstName": "User2fn",
"lastName": "User2ln",
"email": "201612012c4@yahoo.com"
}
]
}
]
Headers
Content-Type: application/json
Body
{
"status": 401,
"message": "Missing access token"
}
{
"status": 401,
"message": "Expired access token"
}
{
"status": 401,
"message": "Invalid access token"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "HTTPS is required"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "Resource not found"
}
{
"status": 403,
"message": "Invalid client capid"
}
Search Client ListGET/v1/clients{?name}
Utilize host https://api.capitect.com to retrieve Capitect resources.
- name
string
(optional) Example: user1Name of client household or client member
Accounts ¶
Client Account List ¶
Get client account list, including balance and holdings.
Headers
Content-Type: application/json
Authorization: Bearer <access_token>
Headers
Content-Type: application/json
Body
[
{
"capid": "acc01bTWbRHUce3",
"name": "Sample",
"type": "Brokerage",
"category": "investment",
"displayCategory": "investment",
"balance": {
"effDate": "2016-12-07",
"amount": 853909.29
},
"holdings": [
{
"capid": "sec01ZTyVpYaJOQ",
"name": "Cash",
"ticker": null,
"cusip": "315994103",
"type": "Cash",
"category": "Student",
"effDate": "2016-12-07",
"quantity": 86098.45304,
"price": 1,
"balance": 86098.45
},
{
"capid": "sec012kMB8mnY4b",
"name": "SPDR® S&P 500 ETF",
"ticker": "SPY",
"cusip": "78462F103",
"type": "Exchange Traded Fund",
"category": "US Equity Large Cap Blend",
"effDate": "2016-12-07",
"quantity": 129.89489,
"price": 15.14,
"balance": 1966.27
},
{
"capid": "sec01nnukeXuUmn",
"name": "iShares 7-10 Year Treasury Bond",
"ticker": "IEF",
"cusip": "464287440",
"type": "Exchange Traded Fund",
"category": "US Fixed Income",
"effDate": "2016-12-07",
"quantity": 5497.18298,
"price": 19.86,
"balance": 109200.42
},
{
"capid": "sec01txZQZVNYNS",
"name": "Vanguard REIT ETF",
"ticker": "VNQ",
"cusip": "922908553",
"type": "Exchange Traded Fund",
"category": "Real Estate Sector Equity",
"effDate": "2016-12-07",
"quantity": 266.32201,
"price": 44.26,
"balance": 11786.91
},
{
"capid": "sec01Yv22qdxRrm",
"name": "Vanguard FTSE Developed Markets ETF",
"ticker": "VEA",
"cusip": "921943858",
"type": "Exchange Traded Fund",
"category": "Global Equity Large Cap",
"effDate": "2016-12-07",
"quantity": 138.8884,
"price": 27.71,
"balance": 3848.68
},
{
"capid": "sec01UhJo9DMLUV",
"name": "iShares MSCI Emerging Markets",
"ticker": "EEM",
"cusip": "464287234",
"type": "Exchange Traded Fund",
"category": "Emerging Markets Equity",
"effDate": "2016-12-07",
"quantity": 29365.9384,
"price": 21.13,
"balance": 620397.96
},
{
"capid": "sec01ZmiorPYNlT",
"name": "iShares TIPS Bond",
"ticker": "TIP",
"cusip": "464287176",
"type": "Exchange Traded Fund",
"category": "Inflation Linked",
"effDate": "2016-12-07",
"quantity": 711.10864,
"price": 28.98,
"balance": 20610.58
}
],
"institution": {
"name": "Capitect Investments (Sample)"
}
},
{
"capid": "acc01bLZt4TFTB1",
"name": "Sample",
"type": "Checking",
"category": "bank",
"displayCategory": "bank",
"balance": {
"effDate": "2016-12-07",
"amount": 197037.36
},
"holdings": [
{
"capid": "sec01ZTyVpYaJOQ",
"name": "Cash",
"ticker": null,
"cusip": "315994103",
"type": "Cash",
"category": "Student",
"effDate": "2016-12-07",
"quantity": 197037.36104,
"price": 1,
"balance": 197037.36
}
],
"institution": {
"name": "Capitect Bank (Sample)"
}
},
{
"capid": "acc01eI5M9Dx5PJ",
"name": "Sample",
"type": "American Express",
"category": "credit card",
"displayCategory": "credit card",
"balance": {
"effDate": "2016-12-07",
"amount": -9219.37
},
"holdings": [
{
"capid": "sec01ZTyVpYaJOQ",
"name": "Cash",
"ticker": null,
"cusip": "315994103",
"type": "Cash",
"category": "Student",
"effDate": "2016-12-07",
"quantity": -9219.36984,
"price": 1,
"balance": -9219.37
}
],
"institution": {
"name": "Capitect Credit Cards (Sample)"
}
},
{
"capid": "acc01sCxaASPTjQ",
"name": "Sample",
"type": "Mortgage",
"category": "loan",
"displayCategory": "loan",
"balance": {
"effDate": "2016-12-07",
"amount": -629382.64
},
"holdings": [
{
"capid": "sec01kK6OLp95Ml",
"name": "Sample",
"ticker": null,
"cusip": null,
"type": "loan",
"category": "Mortgage",
"effDate": "2016-12-07",
"quantity": -629382.64125,
"price": 1,
"balance": -629382.64
}
],
"institution": {
"name": "Capitect Loans (Sample)"
}
},
{
"capid": "acc01VD7R6E5PdT",
"name": "Sample",
"type": "Brokerage",
"category": "investment",
"displayCategory": "investment",
"balance": {
"effDate": "2016-12-07",
"amount": 934374.74
},
"holdings": [
{
"capid": "sec01ZTyVpYaJOQ",
"name": "Cash",
"ticker": null,
"cusip": "315994103",
"type": "Cash",
"category": "Student",
"effDate": "2016-12-07",
"quantity": 40291.05019,
"price": 1,
"balance": 40291.05
},
{
"capid": "sec012kMB8mnY4b",
"name": "SPDR® S&P 500 ETF",
"ticker": "SPY",
"cusip": "78462F103",
"type": "Exchange Traded Fund",
"category": "US Equity Large Cap Blend",
"effDate": "2016-12-07",
"quantity": 5170.70707,
"price": 27.6,
"balance": 142690.9
},
{
"capid": "sec01nnukeXuUmn",
"name": "iShares 7-10 Year Treasury Bond",
"ticker": "IEF",
"cusip": "464287440",
"type": "Exchange Traded Fund",
"category": "US Fixed Income",
"effDate": "2016-12-07",
"quantity": 11681.87155,
"price": 27.12,
"balance": 316776.44
},
{
"capid": "sec01txZQZVNYNS",
"name": "Vanguard REIT ETF",
"ticker": "VNQ",
"cusip": "922908553",
"type": "Exchange Traded Fund",
"category": "Real Estate Sector Equity",
"effDate": "2016-12-07",
"quantity": 2085.95568,
"price": 25.26,
"balance": 52688.6
},
{
"capid": "sec01Yv22qdxRrm",
"name": "Vanguard FTSE Developed Markets ETF",
"ticker": "VEA",
"cusip": "921943858",
"type": "Exchange Traded Fund",
"category": "Global Equity Large Cap",
"effDate": "2016-12-07",
"quantity": 437.13949,
"price": 21.45,
"balance": 9376.47
},
{
"capid": "sec01UhJo9DMLUV",
"name": "iShares MSCI Emerging Markets",
"ticker": "EEM",
"cusip": "464287234",
"type": "Exchange Traded Fund",
"category": "Emerging Markets Equity",
"effDate": "2016-12-07",
"quantity": 14377.10242,
"price": 18.25,
"balance": 262347.02
},
{
"capid": "sec01ZmiorPYNlT",
"name": "iShares TIPS Bond",
"ticker": "TIP",
"cusip": "464287176",
"type": "Exchange Traded Fund",
"category": "Inflation Linked",
"effDate": "2016-12-07",
"quantity": 9089.75044,
"price": 12.12,
"balance": 110204.26
}
],
"institution": {
"name": "Capitect Investments (Sample)"
}
},
{
"capid": "acc01OEeO7caulK",
"name": "Sample",
"type": "Brokerage",
"category": "investment",
"displayCategory": "investment",
"balance": {
"effDate": "2016-12-07",
"amount": 818502.47
},
"holdings": [
{
"capid": "sec01ZTyVpYaJOQ",
"name": "Cash",
"ticker": null,
"cusip": "315994103",
"type": "Cash",
"category": "Student",
"effDate": "2016-12-07",
"quantity": 58060.16964,
"price": 1,
"balance": 58060.17
},
{
"capid": "sec012kMB8mnY4b",
"name": "SPDR® S&P 500 ETF",
"ticker": "SPY",
"cusip": "78462F103",
"type": "Exchange Traded Fund",
"category": "US Equity Large Cap Blend",
"effDate": "2016-12-07",
"quantity": 6555.45477,
"price": 37.93,
"balance": 248627.3
},
{
"capid": "sec01nnukeXuUmn",
"name": "iShares 7-10 Year Treasury Bond",
"ticker": "IEF",
"cusip": "464287440",
"type": "Exchange Traded Fund",
"category": "US Fixed Income",
"effDate": "2016-12-07",
"quantity": 10525.17638,
"price": 17.6,
"balance": 185198.34
},
{
"capid": "sec01txZQZVNYNS",
"name": "Vanguard REIT ETF",
"ticker": "VNQ",
"cusip": "922908553",
"type": "Exchange Traded Fund",
"category": "Real Estate Sector Equity",
"effDate": "2016-12-07",
"quantity": 1182.55414,
"price": 46.34,
"balance": 54804.79
},
{
"capid": "sec01Yv22qdxRrm",
"name": "Vanguard FTSE Developed Markets ETF",
"ticker": "VEA",
"cusip": "921943858",
"type": "Exchange Traded Fund",
"category": "Global Equity Large Cap",
"effDate": "2016-12-07",
"quantity": 8601.75408,
"price": 16.5,
"balance": 141939.74
},
{
"capid": "sec01UhJo9DMLUV",
"name": "iShares MSCI Emerging Markets",
"ticker": "EEM",
"cusip": "464287234",
"type": "Exchange Traded Fund",
"category": "Emerging Markets Equity",
"effDate": "2016-12-07",
"quantity": 1156.59824,
"price": 30.13,
"balance": 34852.22
},
{
"capid": "sec01ZmiorPYNlT",
"name": "iShares TIPS Bond",
"ticker": "TIP",
"cusip": "464287176",
"type": "Exchange Traded Fund",
"category": "Inflation Linked",
"effDate": "2016-12-07",
"quantity": 2831.95328,
"price": 33.55,
"balance": 95019.91
}
],
"institution": {
"name": "Capitect Investments (Sample)"
}
}
]
Headers
Content-Type: application/json
Body
{
"status": 401,
"message": "Missing access token"
}
{
"status": 401,
"message": "Expired access token"
}
{
"status": 401,
"message": "Invalid access token"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "HTTPS is required"
}
{
"status": 403,
"message": "Access Denied"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "Resource not found"
}
{
"status": 403,
"message": "Invalid client capid"
}
Retrieve Client Account ListGET/v1/clients/{capid}/accounts
Utilize host https://api.capitect.com to retrieve Capitect resources.
- capid
string
(required) Example: cli012dd1npCne9Capid of the client
Single Account ¶
Get single account, including balance and holdings.
Headers
Content-Type: application/json
Authorization: Bearer <access_token>
Headers
Content-Type: application/json
Body
{
"capid": "acc01bTWbRHUce3",
"name": "Sample",
"type": "Brokerage",
"category": "investment",
"displayCategory": "investment",
"balance": {
"effDate": "2016-12-07",
"amount": 853909.29
},
"holdings": [
{
"capid": "sec01ZTyVpYaJOQ",
"name": "Cash",
"ticker": null,
"cusip": "315994103",
"type": "Cash",
"category": "Student",
"effDate": "2016-12-07",
"quantity": 86098.45304,
"price": 1,
"balance": 86098.45
},
{
"capid": "sec012kMB8mnY4b",
"name": "SPDR® S&P 500 ETF",
"ticker": "SPY",
"cusip": "78462F103",
"type": "Exchange Traded Fund",
"category": "US Equity Large Cap Blend",
"effDate": "2016-12-07",
"quantity": 129.89489,
"price": 15.14,
"balance": 1966.27
},
{
"capid": "sec01nnukeXuUmn",
"name": "iShares 7-10 Year Treasury Bond",
"ticker": "IEF",
"cusip": "464287440",
"type": "Exchange Traded Fund",
"category": "US Fixed Income",
"effDate": "2016-12-07",
"quantity": 5497.18298,
"price": 19.86,
"balance": 109200.42
},
{
"capid": "sec01txZQZVNYNS",
"name": "Vanguard REIT ETF",
"ticker": "VNQ",
"cusip": "922908553",
"type": "Exchange Traded Fund",
"category": "Real Estate Sector Equity",
"effDate": "2016-12-07",
"quantity": 266.32201,
"price": 44.26,
"balance": 11786.91
},
{
"capid": "sec01Yv22qdxRrm",
"name": "Vanguard FTSE Developed Markets ETF",
"ticker": "VEA",
"cusip": "921943858",
"type": "Exchange Traded Fund",
"category": "Global Equity Large Cap",
"effDate": "2016-12-07",
"quantity": 138.8884,
"price": 27.71,
"balance": 3848.68
},
{
"capid": "sec01UhJo9DMLUV",
"name": "iShares MSCI Emerging Markets",
"ticker": "EEM",
"cusip": "464287234",
"type": "Exchange Traded Fund",
"category": "Emerging Markets Equity",
"effDate": "2016-12-07",
"quantity": 29365.9384,
"price": 21.13,
"balance": 620397.96
},
{
"capid": "sec01ZmiorPYNlT",
"name": "iShares TIPS Bond",
"ticker": "TIP",
"cusip": "464287176",
"type": "Exchange Traded Fund",
"category": "Inflation Linked",
"effDate": "2016-12-07",
"quantity": 711.10864,
"price": 28.98,
"balance": 20610.58
}
],
"institution": {
"name": "Capitect Investments (Sample)"
}
}
Headers
Content-Type: application/json
Body
{
"status": 401,
"message": "Missing access token"
}
{
"status": 401,
"message": "Expired access token"
}
{
"status": 401,
"message": "Invalid access token"
}
Headers
Content-Type: application/json
Body
{
"status": 403,
"message": "HTTPS is required"
}
Headers
Content-Type: application/json
Body
{
"status": 404,
"message": "Invalid account capid"
}
Retrieve Single AccountGET/v1/accounts/{capid}
Utilize host https://api.capitect.com to retrieve Capitect resources.
- capid
string
(required) Example: acc01bTWbRHUce3Capid of the account
Generated on 08 Sep 2020