NAV

Nucleus  Proton  Electron

curl java javascript php python ruby

Introduction

Authentication Base URL

https://api.hydrogenplatform.com/authorization/v1

Nucleus Base URL

https://api.hydrogenplatform.com/nucleus/v1

The Nucleus API provides the data model for Hydrogen no-code applications. This includes the base functionality to authenticate, onboard clients and accounts, and store and process data which all other APIs in Hydrogen will utilize.

All Hydrogen APIs are built on REST principles, with resource oriented URLs and HTTP response codes. All API responses are returned in JSON format. Additional features of the API include filtering, pagination, and data caching.

Run in Postman

Authentication

API Authentication

After successful registration of your application, you will be provided a client_id and client_secret which will be used to identify your application when calling any Hydrogen API.

We require all API calls to be made over HTTPS connections.

OAuth 2.0 Authorization

Hydrogen uses OAuth 2.0 to facilitate authorization on the API, an industry standard framework for authorization. Two standard type of flows are supported:

  1. Client Credentials
  2. Resource Owner Password Credentials

Client Credentials

The Client Credentials authorization flow consists of exchanging a client_id and client_secret for an access_token to be provided when making calls to the Hydrogen API. This type of authorization is used for the application to access resources about itself rather than a user.

Example Request

curl -X POST -H "Authorization: Basic <Base64 encoded client_id:client_secret>" \
"https://api.hydrogenplatform.com/authorization/v1/oauth/token?grant_type=client_credentials"
from __future__ import print_function
import time
import proton_api
from proton_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
configuration = proton_api.Configuration()

# create an instance of the API class
api_instance = proton_api.AuthApi(proton_api.ApiClient(configuration))

api_token_response = api_instance.create_using_post_client_credentials("MYCLIENTID", "MYPASSWORD")
print(api_token_response.access_token)
configuration.access_token = api_token_response.access_token
require 'nucleus_api'
NucleusApi.configure do |config|
 config.create_client_credential("CLIENT_ID", "CLIENT_SECRET");
end
import com.hydrogen.nucleus.ApiException;
import com.hydrogen.nucleus.AuthApiClient;

# Create an instance of the Auth Api Client class
AuthApiClient authApiClient = new AuthApiClient();
try {
    authApiClient.createClientCredential("MYCLIENTID","MYCLIENTSECRET");
} catch (ApiException e) {
    e.printStackTrace();
}
var HydrogenNucleusApi = require('hydrogen_nucleus_api');
var defaultClient = HydrogenNucleusApi.ApiClient.instance;
# Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
# Create an instance of the Auth API class
var api = new HydrogenNucleusApi.AuthApi();

# Callback function definition
var tokenGenerationCallback = function (error, data, response) {
    if (error) {
        console.error(error);
        process.exit(1);
    } else {
        console.log(response.request.method + ' : ' + response.request.url + '\n' + 'Output: ' + JSON.stringify(data, null, '\t') + '\n');
        oauth2.accessToken = data.access_token;
    }
};

# Token Generation for grant_type = client_credentials
api.createUsingPostClientCredentials({
    'grant_type': 'client_credentials',
    'client_id': 'MYCLIENTID',
    'client_secret': 'MYCLIENTSECRET'
}, tokenGenerationCallback);
require_once('../vendor/autoload.php');

use com\hydrogen\nucleus\ApiException;
use com\hydrogen\nucleus\AuthApiClient;

try {
    $config =
        AuthApiClient::getDefaultConfiguration()
            ->createClientCredential("MYCLIENTID", "MYCLIENTSECRET");
} catch (ApiException $e) {
    print_r($e);
}

Example Response

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJ4Il0sImV4cCI6MTU4NjQ3OTcxNCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9TVVBFUl9BRE1JTiJdLCJqdGkiOiIwNDMzZjA1Ni00NWQyLTQ0MjYtODliNi01MjMwMTNiZjdhOGEiLCJjbGllbnRfaWQiOiJUZXN0VXNlciIsImFwcHMiOiJudWNsZXVzLHByb3RvbixlbGVjdHJvbixoeWRybyxpb24saW50ZWdyYXRpb24ifQ.oJHd6pIu2f6zwP4jGe-MIRK0FVCC-82EVrld5kbJoRYtvs_27KM0xZm-VfkfKN8q5qnKyqfWUyS4ptoDhg4UWVuJ3st9Gp6k_EWDFTGVQmxtsn4Sc_c3VTjpW39ZDTQAoGFH4T6yOaIr5FYQaBN17kAt2_ELEyrXwvGG3BVVG-pX3nFnu98meYIoq7pQt-1EMKIOMLWuillO5FuVYgJpy1LFfVIrdlbWKtKB3HTGpKw5oVqa7L978jRBM94WZU2pRGabYBQs4Tzs-qaEdPGF2VuOMKIPj1GTxeFg6pB8e1oyEaC1o-p_-qG3H0Vm0RFKBDoBq8nEnf_U8pHaJ7Ta6w",
  "token_type": "bearer",
  "expires_in": 86400,
  "scope": "gpr",
  "limits": {"total_limit":10000},
  "apps": "nucleus,proton,integration",
  "jti": "ea4289b3-72b8-43e3-bab3-f54159a997dd"
}

All subsequent API calls will then be made like the following example. Replace <access_token> after Bearer with the access_token received above:

curl -X GET -H "Authorization: Bearer <access_token>" \
"https://api.hydrogenplatform.com/nucleus/v1/account"

The client credentials flow is used by your application to obtain permission to act on its own behalf. A call will be made to our OAuth server to exchange your client_id, client_secret, and grant_type=client_credentials for an access_token, which can then be used to make calls to Hydrogen on behalf of the application.

HTTP REQUEST

POST https://api.hydrogenplatform.com/authorization/v1/oauth/token?grant_type=client_credentials

ARGUMENTS

Parameter Type Required Description
client_id string required Application id for identification, which will be given to you when you are onboarded
client_secret string required Application secret, which will be given to you only once when you are onboarded. Please keep this in a safe place
grant_type string required Must be set to client_credentials

RESPONSE

Field Description
access_token JWT token that will be used for all subsequent API calls as a Bearer token in the header
expires_in When the token expires in seconds and will need to be called again. Default is 86400 or 24 hours.
token_type Always will be bearer
scope The scope your user has been granted in the application
limits Total API call limits assigned to your tenant
apps APIs to which the user has access. Possible values include nucleus, proton, plasma, molecule, integration
jti Unique identifier for the JWT token

Resource Owner Password Credentials

The Resource Owner Password Credentials authorization flow consists of exchanging a username and password specific to a user in addition to your client_id and client_secret for an access_token, to be provided when making calls to the Hydrogen API. This type of authorization validates the username and password of a user and is used for the application to access resources about a user.

Example Request

curl -X POST -H "Authorization: Basic <Base64 encoded client_id:client_secret>" \
"https://api.hydrogenplatform.com/authorization/v1/oauth/token?grant_type=password&username={username}&password={password}"
from __future__ import print_function
import time
import nucleus_api
from nucleus_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
configuration = nucleus_api.Configuration()

# create an instance of the API class
api_instance = nucleus_api.AuthApi(nucleus_api.ApiClient(configuration))

# Fetch and set access token with client_id, client_secret, username, password
api_token_response = api_instance.api_instance.create_using_post_password_credentials("MYCLIENTID","MYCLIENTSECRET", "MYUSERNAME", "MYPASSWORD" )
print(api_token_response.access_token)
configuration.access_token = api_token_response.access_token
require 'nucleus_api'
NucleusApi.configure do |config|
 config.create_password_credential("CLIENT_ID", "CLIENT_SECRET", "USERNAME", "PASSWORD");
end
import com.hydrogen.nucleus.ApiException;
import com.hydrogen.nucleus.AuthApiClient;

# Create an instance of the Auth Api Client class
AuthApiClient authApiClient = new AuthApiClient();
try {
    authApiClient.createPasswordCredential("MYCLIENTID","MYCLIENTSECRET","MYUSERNAME", "MYPASSWORD");
} catch (ApiException e) {
    e.printStackTrace();
}
var HydrogenNucleusApi = require('hydrogen_nucleus_api');
var defaultClient = HydrogenNucleusApi.ApiClient.instance;
# Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
# Create an instance of the Auth API class
var api = new HydrogenNucleusApi.AuthApi();

# Callback function definition
var tokenGenerationCallback = function (error, data, response) {
    if (error) {
        console.error(error);
        process.exit(1);
    } else {
        console.log(response.request.method + ' : ' + response.request.url + '\n' + 'Output: ' + JSON.stringify(data, null, '\t') + '\n');
        oauth2.accessToken = data.access_token;
    }
};

# Token Generation for grant_type = password
api.createUsingPostPassword({
    'grant_type': 'password',
    'username' : 'MYUSERNAME',
    'password' : 'MYPASSWORD',
    'client_id': 'MYCLIENTID',
    'client_secret': 'MYCLIENTSECRET'
}, tokenGenerationCallback);
require_once('../vendor/autoload.php');

use com\hydrogen\nucleus\ApiException;
use com\hydrogen\nucleus\AuthApiClient;

try {
  $config =
        AuthApiClient::
        getDefaultConfiguration()->createPasswordCredential(
            "MYCLIENTID","MYCLIENTSECRET"
            ,"MYUSERNAME", "MYPASSWORD"
        );
} catch (ApiException $e) {
    print_r($e);
}

Example Response

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJ4Il0sImV4cCI6MTU4NjQ3OTcxNCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9TVVBFUl9BRE1JTiJdLCJqdGkiOiIwNDMzZjA1Ni00NWQyLTQ0MjYtODliNi01MjMwMTNiZjdhOGEiLCJjbGllbnRfaWQiOiJUZXN0VXNlciIsImFwcHMiOiJudWNsZXVzLHByb3RvbixlbGVjdHJvbixoeWRybyxpb24saW50ZWdyYXRpb24ifQ.oJHd6pIu2f6zwP4jGe-MIRK0FVCC-82EVrld5kbJoRYtvs_27KM0xZm-VfkfKN8q5qnKyqfWUyS4ptoDhg4UWVuJ3st9Gp6k_EWDFTGVQmxtsn4Sc_c3VTjpW39ZDTQAoGFH4T6yOaIr5FYQaBN17kAt2_ELEyrXwvGG3BVVG-pX3nFnu98meYIoq7pQt-1EMKIOMLWuillO5FuVYgJpy1LFfVIrdlbWKtKB3HTGpKw5oVqa7L978jRBM94WZU2pRGabYBQs4Tzs-qaEdPGF2VuOMKIPj1GTxeFg6pB8e1oyEaC1o-p_-qG3H0Vm0RFKBDoBq8nEnf_U8pHaJ7Ta6w",
  "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJib3J5YS5pdmNoZW5rb0BtYWlsLnJ1Iiwic2NvcGUiOlsieCJdLCJhdGkiOiJkZDMxODJiZS0wYmNlLTQ0Y2MtOTM5Yi03YzAzMmRlOTExNmYiLCJleHAiOjE2MDk3MDY1NDAsImF1dGhvcml0aWVzIjpbIlJPTEVfQ0xJRU5UIl0sImp0aSI6ImQzMGFmM2JiLWQ4OTUtNDAxZi1iODFkLTBiOTEyNThjOWIzOCIsImxpbWl0cyI6eyJ0b3RhbF9saW1pdCI6MTAwMDAwfSwiY2xpZW50X2lkIjoiVGVzdFVzZXIiLCJhcHBzIjoibnVjbGV1cyxwcm90b24sZWxlY3Ryb24saHlkcm8saW9uLGludGVncmF0aW9uIn0.Ei-AgWolKsDzxyNZlTLuVc89VhdE1BRf1YeXutdGGqYDW3WLT1LUfa288tsfBs0PEELrCVtKwks7-BcRirtuxLWTuojoLyEJTGtRdtezxLo5QozQF2x-vFGcIs9YJo-SdbPTcUWdPI5ZgsaLVIDL0Q68gFl9DIH-VYSIGpBhpgiqPbvRmlnK2NnDS73ufILleNmexZcTmWgUy6yRVZyEAZ5-lQKKWNL8S69Ij0ZuURkJqvHtPluIw-8yVB_A3EtwU_E2b5tAV6BCK3QWxHSQKhwe5ZL9rRdm-QPfWeSvQGfqhAFkF27xk47Khw93pB6el49aXdYz11e-DQybJG1hAA",
  "token_type": "bearer",
  "expires_in": 86400,
  "scope": "gpr",
  "limits": {"total_limit":10000},
  "apps": "nucleus,proton,electron",
  "jti": "6118a6c2-92fd-450f-ae1d-198150c0b579"
}

All subsequent API calls will then be made like the following example. Replace <access_token> after Bearer with the access_token received above:

curl -X GET -H "Authorization: Bearer <access_token>" \
"https://api.hydrogenplatform.com/nucleus/v1/account"

The resource owner password credentials flow, or password credentials flow, is used to identify specific users and act according to their permissions. A call will be made to our OAuth server to exchange your client_id and client_secret as well as the user’s username and password, and grant_type=password for a user-specific access_token, which can then be used to make calls to Hydrogen APIs.


HTTP REQUEST

POST https://api.hydrogenplatform.com/authorization/v1/oauth/token?grant_type=password&username={username}&password={password}

ARGUMENTS

Parameter Type Required Description
client_id string required Application id for identification, which will be given to you when you are onboarded
client_secret string required Application secret, which will be given to you only once when you are onboarded. Please keep this in a safe place
username string required User’s unique username for the application
password string required User’s unique password for the application
grant_type string required Must be set to password

RESPONSE

Field Description
access_token JWT access token that will be used for all subsequent API calls as a Bearer token in the header
refresh_token Exchange a refresh_token for an access_token when the access_token has expired. This allows you to continue to have a valid access_token without further interaction with the user.
expires_in When the token expires in seconds and will need to be called again. Default is 86400 or 24 hours.
token_type Always will be bearer
scope N/A - this is embedded in the access_token returned
limits Total API call limits assigned to your tenant
apps APIs to which the user has access. Possible values include nucleus, proton, electron, plasma, integration
jti Unique identifier for the JWT token

Custom Client Token

The Custom Client Token flow consists of exchanging a signed payload with a private key in addition to your client_id and client_secret for an access_token, to be provided when making calls to the Hydrogen API. This JWT token exchange follows standards set by IETF for OAuth 2.0 Token Exchange. This type of authorization validates a user’s permission to access their data, while allowing you to maintain the login credentials for the user. It should be used if you already have a web or mobile app with a user credentialing system. You will only need to map the username for the user in the Nucleus Client service below, and not the password. If you do not have or need this capability, Hydrogen will store all user details, and you will use the Resource Owner Password Credentials OAuth flow instead.

Example Request

curl -X POST -H "Authorization: Basic <Base64 encoded client_id:client_secret>" \
-H "Client-Token: Bearer <signed token payload>" \
"https://api.hydrogenplatform.com/authorization/v1/client-token"
from __future__ import print_function
import time
import nucleus_api
from nucleus_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
configuration = nucleus_api.Configuration()

# create an instance of the API class
api_instance = nucleus_api.AuthApi(nucleus_api.ApiClient(configuration))

# Fetch and set access token with client_id, client_secret, client_token
api_token_response = api_instance.create_client_token_credentials("client_id", "client_secret", "client_token");
print(api_token_response.access_token)
configuration.access_token = api_token_response.access_token
configuration.access_token = api_token_response.access_token
require 'nucleus_api'
NucleusApi.configure do |config|
 config.create_client_token_credential("CLIENT_ID", "CLIENT_SECRET", "CLIENT_TOKEN")
end
import com.hydrogen.nucleus.ApiException;
import com.hydrogen.nucleus.AuthApiClient;

# Create an instance of the Auth Api Client class
AuthApiClient authApiClient = new AuthApiClient();
try {
    authApiClient.createClientTokenCredential("CLIENT_ID", "CLIENT_SECRET", "CLIENT_TOKEN");
} catch (ApiException e) {
    e.printStackTrace();
}
var HydrogenNucleusApi = require('hydrogen_nucleus_api');
var defaultClient = HydrogenNucleusApi.ApiClient.instance;
# Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
# Create an instance of the Auth API class
var api = new HydrogenNucleusApi.AuthApi();

# Callback function definition
var tokenGenerationCallback = function (error, data, response) {
    if (error) {
        console.error(error);
        process.exit(1);
    } else {
        console.log(response.request.method + ' : ' + response.request.url + '\n' + 'Output: ' + JSON.stringify(data, null, '\t') + '\n');
        oauth2.accessToken = data.access_token;
    }
};

//Token Generation using client token
api.createUsingPostClientTokenCredentials({
    'client_id': 'MYCLIENTID',
    'client_secret': 'MYCLIENTSECRET',
    'client_token' : 'CLIENT_TOKEN'
}, tokenGenerationCallback);
require_once('../vendor/autoload.php');

use com\hydrogen\nucleus\ApiException;
use com\hydrogen\nucleus\AuthApiClient;

try {
  $config =
        AuthApiClient::
        getDefaultConfiguration()->createClientTokenCredential("MYCLIENTID",
        "MYCLIENTSECRET", "CLIENT_TOKEN");
} catch (ApiException $e) {
    print_r($e);
}

Example Response

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJvazIiLCJleHAiOjE2MDA5MzAyODAsImF1dGhvcml0aWVzIjpbIlJPTEVfQURNSU4iLCJST0xFX0FCQyIsIlJPTEVfQ0xJRU5UIl0sImp0aSI6ImZiNzQ5OTUwLWRhMzctNGViNS04NTEzLWJmZjQ1YWNkOTkwOSIsImxpbWl0cyI6e30sImNsaWVudF9pZCI6IkludGVncmF0aW9uVGVzdCIsImFwcHMiOiJudWNsZXVzLHByb3RvbixlbGVjdHJvbixoeWRybyxwbGFzbWEsaW9uLG1vbGVjdWxlLGludGVncmF0aW9uIn0.TRYTtaB_E4DAPlrt9mWpHsx6_XO3sKLlNaqAMir71uzO1HI-03RdF3ecDLraMRAiXMVqt150MOZnrtu5YOlpCYXUiwa8RBp9ofaMa4NOrYjpRmqq5c7rvZ1ZzvbG7olg8ivNCLzde4pjeCYi25mOZ3A-AGSnUQqn4URBjzr3CJo4MQb_DNWY2ns2MEm2Hm76O_7CiBKCSD2AfccLGC8CFzDnlnuTE40RYE1-6roHlN4yqop3vmiZ6UquqwLjnweQhYKWL7WUqYwapOZmIu_TyC8IEJl1csrJhMh9FExtaxY50ABldCzWeXEJzR1oX8NEZ2kyio1_w9COGsCs2qr61w",
  "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJib3J5YS5pdmNoZW5rb0BtYWlsLnJ1Iiwic2NvcGUiOlsieCJdLCJhdGkiOiJkZDMxODJiZS0wYmNlLTQ0Y2MtOTM5Yi03YzAzMmRlOTExNmYiLCJleHAiOjE2MDk3MDY1NDAsImF1dGhvcml0aWVzIjpbIlJPTEVfQ0xJRU5UIl0sImp0aSI6ImQzMGFmM2JiLWQ4OTUtNDAxZi1iODFkLTBiOTEyNThjOWIzOCIsImxpbWl0cyI6eyJ0b3RhbF9saW1pdCI6MTAwMDAwfSwiY2xpZW50X2lkIjoiVGVzdFVzZXIiLCJhcHBzIjoibnVjbGV1cyxwcm90b24sZWxlY3Ryb24saHlkcm8saW9uLGludGVncmF0aW9uIn0.Ei-AgWolKsDzxyNZlTLuVc89VhdE1BRf1YeXutdGGqYDW3WLT1LUfa288tsfBs0PEELrCVtKwks7-BcRirtuxLWTuojoLyEJTGtRdtezxLo5QozQF2x-vFGcIs9YJo-SdbPTcUWdPI5ZgsaLVIDL0Q68gFl9DIH-VYSIGpBhpgiqPbvRmlnK2NnDS73ufILleNmexZcTmWgUy6yRVZyEAZ5-lQKKWNL8S69Ij0ZuURkJqvHtPluIw-8yVB_A3EtwU_E2b5tAV6BCK3QWxHSQKhwe5ZL9rRdm-QPfWeSvQGfqhAFkF27xk47Khw93pB6el49aXdYz11e-DQybJG1hAA",
  "token_type": "bearer",
  "expires_in": 86399,
  "user_name": "joe@email.com",
  "limits": {},
  "authorities": [
    "ROLE_CLIENT"
  ],
  "apps": "nucleus,proton,plasma,integration",
  "jti": "fb749950-da37-4eb5-8513-bff45acd9909"
}

All subsequent API calls will then be made like the following example. Replace <access_token> after Bearer with the access_token received above:

curl -X GET -H "Authorization: Bearer <access_token>" \
"https://api.hydrogenplatform.com/nucleus/v1/account"


HTTP REQUEST

POST https://api.hydrogenplatform.com/authorization/v1/client-token

SETUP

Please follow the steps below to create your custom JWT token:

  1. Create your public/private key pair. We ONLY accept a key in 2048 bit PKCS#8 encoded format. Recommended site for creation: https://travistidwell.com/jsencrypt/demo/
  2. Store the private key that is created in your application securely
  3. Login to the Hydrogen dev portal and upload the public key that is created under “API Access” in the settings dropdown on the top right.

TOKEN CREATION

Sign the following payload using your private key. See example code for the language of your choice in the right panel.

{
    ”sub”: “insert your Nucleus Client username“,
    ”iss”: “insert your OAuth credentials client_id“,
    ”exp”: The epoch time the token expires,
    ”iat”: The epoch time the token is issued
}

Algorithm and token type
{
    ”typ”: “JWT”,
    ”alg”: “RS512”
}

After signing the payload you can now submit the payload as a Basic header, along with a Basic Base64 encoded client_id and client_secret. The response should now give you the same access_token that you can use to call all subsequent Hydrogen APIs for this user.

Example payload encryption code

pip3 install -r requirements.txt
Requirements.txt file
PyJWT==1.7.1
cryptography==2.7
cffi>=1.8
pycparser>=2.06
six>=1.4.1
asn1crypto>=0.21.0

import jwt
import time

def generateToken(privateKey, issuer, subject):

    currentTime = int(time.time())

    payload = {}
    payload['iat'] = currentTime
    payload['exp'] = currentTime + 1800
    payload['iss'] = issuer
    payload['sub'] = subject

    # RS512 requires $ pip install cryptography
    encoded_jwt = jwt.encode(payload, privateKey, algorithm='RS512')
    return encoded_jwt

if __name__ == '__main__':

    privateKey = "<PRIVATE KEY>"
    issuer = "<OAuth client_id>"
    subject = "<Client user_name>"
    print(generateToken(privateKey, issuer, subject).decode("utf-8"))
Dependency:

gem install jwt

require 'jwt'
require 'optparse'

key = "<PRIVATE KEY>"

begin
  rsa_private_key = OpenSSL::PKey::RSA.new key
rescue Errno::ENOENT => e
  puts "Caught the exception: #{e}"
  puts usage
  exit -1
end

current_time = Time.now.to_i

payload = {}
payload['iss'] = '<OAuth client_id>'
payload['iat'] = current_time
payload['exp'] = current_time + 1800
payload['sub'] = '<Client user_name>'

token = JWT.encode payload, rsa_private_key, 'RS512', { typ: 'JWT' }

puts token
Dependency:

<dependency>
        <groupId>io.fusionauth</groupId>
        <artifactId>fusionauth-jwt</artifactId>
        <version>3.1.3</version>
</dependency>

import io.fusionauth.jwt.Signer;
import io.fusionauth.jwt.domain.JWT;
import io.fusionauth.jwt.rsa.RSASigner;

import java.time.ZoneOffset;
import java.time.ZonedDateTime;

public class GenerateToken {

    public String generateToken(String privateKey, String issuer, String subject) {
        Signer signer = RSASigner.newSHA512Signer(privateKey);
        JWT jwt = new JWT().setIssuer(issuer)
                .setSubject(subject)
                .setIssuedAt(ZonedDateTime.now(ZoneOffset.UTC))
                .setExpiration(ZonedDateTime.now(ZoneOffset.UTC).plusMinutes(30));

        String encodedJWT = JWT.getEncoder().encode(jwt, signer);
        return encodedJWT;
    }

    public static void main(String[] args) {
         GenerateToken generateToken = new GenerateToken();

         String privateKey = "<PRIVATE KEY>";

         String issuer = "<OAuth client_id>";
         String subject = "<Client user_name>";

        System.out.println(generateToken.generateToken(privateKey, issuer, subject));

    }
}
Dependency

"dependencies": {
"jsonwebtoken": "^8.5.1"
}
const jwt = require('jsonwebtoken')

function generateToken(privateKey, issuer, subject) {

    const currentTime =  Math.floor(Date.now() / 1000);

    const signOptions = {
        algorithm: "RS512"
    };

    let payload = {};

    payload.iss = issuer
    payload.iat = currentTime;
    payload.exp = currentTime + 1800;
    payload.sub = subject;

    return token = jwt.sign(payload, privateKey, signOptions);
}

module.exports = generateToken

if (require.main === module) {

    const privateKey = "<PRIVATE KEY>"
    const issuer = "<OAuth client_id>"
    const subject = "<Client user_name>"

    console.log(generateToken(privateKey, issuer, subject))
}
Dependency
composer require firebase/php-jwt

<?php

require __DIR__ . '/vendor/autoload.php';

use \Firebase\JWT\JWT;

function generate($privateKey, $issuer, $subject) {

    $time = time();

    $key = $privateKey;

    $payload = array(
        "iss" => $issuer,
        "iat" => $time,
        "exp" => $time + 1800,
        "sub" => $subject
    );

    return $jwt = JWT::encode($payload, $key, 'RS512');
}

if (basename(__FILE__) == $_SERVER['SCRIPT_FILENAME']) {

    $privateKey = "<PRIVATE KEY>";
    $issuer = "<OAuth client_id>";
    $subject = "<Client user_name>" ;

    try {
        echo generate($privateKey,$issuer,$subject) . "\n";
    } catch (Exception $e) {
        echo $e->getMessage() . ".\n";
    }
}

RESPONSE

Field Description
access_token JWT access token that will be used for all subsequent API calls as a Bearer token in the header
refresh_token Exchange a refresh_token for an access_token when the access_token has expired. This allows you to continue to have a valid access_token without further interaction with the user.
expires_in When the token expires in seconds and will need to be called again. Default is 86400 or 24 hours.
token_type Always will be bearer
user_name Nucleus username for the client that has been authenticated
limits Total API call limits assigned to your tenant
apps APIs to which the user has access. Possible values include nucleus, proton, electron, plasma, integration
jti Unique identifier for the JWT token

Token Refresh

An access_token will need to be refreshed to continue being authorized for the app. Access tokens are short lived: 24 hours.

The Client Credentials grant type doesn’t return a refresh_token. When your access_token expires, the app has to simply request a new token which will invalidate the previous token. The token can be deserialized to determine how much longer it is valid.

The Password grant type and Custom Client Token does return a refresh_token, which can be used with the request and parameters below, to exchange for a new access_token when it expires. Once you get a new refresh_token in the response, you can replace the old one.

HTTP REQUEST

POST https://api.hydrogenplatform.com/authorization/v1/oauth/token?grant_type=refresh_token

ARGUMENTS

Parameter Type Required Description
refresh_token string required Refresh token stored in the original user authentication
client_id string required Application id for identification, which will be given to you when you are onboarded
client_secret string required Application secret, which will be given to you only once when you are onboarded. Please keep this in a safe place
grant_type string required Must be set to refresh_token

Fields

IDs

All Object IDs are represented in universally unique identifier (UUID) format. A UUID is a string of 32 alphanumeric characters in the format 8-4-4-4-12. An example would be efa289b2-3565-42e6-850b-8dad25727e99. Object IDs do not need to be specified. When using the POST method to create a new object, the ID will be returned as part of the response in the field id:

STRINGS

All strings are limited to 255 characters unless otherwise noted.

DATES

All dates are represented in ISO 8601 format YYYY-MM-DD. An example would be 2018-01-10.

TIMESTAMPS

All object responses will include a create_date and update_date in timestamp format. All timestamps are represented in ISO 8601 format YYYY-MM-DDThh:mm:ssTZD. The “T” appears before the time element and the TZD before the time zone. An example would be 2018-01-10T16:00:30+01:00.

BOOLEANS

All booleans can be submitted as true, "true", false, or "false". All other values will be rejected and throw a 400 error.

IS_ACTIVE

Most objects have an is_active field that can be utilized to make data inactive. When the is_active boolean is set to “false”, you will not be able to utilize the object in a POST or PUT request. You can think of this feature as a “soft delete” or archival of data. If you wish to permanently delete data, you can utilize the DELETE method in each entity.

NULL

All optional fields are set to null unless a default value is set. To null an optional field that has a value, you may do the following:

CURRENCY CODES

All currency codes are represented in ISO 4217 format, such as “USD” or “EUR”. Data that is stored in multiple currencies will not automatically be converted to a base currency, unless you have subscribed to our premium internationalization add-on. With this add-on, you may convert data in the following endpoints to a base of USD, EUR, GBP, CHF, AUD, and CAD, by passing the currency_conversion parameter:

Errors

ERROR CODES

Code Description
400 Bad Request
401 Unauthorized. Occurs when you are using an invalid or expired access token.
403 Forbidden. The request was valid but you are not authorized to access the resource.
404 Not Found. Occurs when you are requesting a resource which doesn’t exist such as an incorrect URL, incorrect ID, or empty result.
429 Too Many Requests. Exceeded the rate limit set. Currently, there is no rate limit on the APIs.
500 Internal Server Error.
503 Service Unavailable. If the API is down for maintenance you will see this error.


STATUS CODES

Code Description
200 Ok. The request was successful.
204 No Content. The request was successful but there is no additional content to send in the response body. This will occur on a successful DELETE.

Versioning

The Nucleus API is currently in major version 1.0. All features which are not backwards compatible will be pushed as a major version release. Features that we consider to be backwards compatible include the following:

Changelog

Date Change Description
2022-04-04 addition Added documentation for Tenant and Merchant Funded Rewards
2022-04-04 update Added =contains= to Filters for arrays.
2022-01-20 update Added the following optional fields: password and authorities to Client. Removed Admin Client.
2021-08-20 update Added the following optional fields: client_group to Card Spending Controls; group to Client. Changed client_id to optional in Card Spending Controls for tenant level controls, and added mid and mcc as possible values for control_scope
2021-04-15 addition Created new entities for Institution, Cardholder Overview
2020-12-30 addition Created new entities for Household, Household Activity, Card Activity, Business, Business Activity, Card Spending Controls, Merchants Resource, Merchants Categories Resource, Merchant Category Codes Resource, Account Categories Resource.
2020-12-30 update Added the following optional fields: check, is_fee, is_cleansed, is_disputed, metadata, merchant_category_code to Portfolio Transaction; transfer_speed, receiving_bank_link_id, receiving_account_id, receiving_portfolio_id to Funding; fulfillment to Card; business_id to Client and Document; employee and business_owner as valid “client_type” in Client
2020-10-02 update Added the following optional fields: status to Account, Client, Portfolio; is_recurring to Portfolio Transaction; Client is_verified, Document is_verified, Bank Link is_link_verified to Webhooks
2020-06-30 addition Added Idempotency to all POST requests by passing in a unique Idempotency-Key in the Request Header
2020-06-30 update Added the following optional fields: is_reloadable, prepaid_amount, portfolio_id to Card; card_id to Funding; asset_size_pending to Portfolio Asset Size
2020-04-06 addition Created new entities for Portfolio Goal, Card Program. Added the ability to Bulk POST, PUT any entity.
2020-03-27 addition Created new resources for Country, State, Currency and Statistic
2020-03-27 update Added the following optional fields: is_default boolean to Bank Link
2020-02-26 update Added the following optional fields to Client: total_net_worth, liquid_net_worth, suffix, employment, firm_name, identification_number_type, country_of_citizenship, citizenship_status, image, address.is_primary. Added “prepaid” as an acceptable card_type and card_network as an optional field to Card.
2019-12-19 update Added the following optional fields: image to Goal; portfolio_id to Funding; account_number to Account; is_active to Budget, Account and Portfolio
2019-11-04 update Added gender field to Client
2019-08-22 update Added ability to link a client_id to a Bank Link
2019-07-11 addition Created new entity for Budget
2019-07-11 update Added metadata to remaining services.
2019-03-06 addition Implemented Access Control List (ACL) framework to permission user-specific access to endpoints and data records. Framework includes Authorities, Permission Types, Resource Owner Password Credentials, and User Administration service.
2018-09-07 update Added new optional fields goal_amount, accumulation_horizon, decumulation_horizon, client_id, is_active to the Goal entity.

Pagination

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
"https://api.hydrogenplatform.com/nucleus/v1/account?
    page=0&size=10&order_by=id&ascending=true"

Example Response

{
    "content": [
    ],
    "first": true,
    "last": false,
    "number_of_elements": 10,
    "total_elements": 29,
    "total_pages": 3,
    "size": 10,
    "number": 0,
    "sort": [
        {
            "direction": "ASC",
            "property": "id",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": true,
            "descending": false
        }
]

For API resources that return a large volume of results you may use pagination. When using these “List all” API methods, rather than returning a large list of results, the results will be paginated by default. Please note that pagination is not available on some API resources, specified in the description of the resource.

ARGUMENTS

Parameter Type Description
page
optional
integer Page number for the page that should be returned as the starting page. For example, if this is specified as 0, then the first page of the results will be shown, if it is set as 3 then the third page of the results will be shown, and so on. The default is 0.
size
optional
integer The number or records to be included per page. The default is 25. There is no max value.
order_by
optional
string The field in the response body to order the list by. Default is update_date.
ascending
optional
boolean If true, order the results in ascending order. For an alphabetical result this would be A-Z. If false, order the results in descending order. For an alphabetical result this would be Z-A. Default is false which would order by descending.

Filters

Example Requests

Filter the Account object to pull back all accounts that are a specified account type:

/account?filter=account_type==e4f07fc6-1020-43b8-a1ce-18031671e8e0

Filter the Account object to pull back all accounts that are assigned to a specified goal, which is an object embedded in Account:

/account?filter=goals.goal_id==f87fd7e1-b73d-40b1-9747-74e2b421dd94

Filter all accounts that are assigned to a specified goal, AND are a specified account type:

/account?filter=goals.goal_id==47608aa1-a0f5-4d1b-957a-9dc58da9193f
;account_type==553b8534-c406-4ded-9045-5ee6007c5d91

Every field within an object using the GET method can be filtered except for fields stored under metadata. Filtering is especially useful for calls that return many different fields.

A filter query may consist of one or more logical comparisons:

AND: ; or and
OR: , or or

To group multiple OR statements together, you must add () at the beginning and end of the list of statements

/account?filter=(account_type==553b8534-c406-4ded-9045-5ee6007c5d91,account_type==87e4991b-e2a2-4c14-a3e6-407cbcb01cdf,account_type==b00b6eea-8ab1-4d5a-9c84-4c958d795680);goals.goal_id==47608aa1-a0f5-4d1b-957a-9dc58da9193f

Comparison operators may consist of the following:

Like: =like=
Equal to: ==
Not equal to: !=
Less than: =lt= or <
Less than or equal to: =le= or <=
Greater than: =gt= or >
Greater than or equal to: =ge= or >=
Is Null: =isnull=true or =isnull=false
In: =in=
Not in: =out=
Contains: =contains=

The basic construct for a filtering query is as follows:

/<endpoint>?filter=query

To filter using a simple one word field within an object, the query would be as follows:

/<endpoint>?filter=fieldname==fieldvalue

To filter using a field with multiple words, add quotes to the query string. The query would be as follows:

/<endpoint>?filter=fieldname=="fieldvalue fieldvalue"

To filter using a field with multiple words and any potential special characters, add quotes and URL encode the query string. The query would be as follows:

/<endpoint>?filter=fieldname=="field%40value%20field%25value"

To filter using a field within an embedded object, the query would be as follows:

/<endpoint>?filter=objectname.fieldname==fieldvalue

To filter using the =like= operator, you may include an asterisk * as a wildcard before or after the value (same functionality as % in SQL):

/<endpoint>?filter=fieldname=like=*fieldvalue or /<endpoint>?filter=fieldname=like=*fieldvalue* or /<endpoint>?filter=fieldname=like=fieldvalue* or /<endpoint>?filter=fieldname=like=fieldvalue*fieldvalue

To filter using the =in= or =out= options, include a series of comma-separated values wrapped in parentheses, with no spaces between values. The query would be as follows:

/<endpoint>?filter=fieldname=in=(fieldvalue,fieldvalue,fieldvalue)

To filter an array, the query would be as follows:

/<endpoint>?filter=fieldname=contains=(fieldvalue,fieldvalue)

Metadata

Many objects support optional metadata fields, as denoted in the documentation. Metadata is intended to allow developers to extend our API and store custom information that is relevant to their business. Some examples may include:

Metadata may consist of any key-value pair you define such as “Age”:”35” or “City”:”New York”

All metadata that is entered will be returned in the JSON and may consist of up to 255 alphanumeric, string, integer, and boolean characters for each key and each value.

When updating the metadata using any of the PUT endpoints, you should provide both the details you wish to maintain as well as the details you wish to update.

Webhooks

Webhook Management

Hydrogen Atom offers webhooks that you may subscribe to and consume 20+ events. Webhooks are useful for building your own alerts service for an application, triggering back office processes, or simply being informed when a new record is created or updated.

Field Type Description
id UUID The id of the webhook
url string The url you want to receive the payloads to
secret string Auto generated base64 encoded salt used to hash and verify the sender of the payload. You may either store for each webhook subscription or call the endpoint to retrieve it.
atom_service array The array of Atom services for a webhook to notify
is_active boolean Indicates if this webhook is active
secondary_id string Alternate id that can be used to identify the webhook such as an internal id
create_date timestamp Timestamp for the date and time that the webhook was created
update_date timestamp Timestamp for the date and time that the webhook was last updated

Depending on your atom_service settings, Atom will send a payload to the url of your choice. The list of all available atom_service values is as follows:

Atom Service Description
client POST /client
client_verified PUT /client - Update is_verified on request
card POST /card
card_status PUT /card - Update status on card
portfolio_asset_size POST /portfolio_asset_size
portfolio_transaction POST /portfolio_transaction Requires extra data privacy permissions
portfolio_transaction_status PUT /portfolio_transaction - Update status on transaction. Requires extra data privacy permissions
bank_link_verified PUT /bank_link - Update is_link_verified on request
funding POST /funding
funding_status PUT /funding - Update funding_status on request
budget POST /budget

List all webhooks

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/webhook"
api_instance = nucleus_api.WebhookApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_webhook_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_webhook_all_using_get: %s\n" % e)
WebhookApi apiInstance = new WebhookApi();
        try {
            PageWebhook List = apiInstance.getWebhookAllUsingGet(true, null, null, 0, 2);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getWebhookAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\WebhookApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $webhooklist = $apiInstance->getWebhookAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($webhooklist);
} catch (Exception $e) {
    echo 'Exception when calling WebhookApi->getWebhookAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::WebhookApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  webhooklist = api_instance.get_webhook_all_using_get(opts)
  p webhooklist
rescue NucleusApi::ApiError => e
  puts "Exception when calling WebhookApi->get_webhook_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.WebhookApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var webhooklist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getWebhookAllUsingGet(opts, webhooklist)

Example Response

{
  "content": [
    {
        "id": "0bd304f4-9996-4676-9c59-dedf486a7f72",
        "url": "https://www.hydrogenplatform.com/callback/client",
        "secret": "cDMzZjNhMGYyZjdhYjk0OTQxY2QwODE4ZDc3aGY5NDhjZGExMDU2Mg==",
        "is_active": true,
        "atom_service": [
            "client",
            "client_verified"
        ],
        "secondary_id": null,
        "create_date": "2019-11-14T16:34:49.000+0000",
        "update_date": "2019-11-14T18:52:44.000+0000"
    },
    {
        "id": "1f6f3345-737a-400f-b5b8-bdb15382f803",
        "url": "https://www.hydrogenplatform.com/callback/budget",
        "secret":"cTMzZjNiMGYyZjlhYjk0OTQxY2QwODE4ZDc5aHQ5NDVjcmExMDU2Mg==",
        "is_active": true,
        "atom_service": ["budget"],
        "secondary_id": null,
        "create_date": "2019-11-14T17:20:21.000+0000",
        "update_date": "2019-11-14T18:52:44.000+0000"
    }
  ],
  "total_pages": 1,
  "total_elements": 2,
  "last": true,
  "first": true,
  "sort": [
    {
      "direction": "ASC",
      "property": "create_date",
      "ignore_case": false,
      "null_handling": "NATIVE",
      "ascending": true,
      "descending": false
    }
  ],
  "number_of_elements": 2,
  "size": 25,
  "number": 0
}

Get information for all webhooks defined for your tenant.

HTTP REQUEST

GET /webhook

Create a webhook

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
            "url": "https://www.hydrogenplatform.com/callback/budget",
            "atom_service": ["budget"]
        }' "https://api.hydrogenplatform.com/atom/v1/webhook"
api_instance = nucleus_api.WebhookApi(nucleus_api.ApiClient(configuration))
# #Create WebHook
atom_service = "card"
webhook = nucleus_api.Webhook(url="https://www.hydrogenplatform.com/docs/nucleus/v1/#Introduction", atom_service=[atom_service])
try:
    api_response = api_instance.create_webhook_using_post(webhook)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling create_webhook_using_post: %s\n" % e)
WebhookApi apiInstance = new WebhookApi();
        //Create a Webhook
        Webhook webHook = new Webhook();
        webHook.setUrl("https://www.hydrogenplatform.com/docs/nucleus/v1/#Introduction");
        List<Webhook.AtomServiceEnum> atom = new ArrayList<>();
        atom.add(Webhook.AtomServiceEnum.fromValue("budget"));
        webHook.setAtomService(atom);

        try {
            Webhook result = apiInstance.createWebhookUsingPost(webHook);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createWebhookUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\WebhookApi(
    new GuzzleHttp\Client(),
    $config);
//Create Webhook
$webhook = new \com\hydrogen\nucleus\Model\Webhook();


try {
    $webhook->setUrl("https://www.hydrogenplatform.com/docs/nucleus/v1/#Introduction");
    $webhook->setAtomService(["budget"]);
    $result = $apiInstance->createWebhookUsingPost($webhook);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createWebhookUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::WebhookApi.new
#Create Webhoook
webhook = NucleusApi::Webhook.new

begin
  webhook.url = "https://www.hydrogenplatform.com/docs/nucleus/v1/#Introduction"
  webhook.atom_service = "budget"
  result = api_instance.create_webhook_using_post(webhook)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_webhook_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.WebhookApi();
//Create a Webhook
var webhook = new AtomServiceEnum.Webhook();
webhook.url = 'https://www.hydrogenplatform.com/docs/nucleus/v1/#Introduction';
var atom = new AtomServiceEnum.AtomServiceEnum('{"feature_track"}');
webhook.atom_service = [atom];



var newwebhook = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createWebhookUsingPost(webhook, newwebhook)

Example Response

{
    "id": "1f6f3345-737a-400f-b5b8-bdb15382f803",
    "url": "https://www.hydrogenplatform.com/callback/budget",
    "secret":"cTMzZjNiMGYyZjlhYjk0OTQxY2QwODE4ZDc5aHQ5NDVjcmExMDU2Mg==",
    "is_active": true,
    "atom_service": ["budget"],
    "secondary_id": null,
    "update_date": "2019-11-14T17:20:21.000+0000",
    "create_date": "2019-11-14T17:20:21.000+0000"
}

One active webhook is allowed for each atom_service. If there already is an active webhook at the time of creating a new active webhook, the old webhook needs to be deactivated.

HTTP REQUEST

POST /webhook

ARGUMENTS

Parameter Type Required Description
url string required The url you want to receive the payloads to. Only http:// or https:// urls allowed
atom_service array required The array of Atom services for a webhook to notify
is_active boolean optional Indicates if this webhook is active. Defaults to true
secondary_id string optional Alternate id that can be used to identify the webhook such as an internal id

Retrieve a webhook

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/atom/v1/webhook/1f6f3345-737a-400f-b5b8-bdb15382f803"
api_instance = nucleus_api.WebhookApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_webhook_using_get("7e2d43c7-b52e-4333-9b10-fb6b9b0f7606")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_webhook_using_get: %s\n" % e)
WebhookApi apiInstance = new WebhookApi();
        try {
            Webhook responseWebhook = apiInstance.getWebhookUsingGet(UUID.fromString("390b8afb-fcb0-4df7-a910-0b5f3305e23a"));
            System.out.println(responseWebhook);
        } catch (ApiException e) {
            System.err.println("Exception when calling getWebhookUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\WebhookApi(
    new GuzzleHttp\Client(),
    $config);
$webhook_id = "390b8afb-fcb0-4df7-a910-0b5f3305e23a"; // string | UUID webhook_id

try {
    $webhook = $apiInstance->getWebhookUsingGet($webhook_id);
    print_r($webhook);
} catch (Exception $e) {
    echo 'Exception when calling WebhookApi->getWebhookUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::WebhookApi.new
webhook_id = '390b8afb-fcb0-4df7-a910-0b5f3305e23a' # String | UUID webhook_id


begin
  webhook = api_instance.get_webhook_using_get(webhook_id)
  p webhook
rescue NucleusApi::ApiError => e
  puts "Exception when calling WebhookApi->get_webhook_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.WebhookApi();
var webhookID = "390b8afb-fcb0-4df7-a910-0b5f3305e23a";

var opts = {
    'currencyConversion': null, // String | USD
};

var webhook = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getWebhookUsingGet(webhookID, webhook)

Example Response

{
    "id": "1f6f3345-737a-400f-b5b8-bdb15382f803",
    "url": "https://www.hydrogenplatform.com/callback/budget",
    "secret":"cTMzZjNiMGYyZjlhYjk0OTQxY2QwODE4ZDc5aHQ5NDVjcmExMDU2Mg==",
    "is_active": true,
    "atom_service": ["budget"],
    "secondary_id": null,
    "create_date": "2019-11-14T17:20:21.000+0000",
    "update_date": "2019-11-14T17:20:21.000+0000"
}

Retrieve the information for a specific webhook. The webhook_id must be provided. The endpoint returns the webhook_id and the details for the webhook specified.

HTTP REQUEST

GET /webhook/{webhook_id}

Update a webhook

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
            "is_active": false
        }' "https://api.hydrogenplatform.com/atom/v1/webhook/1f6f3345-737a-400f-b5b8-bdb15382f803"
api_instance = nucleus_api.WebhookApi(nucleus_api.ApiClient(configuration))
# #Update Webhook
webhook_update = {'is_active': 'true'}
webhook_id = 'c2fd7003-f094-42f5-8e33-4934c8be3373'
try:
    api_response = api_instance.update_webhook_using_put(webhook_update, webhook_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_webhook_using_put: %s\n" % e)
WebhookApi apiInstance = new WebhookApi();
        //Update a Webhook
        Map map = new HashMap();
        map.put("secondary_id", "null");

        try {
            Webhook response = apiInstance.updateWebhookUsingPut(map, UUID.fromString("c03f5437-58ee-478a-a403-cd8e5bc1d8d4"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\WebhookApi(
    new GuzzleHttp\Client(),
    $config);
//Update Webhoook
$wwebhook_update = new stdClass();
$webhook_id = "4cd9bac7-364d-4a8d-806f-ce4656864f19";

try {
    $wwebhook_update->is_active = "true";
    $result = $apiInstance->updateWebhookUsingPut($wwebhook_update, $webhook_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateWebhookUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::WebhookApi.new
#Update Webhook
webhook_update = {"atom_service" => 'budget'}
webhook_id = '0fba4bf3-f04e-4df8-ae79-e1c15924261c'
begin
  result = api_instance.update_webhook_using_put(webhook_update, webhook_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_webhook_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.WebhookApi();
// //Update Webhook
var apiInstance = new HydrogenNucleusApi.WebhookApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var webhookupdate = new HydrogenNucleusApi.Webhook();
var webhookid = '4cd9bac7-364d-4a8d-806f-ce4656864f19';

webhookupdate.is_active = "true";
apiInstance.updateWebhookUsingPut(webhookupdate, webhookid, callback)

Example Response

{
    "id": "1f6f3345-737a-400f-b5b8-bdb15382f803",
    "url": "https://www.hydrogenplatform.com/callback/budget",
    "secret":"cTMzZjNiMGYyZjlhYjk0OTQxY2QwODE4ZDc5aHQ5NDVjcmExMDU2Mg==",
    "is_active": false,
    "atom_service": ["budget"],
    "secondary_id": null,
    "create_date": "2019-11-14T17:20:21.000+0000",
    "update_date": "2019-11-14T18:52:44.000+0000"
}

Update a webhook for your tenant. The webhook_id must be provided. To obtain the appropriate webhook_id, use the GET /webhook endpoint to view all of the webhooks for your tenant and their current information.

HTTP REQUEST

PUT /webhook/{webhook_id}

Delete a webhook

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/webhook/1f6f3345-737a-400f-b5b8-bdb15382f803"
api_instance = nucleus_api.WebhookApi(nucleus_api.ApiClient(configuration))
# # # #Delete a Webhook
webhook1_id = '20aca348-2074-422f-b481-47a405ded448'
try:
    api_instance.delete_webhook_using_delete(webhook1_id)
except ApiException as e:
    print("Exception when calling delete_webhook_using_delete: %s\n" % e)
WebhookApi apiInstance = new WebhookApi();
        //Delete a Webhook
        try {
            Webhook deleteresponse = apiInstance.deleteWebhookUsingDelete(UUID.fromString("20aca348-2074-422f-b481-47a405ded448"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\WebhookApi(
    new GuzzleHttp\Client(),
    $config);
//Delete Webhook
$webhook_did = "72ad48ad-f1af-4301-8b69-5d0af8b053f3"; // string | UUID account_id

try {
    $apiInstance->deleteWebhookUsingDelete($webhook_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deleteWebhookUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::WebhookApi.new
#Delete Webhook
webhook1_id = '72ad48ad-f1af-4301-8b69-5d0af8b053f3'
begin
  result = api_instance.delete_webhook_using_delete(webhook1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_webhook_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.WebhookApi();
// // // //Delete a Webhook
var webhookidd = "78ed5ded-d097-4537-b172-e2d00c5b4224";


var deletewebhook = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deleteWebhookUsingDelete(webhookidd, deletewebhook)

Response (204 No Content)

Permanently delete a webhook for your tenant. The webhook_id must be provided. To obtain the appropriate webhook_id, use the GET /webhook endpoint to view all of the webhooks for your tenant. This deletes the webhook_id and the details for the webhook record.

HTTP REQUEST

DELETE /webhook/{webhook_id}

Webhook Security

Example Header Payload

{
    "content-length": "621",
    "accept": "application/json, application/*+json",
    "x-hydrogen-signature": "headers=date content-type content-length content,algorithm=HMAC_SHA_256,signature=YTE3ZjdjZGQ0NDc4MDQ5NmZiOGMyNDg0MzliZWI0MDhkNjU4OGVhZTkxMDM1ZTE4Y2M2MmYxZTM3OWNlODFlMg==",
    "x-hydrogen-service": "portfolio_transaction",
    "date": "2020-03-30 16:41:15",
    "content-type": "application/json",
    "user-agent": "Java/1.8.0_242"
}

Example Hashing

Hash using the SHA-256 algorithm with your secret key created for the service. Take the result and Base64 encode and then compare to the signature in the header

2020-03-30 16:41:15 application/json 621 {
    "id": "099961da-7f41-4309-950f-2b51689a0033",
    "create_date": "2018-01-01T9:00:03.000+0000",
    "update_date": "2018-01-05T21:56:03.000+0000",
    "date": "2018-01-02T00:00:00.000+0000",
    "date_available": null,
    "is_read": false,
    "price": 1,
    "quantity": 9000,
    "currency_code": null,
    "amount": null,
    "balance": null,
    "merchant": null,
    "category": null,
    "subcategory": null,
    "description": null,
    "memo": null,
    "status": null,
    "location": {},
    "security_id": "9679fd84-f6d5-44f9-bba9-a5fcb1b8b028",
    "transaction_code_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
    "portfolio_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
    "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
    "model_id": "feb846da-a06d-402e-a3bb-abc7260f7138"
}

To securely receive the webhook payload you should verify that the request was made by Hydrogen.

The headers of every payload will include a x-hydrogen-signature that includes a Base64 encoded signature of the following data which has been HMAC SHA-256 hashed using the secret for the webhook:

date content-type content-length content

Each field should be separated by a space. The content will be the json payload of the response body that gets posted.

Using the secret that was received when the webhook was created above, you will then create a Hash-based message authentication code (HMAC) with the SHA-256 algorithm. The result can then be Base64 encoded and compared to the signature in the header. If the two match then you have successfully verified the validity of the webhook.

Idempotency

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
  -H "Idempotency-Key: 099961da-7f41-4309-950f-2b51689a0033" \
    -d '{
          "email": "johndoe@email.com",
          "username": "johndoe@email.com",
          "client_type": "individual",
          "first_name": "John",
          "last_name": "Doe"
      }' "https://api.hydrogenplatform.com/nucleus/v1/client"

An API request is idempotent if it has the same result no matter how many times it is tried. Hydrogen supports idempotency to allow requests to be retried without risk of the operation being performed multiple times. This is useful for requests that involve critical such as payments or account creation to protect against network outages and you are unsure if a previous request had been processed successfully. If you ever have any doubt, always submit the request again with the same idempotency key in the request header to make sure you don’t duplicate the data.

To submit an idempotent request, simply submit any POST request with an Idempotency-Key in the Request Header. If you retry the same request body and endpoint with the Idempotency-Key you will receive a cached version of the original response if it was successfully submitted the first time.

To create a unique Idempotency-Key please one of the libraries below to generate a unique UUID in the language of your choice:

Language Function
C# Guid.NewGuid
Java UUID.randomUUID
Node uuid
PHP uniqid
Python uuid Python 2 / Python 3
Ruby SecureRandom.uuid

Bulk

Bulk POST, PUT, and DELETE data on any entity up to 100 entries at a time. Requests will be sent into a messaging queue and processed asynchronously so you may still perform other processes while this is occurring. You will be able to receive a status report of the bulk operation via a separate service explained below.

Bulk Create

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
        [
          {
            "security_id":"832712b9-3b84-46c6-8a6b-1765697269b4",
            "price":10.20,
            "date": "2019-12-01"
          },
          {
            "security_id":"832712b9-3b84-46c6-8a6b-1765697269b4",
            "price":10.22,
            "date": "2020-01-01"
          },
          {
            "security_id":"832712b9-3b84-46c6-8a6b-1765697269b4",
            "price":10.21,
            "date": "2020-02-01"
          },
          {
            "security_id":"832712b9-3b84-46c6-8a6b-1765697269b4",
            "price":10.23,
            "date": "2020-03-01"
          },
          {
            "security_id":"832712b9-3b84-46c6-8a6b-1765697269b4",
            "price":10.25,
            "date": "2020-04-01"
          }
        ]
      }' "https://api.hydrogenplatform.com/nucleus/v1/bulk/security_price"

Example Response

{
    "id": "356dddbc-cfe5-469c-8988-46afe85651f9",
    "create_date": "2020-04-05T15:20:27.301+0000",
    "update_date": "2020-04-05T15:20:27.301+0000",
    "status": "Not Started"
}

Perform a bulk POST operation on a set of data. The fields required by the entity to create the data must be provided. Each payload should be comma separated. The endpoint returns the status and the id which can be used to retrieve the status of the request.

HTTP REQUEST

POST /bulk/{entity}

Bulk Update

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
        [
          {
            "id": "78ba9652-3125-4bf4-ba0d-3f95955e9fc4",
            "price": 10.30
          },
          {
            "id": "b2b04268-bc31-4ddc-8b1e-2736c106ed38",
            "price": 10.40
          },
          {
            "id": "ada79898-a59c-4ec7-a77c-bc8a66340feb",
            "price": 10.50
          },
          {
            "id": "f49ae877-c7e9-43f2-95f5-34f79d0cdb78",
            "price": 10.60
          }
        ]
      }' "https://api.hydrogenplatform.com/nucleus/v1/bulk/security_price"

Example Response

{
    "id": "a16038ef-5fa9-4d6f-bc4c-1c2f40914d3a",
    "create_date": "2020-04-05T19:52:27.301+0530",
    "update_date": "2020-04-05T19:52:27.301+0530",
    "status": "Not Started"
}

Perform a bulk PUT operation on a set of data. The unique id of each record that you wish to update must be provided in the body. To obtain the appropriate id, use the GET /{entity} endpoint to view all available ids and their current information. The details to be updated must also be provided. The endpoint returns the status and the id which can be used to retrieve the status of the request.

HTTP REQUEST

PUT /bulk/{entity}

General

These entities are used throughout the platform across various products.

Account

Account Management

Accounts are created below clients to represent an account in the back office. One or more portfolios can be created below an account. An account may also be associated with one or more goals.

Field Type Description
id UUID The id for the account
name string Name of the account
account_type_id UUID The id of the account type for the account. Account types are defined by your firm
account_number string Account number for the account. Differs from the id for the account which is auto generated.
managed boolean Indicates if the account is managed by a 3rd party such as an advisor or self-directed by the client. Defaults to true, or that it’s managed
discretionary boolean Indicates if the account is discretionary or non-discretionary. A discretionary account gives a 3rd party such as an advisor access to perform transactions in an account with no permission, while a non-discretionary account requires permission for every transaction. Defaults to true, or that it’s discretionary account
clients map List of clients associated with the account and their association type as well as signature data
      client_id UUID The id of a client associated with the account
      client_account_association_type string The role of the client as it relates to the account defined by your firm. Roles may be joint, owner, trustee, viewer, or admin. Automatically grants the FULL_AUTHORITY permission type to clients mapped to the account with the client_account_association_type of owner, joint, trustee or admin and the INQUIRY_ACCESS permission type to clients mapped to the account with the client_account_association_type of viewer
      signature_data longtext Stored signature for the client on the account such as a Base30 or Base64 string
goals map List of goals mapped to the account with information such as target amount and horizon. You may also store goals data under the goal entity, which is recommended if a goal can be assigned to multiple accounts. This map only stores goals attributes, to assign an account to a goal use the account-allocation service.
      goal_id UUID The id of a goal mapped to the account
      goal_amount double Monetary amount provided by the client as the target amount to be reached within the goal horizon. May be used in conjunction with the Proton API.
      accumulation_horizon double Time horizon of the goal during the accumulation phase, in years. May be used in conjunction with the Proton API.
      decumulation_horizon double Time horizon of the goal during the decumulation phase, in years. If the goal is an accumulation goal, then this can be 0 or omitted entirely. May be used in conjunction with the Proton API.
currency_code string Alphabetic currency code for the base currency of the account, limited to 3 characters. See currency codes
status string Status of the account such as “Registered” or “Active”
is_active boolean Indicates if the account is active. Defaults to true which indicates that it is currently active.
metadata map Custom information associated with the entity in the format key:value
See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all accounts

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/account"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
# List all Account
try:
    api_response = api_instance.get_account_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_account_all_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        try {
            PageAccount List = apiInstance.getAccountAllUsingGet(true, null, null, 1, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAccountAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $accountlist = $apiInstance->getAccountAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($accountlist);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
  #List all accounts
  resultlist = api_instance.get_account_all_using_get(opts)
  p resultlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_account_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var accountlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getAccountAllUsingGet(opts, accountlist);

Example Response

{
    "content": [
        {
            "id": "099961da-7f41-4309-950f-2b51689a0033",
            "create_date": "2017-01-03T00:00:00.000+0000",
            "update_date": "2017-01-05T00:00:00.000+0000",
            "secondary_id": "7289243787238",
            "managed": true,
            "discretionary": true,
            "name": "Joint Investment Account",
            "account_type_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "account_number": null,
            "clients": [
                {
                    "client_id": "099961da-7f41-4309-950f-2b51689a0033",
                    "client_account_association_type": "joint"
                }
            ],
            "goals": [
                {
                    "goal_id": "099961da-7f41-4309-950f-2b51689a0033",
                    "goal_amount": 200000,
                    "accumulation_horizon": 35,
                    "decumulation_horizon": 25
                }
            ],
            "currency_code": "USD",
            "status": null,
            "is_active": true,
            "metadata": {}
        },
        {
            "id": "107516c3-9035-4811-af7c-501be5a1fe26",
            "create_date": "2017-02-14T00:00:00.000+0000",
            "update_date": "2017-02-15T09:00:00.000+0000",
            "secondary_id": null,
            "managed": false,
            "discretionary": true,
            "name": "Goals Account",
            "account_type_id": "39770e8d-890d-485b-822e-5a1578f26d47",
            "account_number": null,
            "clients": [
                {
                    "client_id": "107516c3-9035-4811-af7c-501be5a1fe26",
                    "client_account_association_type": "owner"
                }
            ],
            "goals": [
                {
                    "goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
                    "goal_amount": 40000,
                    "accumulation_horizon": 10,
                }
            ],
            "status": null,
            "is_active": true,
            "metadata": {}
        }
    ],
    "last": false,
    "total_pages": 1,
    "total_elements": 2,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 2,
    "size": 25,
    "number": 0
}

Get information for all accounts for all clients defined for your tenant. You can filter using a unique client_id to view the accounts for a client. To identify the appropriate client_id, use the GET /client endpoint to see all clients defined for your tenant. Note that the information for the clients associated with the account, the goals information, and the metadata information are stored as nested objects within the account object.

HTTP REQUEST

GET /account

Create an account

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
      "secondary_id": "7289243787238",
      "name": "Investment Account 60",
      "account_type_id": "eb3d7f60-a133-4ca9-815f-3677bcdc23a3",
      "clients": [
        {
            "client_id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
            "client_account_association_type": "owner"
        }
      ],
      "goals": [
        {
            "goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "goal_amount": 100000,
            "accumulation_horizon": 15
        }
      ]
    }' "https://api.hydrogenplatform.com/nucleus/v1/account"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
# # Create a Account
account = nucleus_api.Account(account_type_id="4bc96fae-be89-4fa7-bbb8-08eb0d43db94", name="new Account");
try:
    api_response = api_instance.create_account_using_post(account);
    pprint(api_response)
except ApiException as e:
    print("create_account_using_post: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        Account createAccount = new Account();
        createAccount.setName("Ab Corp");
        createAccount.accountTypeId(UUID.fromString("de61ee3d-b14d-4646-814d-6629a8627934"));

        try {
            Account result = apiInstance.createAccountUsingPost(createAccount);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createAccountUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
//Create Account
$account = new \com\hydrogen\nucleus\Model\Account();

try {
    $account->setName("ABC");
    $account->setAccountTypeId("de61ee3d-b14d-4646-814d-6629a8627934");
    $result = $apiInstance->createAccountUsingPost($account);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createAccountUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
#Create Account
account = NucleusApi::Account.new

begin
  account.name = "AB Corp"
  account.account_type_id = "de61ee3d-b14d-4646-814d-6629a8627934"
  result = api_instance.create_account_using_post(account)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling FinancialStatementApi->create_account_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var account1 = new HydrogenNucleusApi.Account();// SpendingControl | spendingControl

account1.name = "New Account";
account1.account_type_id = 'de61ee3d-b14d-4646-814d-6629a8627934';


var accountnew = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createAccountUsingPost(account1, accountnew);

Example Response

{
    "id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
    "create_date": "2017-03-01T00:00:00.000+0000",
    "secondary_id": "7289243787238",
    "managed": true,
    "discretionary": true,
    "name": "Investment Account 60",
    "account_type_id": "eb3d7f60-a133-4ca9-815f-3677bcdc23a3",
    "account_number": null,
    "clients": [
        {
            "client_id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
            "client_account_association_type": "owner"
        }
    ],
    "goals": [
        {
            "goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "goal_amount": 100000,
            "accumulation_horizon": 15
        }
    ],
    "status": null,
    "is_active": true,
    "metadata": {}
}

Create an account under a client. In order to create an account, the client must have already registered and the client_id must be provided. To identify the appropriate client_id, use the GET /client endpoint to see all clients for your tenant. The client can be an internal user. The endpoint returns an account_id that can then be mapped to other entities such as goal, allocation, and portfolio or used to create funding requests.

HTTP REQUEST

POST /account

ARGUMENTS

Parameter Type Required Description
name string required Name of the account
account_type_id UUID required The id of the account type for the account. Account types are defined by your firm
account_number string optional Account number for the account. Differs from the id for the account which is auto generated.
managed boolean optional Indicates if the account is managed by a 3rd party such as an advisor or self-directed by the client. Defaults to true, or that it’s managed
discretionary boolean optional Indicates if the account is discretionary or non-discretionary. A discretionary account gives a 3rd party such as an advisor access to perform transactions in an account with no permission, while a non-discretionary account requires permission for every transaction. Defaults to true, or that it’s discretionary account
clients map optional List of clients associated with the account and their association type as well as signature data
      client_id UUID required The id of a client associated with the account
      client_account_association_type string required The role of the client as it relates to the account defined by your firm. Roles may be joint, owner, trustee, viewer, or admin. Automatically grants the FULL_AUTHORITY permission type to clients mapped to the account with the client_account_association_type of owner, joint, trustee or admin and the INQUIRY_ACCESS permission type to clients mapped to the account with the client_account_association_type of viewer
      signature_data longtext optional Stored signature for the client on the account such as a Base30 or Base64 string
goals map optional List of goals mapped to the account with information such as target amount and horizon. You may also store goals data under the goal entity, which is recommended if a goal can be assigned to multiple accounts. This map only stores goals attributes, to assign an account to a goal use the account-allocation service.
      goal_id UUID required The id of a goal mapped to the account
      goal_amount double optional Monetary amount provided by the client as the target amount to be reached within the goal horizon. May be used in conjunction with the Proton API. Option to also store under the goal entity
      accumulation_horizon double optional Time horizon of the goal during the accumulation phase, in years. May be used in conjunction with the Proton API. Option to also store under the goal entity
      decumulation_horizon double optional Time horizon of the goal during the decumulation phase, in years. If the goal is an accumulation goal, then this can be 0 or omitted entirely. May be used in conjunction with the Proton API. Option to also store under the goal entity
currency_code string optional Alphabetic currency code for the base currency of the account, limited to 3 characters. See currency codes
status string optional Status of the account such as “Registered” or “Active”
is_active boolean optional Indicates if the account is active. Defaults to true which indicates that it is currently active.
metadata map optional Custom information associated with the account in the format key:value
See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve an account

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/account/199a8c08-cdd5-4c8c-8abf-535447cea11b"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_account_using_get("39c8aff8-ee6b-4e6e-9968-df04709dfb00")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_account_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
try {
            Account accountresponse = apiInstance.getAccountUsingGet(UUID.fromString("2a13b913-1aa0-4e86-ac35-a6932307dcb8"));
            System.out.println(accountresponse);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAccountUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$account_id = "2a13b913-1aa0-4e86-ac35-a6932307dcb8";

try {
    $account = $apiInstance->getAccountUsingGet($account_id);
    print_r($account);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
account_id = '2a13b913-1aa0-4e86-ac35-a6932307dcb8' # String | UUID account_id
begin
  #Retrieve an account
  result = api_instance.get_account_using_get(account_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_account_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var accountId = "88bc6be8-58b2-43c5-9dc2-081ea88a3b78";


var account = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getAccountUsingGet(accountId, account)

Example Response

{
    "id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
    "create_date": "2017-03-01T00:00:00.000+0000",
    "update_date": "2018-01-05T00:00:00.000+0000",
    "managed": true,
    "discretionary": true,
    "name": "Investment Account 60",
    "account_type_id": "eb3d7f60-a133-4ca9-815f-3677bcdc23a3",
    "account_number": null,
    "clients": [
        {
            "client_id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
            "client_account_association_type": "owner"
        }
    ],
    "goals": [
        {
            "goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "goal_amount": 100000,
            "accumulation_horizon": 15
        }
    ],
    "status": null,
    "is_active": true,
    "metadata": {}
}

Retrieve the information for a specific account associated with a client. The unique account_id must be provided. The endpoint returns the account_id and details for the account specified. Note that the information for the clients associated with the account, the goals information, and the metadata information are stored as nested objects within the account object.

HTTP REQUEST

GET /account/{account_id}

Update an account

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
      "name": "Investment Account 60",
      "account_type_id": "eb3d7f60-a133-4ca9-815f-3677bcdc23a3",
      "clients": [
        {
            "client_id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
            "client_account_association_type": "owner"
        }
      ],
      "goals": [
        {
            "goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "goal_amount": 100000,
            "accumulation_horizon": 15
        }
      ]
    }' "https://api.hydrogenplatform.com/nucleus/v1/account/199a8c08-cdd5-4c8c-8abf-535447cea11b"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
# Update Account
account_update = {'name': 'New Name'} # object | spending_control
account_id = 'a85769ac-3567-45d3-91d3-2970b85c5bd7' # str | UUID spending_control_id

try:
    api_response = api_instance.update_account_using_put(account_update, account_id);
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_account_using_put: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        //Update Account
        Map map = new HashMap();
        map.put("name", "Major Account");

        try {
            Account response = apiInstance.updateAccountUsingPut(map, UUID.fromString("d5144cbb-64c8-4f4e-9ee2-28a07b003dc3"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
//Update Account
$account_update = new stdClass();
$account_id = "e06fcffd-f92d-4fa0-b230-e8dceb6a2e91";

try {
    $account_update->name = "New";
    $result = $apiInstance->updateAccountUsingPut($account_update, $account_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateAccountUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
#Update FAccount

account_update = {"name" => 'ABc'}
account_id = 'a6324427-597a-4c8e-88ed-4e640944f4c5'
begin
  result = api_instance.update_account_using_put(account_update, account_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling FinancialStatementApi->update_account_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
//Update Account
var apiInstance = new HydrogenNucleusApi.AccountApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var account = new HydrogenNucleusApi.Account();
var accountId = "c8300543-952e-4e0e-a996-f162e9d50796";

account.currency_code = 'INR';
apiInstance.updateAccountUsingPut(account, accountId, callback)

Example Response

{
    "id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
    "create_date": "2017-03-01T00:00:00.000+0000",
    "update_date": "2018-01-05T00:00:00.000+0000",
    "managed": true,
    "discretionary": true,
    "name": "Investment Account 60",
    "account_type_id": "eb3d7f60-a133-4ca9-815f-3677bcdc23a3",
    "account_number": null,
    "clients": [
        {
            "client_id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
            "client_account_association_type": "owner"
        }
    ],
    "goals": [
        {
            "goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "goal_amount": 100000,
            "accumulation_horizon": 15
        }
    ],
    "status": null,
    "is_active": true,
    "metadata": {}
}

Update the information for an account. The unique account_id must be provided. To obtain the appropriate account_id, use the GET /account endpoint to view all accounts defined for your tenant and their current information. The details to be updated must also be provided. The endpoint returns the account_id and the details for the account. If you wish to mark the account as closed without permanently deleting it, use this endpoint to update the managed field to false.

HTTP REQUEST

PUT /account/{account_id}

Account Activity

List all account asset sizes

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/account/50b4d384-986d-4892-a30a-bc4c146d25a9/asset_size"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_account_asset_size_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_account_asset_size_all_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        try {
            PageVAccountAssetSize List = apiInstance.getAccountAssetSizeAllUsingGet(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAccountAssetSizeAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$account_id = "ff16ee08-7dd0-44e5-8bfa-6647c3d638e6"; // string | Account Id
$end_date = new \DateTime("2020-08-14"); // \DateTime | end date
$exclude_subledger = false; // bool | exclude_subledger
$get_latest = true; // bool | true or false
$sort_type = null; // string | Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
$start_date = new \DateTime("2020-05-06"); // \DateTime | start date

try {
    $acccountasset = $apiInstance->getAccountAssetSizeAggAllUsingGet($account_id, $end_date, $exclude_subledger, $get_latest, $sort_type, $start_date);
    print_r($acccountasset);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountAssetSizeAggAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  #List all account asset sizes
  accountasset = api_instance.get_account_asset_size_all_using_get(opts)
  p accountasset
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_account_asset_size_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var opts = {
    'ascending': true, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 10 // Number | size
};

var accountaassetsize = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};

apiInstance.getAccountAssetSizeAllUsingGet(opts, accountaassetsize)

Example Response

[
  {
    "date": "2018-02-03",
    "currency_code": "USD",
    "value": 20000,
    "value_available": null,
    "value_pending": null,
    "cash_flow": 0
  },
  {
    "date": "2018-02-10",
    "currency_code": "USD",
    "value": 20543,
    "value_available": null,
    "value_pending": null,
    "cash_flow": 500
  }
]

Get a list of asset sizes by date for an account. Asset size records are created at the portfolio level and aggregated to yield the account asset size(s). The unique account_id must be provided. To obtain the appropriate account_id, use the GET /account endpoint to view the accounts defined for your tenant. The endpoint returns a list of asset sizes by date for the account. Additional parameters available to narrow down what is returned include date range, only obtaining the latest record, and sorting by different units of time (eg. annually, quarterly, monthly, daily).

HTTP REQUEST

GET /account/{account_id}/asset_size

ARGUMENTS

Parameter Type Required Description
get_latest boolean optional Retrieve only the latest asset size. Defaults to false if not set
sort_type string optional Sort the asset sizes by D Daily, M Monthly, Q Quarterly, Y Yearly. Defaults to D Daily if not set. Must be capital letters
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
exclude_subledger boolean optional If set to “true”, excludes portfolios under accounts where is_subledger = “true” to not double count assets of subaccounts. Defaults to “false” which includes all portfolios under an account.
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
date date Date for the asset size record. Displays the latest record if more than one entry exists for the given date.
currency_code string Alphabetic currency code for the asset size. See currency codes
value double Monetary value of the account on the particular date
value_available double Available monetary value of the account on the particular date
value_pending double Pending monetary value of the account on the particular date
cash_flow double Amount added to the account or withdrawn from the account since the last asset size date. Value is used for performance calculations. Value may be positive or negative.

List all account transactions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/account/50b4d384-986d-4892-a30a-bc4c146d25a9/transaction"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_transaction_agg_all_using_get("73260a17-5a7a-4025-a60a-6a78284b1416")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_transaction_agg_all_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        try {
            PagePortfolioTransaction List = apiInstance.getPortfolioTransactionAggAllUsingGet(UUID.fromString("ff16ee08-7dd0-44e5-8bfa-6647c3d638e6"), true, null, enddate, null, 0, 10, startdate);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioTransactionAggAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$ascending = false; // bool | ascending
$end_date = new \DateTime("2020-08-14"); // \DateTime | end_date
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size
$start_date = new \DateTime("2020-05-06"); // \DateTime | start_date

try {
    $accounttransaction = $apiInstance->getPortfolioTransactionAggAllUsingGet($account_id, $ascending, $end_date, $order_by, $page, $size, $start_date);
    print_r($accounttransaction);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getPortfolioTransactionAggAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | USD
    end_date: Date.parse('2013-10-20'), # Date | end date
    order_by: 'update_date', # String | order_by
    page: 0, # Integer | page
    size: 25, # Integer | size
    start_date: Date.parse('2013-10-20') # Date | start date
}

begin
  #List all account transactions
  transaction = api_instance.get_portfolio_transaction_agg_all_using_get(account_id, opts)
  p transaction
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_portfolio_transaction_agg_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var accountId = "11c28dade-8679-4df5-9b9d-c508d04fcb0c";

var opts = {
    'ascending': true, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 10 // Number | size
};

var accounttransaction = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};

apiInstance.getPortfolioTransactionAggAllUsingGet(accountId, opts, accounttransaction)

Example Response

{
  "content": [
    {
      "id": "50b4d384-986d-4892-a30a-bc4c146d25a9",
      "date": "2018-01-31T00:00:00.000+0000",
      "date_available": null,
      "is_recurring": false,
      "is_cleansed": false,
      "is_disputed": false,
      "is_read": true,
      "portfolio_id": "c193de6e-564d-4b2d-893d-0307e92279b7",
      "model_id": "19ef73a9-8dd9-4df0-970e-c3f57c6f8d38",
      "price": 432.2,
      "quantity": 0.5,
      "currency_code": null,
      "amount": null,
      "balance": null,
      "merchant_id": null,
      "mid": null,
      "merchant": null,
      "merchant_category_code": null,
      "transaction_category_id": null,
      "category": null,
      "subcategory": null,
      "description": null,
      "memo": null,
      "status": null,
      "check": {},
      "funding_id": null,
      "security_id": "088c1dc6-6750-411d-8679-dfeeaa7241e3",
      "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
      "create_date": "2018-01-25T09:00:00.000+0000",
      "update_date": "2018-02-15T09:00:00.000+0000"
    },
    {
      "id": "97c771ac-64b7-461e-a5b3-7d93169dc58b",
      "date": "2018-01-31T00:00:00.000+0000",
      "date_available": null,
      "is_recurring": false,
      "is_disputed": false,
      "is_cleansed": false,
      "is_read": true,
      "portfolio_id": "c193de6e-564d-4b2d-893d-0307e92279b7",
      "model_id": "19ef73a9-8dd9-4df0-970e-c3f57c6f8d38",
      "price": 132.2,
      "quantity": 4,
      "currency_code": null,
      "amount": null,
      "balance": null,
      "merchant_id": null,
      "mid": null,
      "merchant": null,
      "merchant_category_code": null,
      "transaction_category_id": null,
      "category": null,
      "subcategory": null,
      "description": null,
      "memo": null,
      "status": null,
      "location": {},
      "check": {},
      "funding_id": null,
      "security_id": "59add370-01cf-42a0-bee8-ad75065df603",
      "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
      "create_date": "2018-01-25T09:00:00.000+0000",
      "update_date": "2018-02-15T09:00:00.000+0000"
    }
  ],
  "total_pages": 1,
  "total_elements": 2,
  "last": true,
  "sort": [
    {
        "direction": "DESC",
        "property": "id",
        "ignore_case": false,
        "null_handling": "NATIVE",
        "descending": true,
        "ascending": false
    }
  ],
  "first": true,
  "number_of_elements": 2,
  "size": 25,
  "number": 2
}

Get the information for all transactions for an account. Transaction records are created at a portfolio level and all transactions for each portfolio below an account are returned to show the account’s transaction activity. The unique account_id must be provided. To obtain the appropriate account_id, use the GET /account endpoint to view the accounts defined for your tenant. The endpoint returns a list of transaction_ids and details for each transaction.

HTTP REQUEST

GET /account/{account_id}/transaction

ARGUMENTS

Parameter Type Required Description
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
id UUID The id for the transaction record
date timestamp Timestamp when the transaction occurred
date_available timestamp Timestamp when the transaction becomes available
is_cleansed boolean Indicates if the transaction has been cleansed by a data cleansing engine. Defaults to false which indicates that it has not been cleansed
is_read boolean Indicates if the transaction has been read. Defaults to false which indicates that it has not been read
is_recurring boolean Indicates if the transaction is recurring such as a subscription. Defaults to false which indicates that it is not recurring
is_disputed boolean Indicates if the transaction is disputed by the client. Defaults to false which indicates that it is not disputed
portfolio_id UUID The id of the portfolio that the transaction record relates to
funding_id UUID The id of the funding request that the transaction record relates to
model_id UUID The id of the model to which the portfolio that the transaction falls under subscribes
price double Price at which security was bought or sold included in the transaction
quantity double Quantity of shares of the security purchased
currency_code string Alphabetic currency code for the amount. See currency codes
amount double Amount of the transaction
balance double Updated balance of the portfolio as a result of the transaction
merchant_id UUID ID of the merchant resource for the transaction
mid string Acquirer ID of the merchant (MID) for the transaction
merchant string The merchant for the transaction such as the merchant posted for a credit or debit card charge
merchant_category_code string The MCC Code for the merchant as identified by the card network
transaction_category_id string ID of the category resource for the transaction
category string Category of the transaction
subcategory string Subcategory of the transaction
description string Description of the transaction
memo string Memo attached to the transaction
status string Status of the transaction
location map Location where the transaction occurred
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      latitude double Latitude of the location where the transaction occurred
      longitude double Longitude of the location where the transaction occurred
check map Check associated with the banking transaction
      check_number string Number on the check such as “1234”
      check_amount double Monetary amount of the check
      check_images map Image(s) of the scanned check(s)
            image_url string URL where the image can be displayed
            image_type string Type of image for the check such as “png” or “jpeg”
security_id UUID The id of the security included in the transaction
transaction_code_id UUID The id referring to the transaction code, defined by your firm
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the transaction record was created
update_date timestamp Timestamp for the date and time that the transaction record was last updated

Account Type

Accounts are assigned an account type based on the legal construct of the account. Examples include a “Wallet” or “Debit.”

Field Type Description
id UUID The id for the specific account type
name string Name of the account type such as Taxable or Joint
short_name string Abbreviated name for the account type
category string Category grouping that the account type falls under
subcategory string Subcategory grouping under the category that the account type falls under
code string Code defined by your firm for the specific account type
is_active boolean Indicates if his account type is active. Defaults to true which indicates it is active and available to be assigned to accounts
is_taxable boolean Indicates if this account type is taxable. Defaults to true which indicates it is taxable
is_asset boolean Indicates if this account type is an asset. Defaults to true which indicates it is an asset
is_cash boolean Indicates if this account type is cash. Defaults to true which indicates it is cash
is_business boolean Indicates if this account type is for a business. Defaults to false which indicates it is not for a business account
is_investment boolean Indicates if this account type is for an investment account. Defaults to false which indicates it is not for an investment account
metadata map Custom information associated with the entity in the format key:value
See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all account types

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/account_type"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_account_type_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_account_type_all_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        try {
            PageAccountType List = apiInstance.getAccountTypeAllUsingGet(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAccountTypeAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; //int | page
$size = 10; //int | size

try {
    $accounttypelist = $apiInstance->getAccountTypeAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($accounttypelist);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountTypeAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  #List all account types
  accounttypelist = api_instance.get_account_type_all_using_get(opts)
  p accounttypelist
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_account_type_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var opts = {
    'ascending': true, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 10 // Number | size
};

var accountypelist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};

apiInstance.getAccountTypeAllUsingGet(opts, accountypelist)

Example Response

{
    "content": [
        {
            "id": "50d76212-0fcd-4d36-8633-e4a52cbcb79f",
            "create_date": "2018-04-13T14:24:43.000+0000",
            "update_date": "2018-04-13T14:24:43.000+0000",
            "category": "Custodial",
            "code": "101",
            "is_active": true,
            "is_taxable": true,
            "is_asset": true,
            "is_cash": true,
            "is_business": true,
            "is_investment": true,
            "name": "Custodial",
            "short_name": "CUST",
            "metadata": {}
        },
        {
            "id": "cb94ee79-1ef4-4d67-9611-97a739523aeb",
            "create_date": "2018-04-13T14:24:43.000+0000",
            "update_date": "2018-04-13T14:24:43.000+0000",
            "category": "Retirement",
            "code": "102",
            "is_active": true,
            "is_taxable": false,
            "is_asset": true,
            "is_cash": true,
            "is_business": true,
            "is_investment": true,
            "name": "Retirement",
            "short_name": "RETIR",
            "metadata": {}
        },
        {
            "id": "f80b5555-7503-4a28-bc4b-d05d62e0e733",
            "create_date": "2018-04-13T14:24:43.000+0000",
            "update_date": "2018-04-13T14:24:43.000+0000",
            "category": "Taxable",
            "code": "103",
            "is_active": true,
            "is_taxable": true,
            "is_asset": true,
            "is_cash": true,
            "is_business": true,
            "is_investment": true,
            "name": "Taxable",
            "short_name": "TXB",
            "metadata": {}
        }
    ],
    "last": false,
    "total_pages": 1,
    "total_elements": 3,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 3,
    "size": 25,
    "number": 0
}

List all account types defined for your tenant. Use this endpoint to determine which account_type_id to assign to a new account.

HTTP REQUEST

GET /account_type

Retrieve an account type

Example Request

curl -X GET -H "Authorization: Bearer 7f137375-c63b-49fb-84eb-5abbd3b780a3" \
    "https://api.hydrogenplatform.com/nucleus/v1/account_type/cf80b5555-7503-4a28-bc4b-d05d62e0e733"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_account_type_using_get("39197961-c928-48de-8e39-a70a2cf367f9")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_account_type_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        try {
            AccountType responseType =apiInstance.getAccountTypeUsingGet(UUID.fromString("e46a78a7-3fe0-4502-a5ec-e42660bab4b5"));
            System.out.println(responseType);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAccountTypeUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$account_type_id1 = "e46a78a7-3fe0-4502-a5ec-e42660bab4b5";

try {
    $accounttype = $apiInstance->getAccountTypeUsingGet($account_type_id1);
    print_r($accounttype);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountTypeUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
account_type_id = 'e46a78a7-3fe0-4502-a5ec-e42660bab4b5' # String | UUID account_type_id
begin
  #Get an Account Type
  accounttype = api_instance.get_account_type_using_get(account_type_id)
  p accounttype
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_account_type_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var accounttypeID = "e46a78a7-3fe0-4502-a5ec-e42660bab4b5";


var accounttype = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getAccountTypeUsingGet("e46a78a7-3fe0-4502-a5ec-e42660bab4b5", "e46a78a7-3fe0-4502-a5ec-e42660bab4b5", accounttype)

Example Response

{
    "id": "f80b5555-7503-4a28-bc4b-d05d62e0e733",
    "create_date": "2018-04-13T14:24:43.000+0000",
    "update_date": "2018-04-13T14:24:43.000+0000",
    "category": "Taxable",
    "code": "103",
    "is_active": true,
    "is_taxable": true,
    "is_asset": true,
    "is_cash": true,
    "is_business": true,
    "is_investment": true,
    "short_name": "TXB",
    "name": "Taxable",
    "metadata": {}
}

Retrieve the information for an account type defined for your tenant. The unique account_type_id must be provided. The endpoint returns the account_type_id and the details for the account type specified.

HTTP REQUEST

GET /account_type/{account_type_id}

Account Permission

The Account Permission endpoints vary slightly from other Nucleus endpoints as they are not used to manage specific objects, but rather to manage the permission type of a client to an account. All of the authorities except the ROLE_CLIENT authority can access these endpoints.

Field Type Description
account_id UUID The id of the account being granted permissions
clients array List of clients mapped to the account and their permission type
      client_id UUID The id of the client being granted permissions to the account. Must also be included in the clients.client_id field of the account
      permission_type string The permission type for the client. Available values are INQUIRY_ACCESS, LIMITED_AUTHORITY, FULL_AUTHORITY, and POWER_OF_ATTORNEY. Please view the Permission Type resource for more information on each authority. To view what endpoints each authority permissions, please see this guide

List all account permissions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/account_permission"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_all_account_permission_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_all_account_permission_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        try {
            PageAccountPermissionVO List = apiInstance.getAllAccountPermissionUsingGET(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAllAccountPermissionUsingGET");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $accountpermissionlist = $apiInstance->getAllAccountPermissionUsingGET($ascending, $filter, $order_by, $page, $size);
    print_r($accountpermissionlist);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAllAccountPermissionUsingGET: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  #List all account permission
  accountpermissionlist = api_instance.get_all_account_permission_using_get(opts)
  p accountpermissionlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_all_account_permission_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var opts = {
    'ascending': true, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 10 // Number | size
};

var accountpermissionlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};

apiInstance.getAllAccountPermissionUsingGET(opts, accountpermissionlist)

Example Response

{
    "content": [
        {
            "account_id": "6fca8ba0-d7e6-42cb-863d-a0f9f794ced5",
            "clients": [
                {
                    "permission_type": "FULL_AUTHORITY",
                    "client_id": "6e8e1cbd-c52d-4be7-a466-b00863999b2c"
                },
                {
                    "permission_type": "INQUIRY_ACCESS",
                    "client_id": "4358f699-8563-46f7-aff4-9817c30ac907"
                }
            ]
        },
        {
            "account_id": "3db529a2-bab7-4ecf-8b7f-bb738a2ed371",
            "clients": [
                {
                    "permission_type": "FULL_AUTHORITY",
                    "client_id": "4358f699-8563-46f7-aff4-9817c30ac907"
                }
            ]
        }
    ],
    "total_elements": 2,
    "total_pages": 1,
    "last": true,
    "first": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "number_of_elements": 2,
    "size": 25,
    "number": 0
}

Get the clients and permission types for all accounts defined for your tenant. Account permissions control the actions that a client can take on an account. Only clients with the authority of ROLE_SUPER_ADMIN, ROLE_ADMIN, ROLE_PORTFOLIO_MANAGER, ROLE_MARKETING_MANAGER, ROLE_OPERATIONS, ROLE_SUPPORT, or ROLE_ADVISOR can access this endpoint.

HTTP REQUEST

GET /account_permission

Retrieve an account’s permissions

Example Request

curl -X GET -H "Authorization: Bearer 7f137375-c63b-49fb-84eb-5abbd3b780a3" \
    "https://api.hydrogenplatform.com/nucleus/v1/account_permission/f446662e-042d-4a65-b528-f7b8353fb67e"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_account_permission_using_get("b28fdb2e-845a-4042-b518-619c8fb38589")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_account_permission_using_get: %s\n" % e)
AccountApi apiInstance = new AccountApi();
        try {
            AccountPermissionVO responsePermission = apiInstance.getAccountPermissionUsingGET(UUID.fromString("eea5c34e-6a0c-4111-8790-8056a5f87e14"));
            System.out.println(responsePermission);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAccountPermissionUsingGET");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
$accountpermission_id = "eea5c34e-6a0c-4111-8790-8056a5f87e14"; // string | account_id

try {
    $accountpermission = $apiInstance->getAccountPermissionUsingGET($accountpermission_id);
    print_r($accountpermission);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountPermissionUsingGET: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
account_id = 'eea5c34e-6a0c-4111-8790-8056a5f87e14' # String | account_id
begin
  #Get an account permission
  accountpermissiion = api_instance.get_account_permission_using_get(account_id)
  p accountpermissiion
rescue NucleusApi::ApiError => e
  puts "Exception when calling AccountApi->get_account_permission_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
var accountpermissionID = "84914c2a-9a9c-4ec6-bd86-5660aedbd8df";


var accountpermission = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getAccountPermissionUsingGET("84914c2a-9a9c-4ec6-bd86-5660aedbd8df", accountpermission)

Example Response

{
    "account_id": "f446662e-042d-4a65-b528-f7b8353fb67e",
    "clients": [
        {
            "permission_type": "LIMITED_AUTHORITY",
            "client_id": "5c13bf69-3331-417a-bce7-88f8172363b5"
        }
    ]
}

Retrieve all the clients and their permission type for a specific account. Only clients with the authority of ROLE_SUPER_ADMIN, ROLE_ADMIN, ROLE_PORTFOLIO_MANAGER, ROLE_MARKETING_MANAGER, ROLE_OPERATIONS, ROLE_SUPPORT, or ROLE_ADVISOR can access this endpoint.

HTTP REQUEST

GET /account_permission/{account_id}

Update an account’s permissions

Example Request

curl -X PUT -H "Authorization: Bearer 7f137375-c63b-49fb-84eb-5abbd3b780a3" \
-H "Content-Type: application/json" \
-d '{
        "client_id": "I5c13bf69-3331-417a-bce7-88f8172363b5",
        "permission_type": "LIMITED_AUTHORITY"
    }' "https://api.hydrogenplatform.com/nucleus/v1/account_permission/f446662e-042d-4a65-b528-f7b8353fb67e"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
# Update AccountPermission
permission_update = {'permission_type': 'FULL_AUTHORITY'} # object | spending_control
permission_id = '7dfaa220-d01e-4a69-9f9e-896fc1803ebe' # str | UUID spending_control_id

try:
    api_response = api_instance.update_client_account_permission_using_put(permission_update, acl_client_permission_vo="7dfaa220-d01e-4a69-9f9e-896fc1803ebe");
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_client_account_permission_using_put: %s\n" % e)
AccountApi apiInstance = new AccountApi();
       //Update Account Permission
        Map map3 = new HashMap();
        map.put("permission_type", "FULL_AUTHORITY");

        try {
            AccountPermissionVO response = apiInstance.updateClientAccountPermissionUsingPUT(UUID.fromString("d5144cbb-64c8-4f4e-9ee2-28a07b003dc3"), map3);
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
//Update Account Permission
$account_permission_update = new stdClass();
$account_permission_id = "6d8a6df9-9ffc-42aa-8bbb-d86b9c6df361";

try {
    $account_permission_update->permission_type = "full_authority";
    $result = $apiInstance->updateClientAccountPermissionUsingPUT($account_permission_update, $account_permission_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateAccountAllocationMappingUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
#Update Account Permisiion
account_permission_update = {"permission_type" => 'FULL_AUTHORITY'}
account_permission_id = '21f7e53f-fe46-4b3b-bf47-ac47e2d25f49'
begin
  result = api_instance.update_client_account_permission_using_put(account_permission_update, account_permission_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_client_account_permission_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
//Update AccountPermission
var apiInstance = new HydrogenNucleusApi.AccountApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var accountpermission = new HydrogenNucleusApi.AclClientPermissionVO();
var accountpId = "88bc6be8-58b2-43c5-9dc2-081ea88a3b78";

accountpermission.permission_type = 'FULL_AUTHORITY';
apiInstance.updateClientAccountPermissionUsingPUT(accountpermission, accountpId, callback)

Example Response

{
    "account_id": "f446662e-042d-4a65-b528-f7b8353fb67e",
    "clients": [
        {
            "permission_type": "LIMITED_AUTHORITY",
            "client_id": "5c13bf69-3331-417a-bce7-88f8172363b5"
        }
    ]
}

Update the permission type of a client for an account. When a client_id is included in the clients embedded object of a call to the POST /account and PUT /account/{account_id} endpoints, they will automatically be mapped to the account with a permission type based on the client_account_association_type granted to them. If you would like the user to have a different permission type, you can use this endpoint to change it. The account_id is specified in the URL, and the client_id and the updated permission type must be provided in the request body. Only clients with the authority of ROLE_SUPER_ADMIN, ROLE_ADMIN, ROLE_PORTFOLIO_MANAGER, ROLE_MARKETING_MANAGER, ROLE_OPERATIONS, ROLE_SUPPORT, or ROLE_ADVISOR can access this endpoint.

HTTP REQUEST

PUT /account_permission/{account_id}

ARGUMENTS

Parameter Type Required Description
clients array optional List of clients mapped to the account and their permission type
      client_id UUID required The id of the client being granted permissions to the account. Must also be included in the clients.client_id field of the account
      permission_type string required The permission type for the client. Available values are INQUIRY_ACCESS, LIMITED_AUTHORITY, FULL_AUTHORITY, and POWER_OF_ATTORNEY. Please view the Permission Type resource for more information on each authority. To view what endpoints each authority permissions, please see this guide

Delete an account’s permissions

Example Request

curl -X DELETE -H "Authorization: Bearer 7f137375-c63b-49fb-84eb-5abbd3b780a3" \
    "https://api.hydrogenplatform.com/nucleus/v1/account_permission/f446662e-042d-4a65-b528-f7b8353fb67e"
api_instance = nucleus_api.AccountApi(nucleus_api.ApiClient(configuration))
# Delete a AccountPermission
permission_id = 'a85769ac-3567-45d3-91d3-2970b85c5bd7'
try:
    api_instance.delete_account_permission_using_delete(permission_id)
except ApiException as e:
    print("Exception when delete_account_permission_using_delete: %s\n" % e)
AccountApi apiInstance = new AccountApi();
//Delete Account Permission
        try {
            AccountPermissionVO deleteresponse = apiInstance.deleteAccountPermissionUsingDELETE(UUID.fromString("37fbe1d5-848e-4b4a-982b-de7792fce6d3"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\AccountApi(
    new GuzzleHttp\Client(),
    $config
);
//Delete Account Permission
$account_permission_did = "88bc6be8-58b2-43c5-9dc2-081ea88a3b78"; // string | UUID account_id

try {
    $apiInstance->deleteAccountPermissionUsingDELETE($account_allocation_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deleteAccountPermissionUsingDELETE: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::AccountApi.new
#Delete Account Permission
accountpermission1_id = 'a6324427-597a-4c8e-88ed-4e640944f4c5'
begin
  result = api_instance.delete_account_permission_using_delete(accountpermission1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_account_permission_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.AccountApi();
//Delete a AccountPermission
var accountpermission1 = "39febc7f-ce86-4815-b4cb-cca9d05ba701"; // String | spending_control_id


var deleteaccountpermission = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deleteAccountPermissionUsingDELETE(accountpermission1, deleteaccountpermission)

Response (204 No Content)

Permanently delete the permissions of an account. The account_id must be provided in the URL. This removes all the clients mapped to the account and their permission types. Only clients with the authority of ROLE_SUPER_ADMIN, ROLE_ADMIN, ROLE_PORTFOLIO_MANAGER, ROLE_MARKETING_MANAGER, ROLE_OPERATIONS, ROLE_SUPPORT, or ROLE_ADVISOR can access this endpoint.

HTTP REQUEST

DELETE /account_permission/{account_id}

Business

A business represents a corporate entity where collections of clients are employed.

Field Type Description
id UUID The id of the business
legal_name string Company full legal name listed at the state registrar
dba_name string Company “Doing Business as Name” or “DBA”
legal_structure string Company legal type such as C-Corp or LLC
category string Company category
subcategory string Company subcategory
identification_number string Legal identifier such as an EIN in the US, frequently used for Know-Your-Customer (KYC) purposes. Returns as omitted in all API responses for security.
identification_number_type string Type of identification number such as an “EIN” in the US
incorporation_date date Date the company was formed in the format yyyy-mm-dd
incorporation_country string Country the company was formed in, using the ISO ALPHA-2 Code. See country codes
incorporation_state string State the company was formed in, such as “Delaware”
email string Contact email for the business in the format sample@example.com
phone_number string Phone number associated with the business
website string URL of the website for the business such as https://domain.com
address map Address details for the business
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      type string Type of address such as “billing”, “mailing”, etc. This is used to differentiate between multiple addresses provided
ownership map Ownership details for the business
      client_id UUID ID of the client
      role string Role of the client in the business such as “COO” or “Vice President”
      percent_ownership double Ownership percentage for the individual such as “40”
      is_beneficial boolean Indicates if the individual is a beneficial owner, or that they own 25% or more of the business. Defaults to false which indicates they are not beneficial.
      is_primary boolean Indicates if the individual is the primary owner, such as the principal officer, proprietor, or director in the company. Only one record may be set to true per business. Defaults to false which indicates they are not primary.
is_public boolean Indicates if the company is listed publicly on a stock exchange. Defaults to null.
ticker string If the company is public, the ticker symbol on the exchange such as “AMZN”
status string Status of the business such as “Registered” or “Active”
is_verified boolean Indicates if the identifying details provided by the business have been verified by a Know-Your-Customer (KYC) vendor. Defaults to false which indicates it is not verified
is_active boolean Indicates if the business is currently active. Defaults to true which indicates it is active
metadata map Custom information associated with the business in the format key:value. See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

Business Management

List all businesses

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/business"
api_instance = nucleus_api.BusinessApi(nucleus_api.ApiClient(configuration))
try:
    # List all business
    api_response = api_instance.get_business_all_using_get(ascending=ascending,  order_by=order_by, page=page, size=size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BusinessApi->get_business_all_using_get: %s\n" % e)
BusinessApi apiInstance = new BusinessApi();
//Get all Business
try {
    PageBusiness response = apiInstance.getBusinessAllUsingGet(true, null, null, 0, 10);
    System.out.println(response);
} catch (ApiException e) {
    System.err.println("Exception when calling getBusinessAllUsingGet");
    e.printStackTrace();
}
$apiInstance = new com\hydrogen\nucleus\Api\BusinessApi(
    new GuzzleHttp\Client(),
    $config);
//List all Business
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 25; // int | size

try {
    $result = $apiInstance->getBusinessAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BusinessApi->getBusinessAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BusinessApi.new
#Get all Business
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: nil, # String | filter
    order_by: nil, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  result = api_instance.get_business_all_using_get(opts)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling BusinessApi->get_business_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BusinessApi();
//List all Business
var opts = {
    'ascending': false, // Boolean | ascending
    'filter': null, // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var businesslist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBusinessAllUsingGet(opts, businesslist);

Example Response

{
    "content": [
        {
            "id": "b0c59dc7-00d3-49e6-b7c4-6bdbb6c0808b",
            "legal_name": "Pacocha and Sons",
            "dba_name": null,
            "legal_structure": "LLC",
            "category": null,
            "subcategory": null,
            "identification_number": "*** omitted ***",
            "identification_number_type": "EIN",
            "incorporation_date": null,
            "incorporation_country": null,
            "incorporation_state": null,
            "email": null,
            "phone_number": null,
            "website": null,
            "address": [
                {
                    "address_line1": "0303 Heidi Freeway",
                    "address_line2": null,
                    "type": "registered",
                    "is_primary": false,
                    "city": "Karsonburgh",
                    "state": "NY",
                    "postalcode": "98559",
                    "country": "US"
                }
            ],
            "ownership": [
                {
                    "client_id": "714e8854-45ac-427e-a05d-d784bfc27f87",
                    "role": "President",
                    "percent_ownership": null,
                    "is_beneficial": false,
                    "is_primary": true
                },
                {
                    "client_id": "02245dc8-7f43-45cd-882f-0c16961128eb",
                    "role": "Vice-President",
                    "percent_ownership": null,
                    "is_beneficial": true,
                    "is_primary": false
                }
            ],
            "is_public": null,
            "ticker": null,
            "status": null,
            "is_verified": true,
            "is_active": true,
            "metadata":{},
            "secondary_id": null,
            "create_date": "2020-12-16T09:13:51.697+0000",
            "update_date": "2020-12-16T09:22:08.170+0000"
        },
        {
            "id": "19dfd772-2e2d-456d-ac58-e4c814d8a863",
            "legal_name": "Murazik Group",
            "dba_name": null,
            "legal_structure": "Sole Proprietorship",
            "category": null,
            "subcategory": null,
            "identification_number": "*** omitted ***",
            "identification_number_type": "EIN",
            "incorporation_date": null,
            "incorporation_country": null,
            "incorporation_state": null,
            "email": null,
            "phone_number": null,
            "website": null,
            "address": [
                {
                    "address_line1": "3584 Konopelski Manors",
                    "address_line2": null,
                    "type": "registered",
                    "is_primary": false,
                    "city": "New Melvin",
                    "state": "NY",
                    "postalcode": "98850",
                    "country": "US"
                }
            ],
            "ownership": [
                {
                    "client_id": "d4ca71f6-9b43-41f1-a883-f167bc83be16",
                    "role": "Secretary",
                    "percent_ownership": null,
                    "is_beneficial": false,
                    "is_primary": true
                }
            ],
            "is_public": null,
            "ticker": null,
            "status": null,
            "is_verified": true,
            "is_active": true,
            "metadata":{},
            "secondary_id": null,
            "create_date": "2020-12-15T14:03:14.617+0000",
            "update_date": "2020-12-16T08:15:37.070+0000"
        }
    ],
    "total_elements": 2,
    "total_pages": 1,
    "last": false,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "first": true,
    "number_of_elements": 25,
    "size": 25,
    "number": 0
}

Get details for all businesses registered with your tenant. Note that the address information and the metadata information are nested objects within the business object.

HTTP REQUEST

GET /business

Create a business

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
                "id": "b0c59dc7-00d3-49e6-b7c4-6bdbb6c0808b",
                "legal_name": "Pacocha and Sons",
                "legal_structure": "LLC",
                "identification_number": "29-984848",
                "identification_number_type": "EIN",
                "address": [
                        {
                                "address_line1": "0303 Heidi Freeway",
                                "address_line2": null,
                                "type": "registered",
                                "is_primary": false,
                                "city": "Karsonburgh",
                                "state": "NY",
                                "postalcode": "98559",
                                "country": "US"
                        }
                ],
                "ownership": [
                        {
                                "client_id": "714e8854-45ac-427e-a05d-d784bfc27f87",
                                "role": "President",
                                "percent_ownership": null,
                                "is_beneficial": false,
                                "is_primary": true
                        },
                        {
                                "client_id": "02245dc8-7f43-45cd-882f-0c16961128eb",
                                "role": "Vice-President",
                                "percent_ownership": null,
                                "is_beneficial": true,
                                "is_primary": false
                        }
                ]
      }' "https://api.hydrogenplatform.com/nucleus/v1/business"
api_instance = nucleus_api.BusinessApi(nucleus_api.ApiClient(configuration))
# Create Business
business_request = nucleus_api.Business(legal_name ='user 786') # Business | businessRequest
business_request.dba_name = 'hg67'
business_request.legal_structure = 'LLC'

try:
    # Create a business
    api_response = api_instance.create_business_using_post(business_request)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BusinessApi->create_business_using_post: %s\n" % e)
BusinessApi apiInstance = new BusinessApi();
//Create a New Business
Business createRequest = new Business();
createRequest.legalName("abc Corp");
createRequest.dbaName("one");
createRequest.legalStructure("LLC");

try {
    Business result = apiInstance.createBusinessUsingPost(createRequest);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling createBusinessUsingPost");
    e.printStackTrace();
}
$apiInstance = new com\hydrogen\nucleus\Api\BusinessApi(
    new GuzzleHttp\Client(),
    $config);
//Create Business
$business_request = new \com\hydrogen\nucleus\Model\Business(); // \com\hydrogen\nucleus\Model\Business | businessRequest
$business_request->setLegalName("abc_corp");
$business_request->setDbaName("ab1");
$business_request->setLegalStructure("LLC");

try {
    $result = $apiInstance->createBusinessUsingPost($business_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BusinessApi->createBusinessUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BusinessApi.new
#Create a Business
business_request = NucleusApi::Business.new # Business | businessRequest
business_request.legal_name = "abc Corps"
business_request.dba_name = "jjj"
business_request.legal_structure = "LLP Inc."


begin
  #Create a business
  result = api_instance.create_business_using_post(business_request)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling BusinessApi->create_business_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BusinessApi();
//Create Business
var businessRequest = new HydrogenNucleusApi.Business(); // Business | businessRequest

businessRequest.legal_name = 'abgc Corp';
businessRequest.dba_name = 'one';
businessRequest.legal_structure = 'LLC';


var newBusiness = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createBusinessUsingPost(businessRequest, newBusiness);

Example Response

{
    "id": "b0c59dc7-00d3-49e6-b7c4-6bdbb6c0808b",
    "legal_name": "Pacocha and Sons",
    "dba_name": null,
    "legal_structure": "LLC",
    "category": null,
    "subcategory": null,
    "identification_number": "*** omitted ***",
    "identification_number_type": "EIN",
    "incorporation_date": null,
    "incorporation_country": null,
    "incorporation_state": null,
    "email": null,
    "phone_number": null,
    "website": null,
    "address": [
        {
            "address_line1": "0303 Heidi Freeway",
            "address_line2": null,
            "type": "registered",
            "is_primary": false,
            "city": "Karsonburgh",
            "state": "NY",
            "postalcode": "98559",
            "country": "US"
        }
    ],
    "ownership": [
        {
            "client_id": "714e8854-45ac-427e-a05d-d784bfc27f87",
            "role": "President",
            "percent_ownership": null,
            "is_beneficial": false,
            "is_primary": true
        },
        {
            "client_id": "02245dc8-7f43-45cd-882f-0c16961128eb",
            "role": "Vice-President",
            "percent_ownership": null,
            "is_beneficial": true,
            "is_primary": false
        }
    ],
    "is_public": null,
    "ticker": null,
    "status": null,
    "is_verified": true,
    "is_active": true,
    "metadata":{},
    "secondary_id": null,
    "create_date": "2020-12-16T09:13:51.697+0000",
    "update_date": "2020-12-16T09:22:08.170+0000"
}

Create a new business with your tenant. The create_date will default to the current date. The endpoint returns a unique business_id that is used to manage the specific business and referenced in other endpoints.

HTTP REQUEST

POST /business

ARGUMENTS

Parameter Type Required Description
legal_name string required Company full legal name listed at the state registrar
dba_name string optional Company “Doing Business as Name” or “DBA”
legal_structure string optional Company legal type such as C-Corp or LLC
category string optional Company category
subcategory string optional Company subcategory
identification_number string optional Legal identifier such as an EIN in the US, frequently used for Know-Your-Customer (KYC) purposes. Returns as omitted in all API responses for security.
identification_number_type string optional Type of identification number such as an “EIN” in the US
incorporation_date date optional Date the company was formed in the format yyyy-mm-dd
incorporation_country string optional Country the company was formed in, using the ISO ALPHA-2 Code. See country codes
incorporation_state string optional State the company was formed in, such as “Delaware”
email string optional Contact email for the business in the format sample@example.com
phone_number string optional Phone number associated with the business
website string optional URL of the website for the business such as https://domain.com
address map optional Address details for the business
      address_line1 string required Primary information for the street address, such as the street and building number
      address_line2 string optional Secondary information for the street address, such as a suite or apartment number
      city string required City for the address
      state string required State, province, or sub-country region for the address
      postalcode string optional Alphanumeric postal code or zip code for the address
      country string required Country for the address using the ISO ALPHA-2 Code. See country codes
      type string required Type of address such as “billing”, “mailing”, etc. This is used to differentiate between multiple addresses provided
ownership map optional Ownership details for the business
      client_id UUID required ID of the client
      role string required Role of the client in the business such as “COO” or “Vice President”
      percent_ownership double optional Ownership percentage for the individual such as “40”
      is_beneficial boolean optional Indicates if the individual is a beneficial owner, or that they own 25% or more of the business. Defaults to false which indicates they are not beneficial.
      is_primary boolean optional Indicates if the individual is the primary owner, such as the principal officer, proprietor, or director in the company. Only one record may be set to true per business. Defaults to false which indicates they are not primary.
is_public boolean optional Indicates if the company is listed publicly on a stock exchange. Defaults to null.
ticker string optional If the company is public, the ticker symbol on the exchange such as “AMZN”
status string optional Status of the business such as “Registered” or “Active”
is_verified boolean optional Indicates if the identifying details provided by the business have been verified by a Know-Your-Customer (KYC) vendor. Defaults to false which indicates it is not verified
is_active boolean optional Indicates if the business is currently active. Defaults to true which indicates it is active
metadata map optional Custom information associated with the business in the format key:value. See Metadata

Retrieve a business

Retrieve the information for a business registered with your tenant. The unique business_id must be provided. The endpoint returns the business_id and the details for the business. Note that the address information and the metadata information are nested objects within the business object.

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/business/b0c59dc7-00d3-49e6-b7c4-6bdbb6c0808b"
api_instance = nucleus_api.BusinessApi(nucleus_api.ApiClient(configuration))
    # Retrieve a Business
business_id = "4a39d289-f7e2-46b2-bd28-0938f92e1d63" # str | UUID business_id

try:
    # Retrieve a business
    api_response = api_instance.get_business_using_get(business_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BusinessApi->get_business_using_get: %s\n" % e)
BusinessApi apiInstance = new BusinessApi();
//Get a Business
try {
    Business response1 = apiInstance.getBusinessUsingGet(UUID.fromString("4a39d289-f7e2-46b2-bd28-0938f92e1d63"));
    System.out.println(response1);
} catch (ApiException e) {
    System.err.println("Exception when calling getBusinessUsingGet");
    e.printStackTrace();
}
$apiInstance = new com\hydrogen\nucleus\Api\BusinessApi(
    new GuzzleHttp\Client(),
    $config);
//Retrieve a Business
$business_id = "4a39d289-f7e2-46b2-bd28-0938f92e1d63"; // string | UUID business_id

try {
    $result = $apiInstance->getBusinessUsingGet($business_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BusinessApi->getBusinessUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BusinessApi.new
#Retrieve All Business
business_id = '4a39d289-f7e2-46b2-bd28-0938f92e1d63' # String | UUID business_id

begin
  #Retrieve a business
  result = api_instance.get_business_using_get(business_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling BusinessApi->get_business_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BusinessApi();
//Retrieve a Business
var businessId = "79c00351-ede2-44e3-8aeb-b7871e6f391c"; // String | UUID business_id


var business = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBusinessUsingGet(businessId, business);

Example Response

{
    "id": "b0c59dc7-00d3-49e6-b7c4-6bdbb6c0808b",
    "legal_name": "Pacocha and Sons",
    "dba_name": null,
    "legal_structure": "LLC",
    "category": null,
    "subcategory": null,
    "identification_number": "*** omitted ***",
    "identification_number_type": "EIN",
    "incorporation_date": null,
    "incorporation_country": null,
    "incorporation_state": null,
    "email": null,
    "phone_number": null,
    "website": null,
    "address": [
        {
            "address_line1": "0303 Heidi Freeway",
            "address_line2": null,
            "type": "registered",
            "is_primary": false,
            "city": "Karsonburgh",
            "state": "NY",
            "postalcode": "98559",
            "country": "US"
        }
    ],
    "ownership": [
        {
            "client_id": "714e8854-45ac-427e-a05d-d784bfc27f87",
            "role": "President",
            "percent_ownership": null,
            "is_beneficial": false,
            "is_primary": true
        },
        {
            "client_id": "02245dc8-7f43-45cd-882f-0c16961128eb",
            "role": "Vice-President",
            "percent_ownership": null,
            "is_beneficial": true,
            "is_primary": false
        }
    ],
    "is_public": null,
    "ticker": null,
    "status": null,
    "is_verified": true,
    "is_active": true,
    "metadata":{},
    "secondary_id": null,
    "create_date": "2020-12-16T09:13:51.697+0000",
    "update_date": "2020-12-16T09:22:08.170+0000"
}

HTTP REQUEST

GET /business/{business_id}

Update a business

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
                "website": "http://pacochaandsons.com"
        }' "https://api.hydrogenplatform.com/nucleus/v1/business/11291d9b-fce0-4536-b4be-311f1a35c11f"
api_instance = nucleus_api.BusinessApi(nucleus_api.ApiClient(configuration))
# Update a Business
business = {'legal_name': 'lb'} # object | business
business_id = '17539e3e-232d-4d15-8354-61276b248f1a' # str | UUID business_id

try:
    api_response = api_instance.update_business_using_put(business, business_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BusinessApi->update_business_using_put: %s\n" % e)
BusinessApi apiInstance = new BusinessApi();

//Update a Business
Map map = new HashMap();
map.put("dba_name", "abc");

try {
    Business response = apiInstance.updateBusinessUsingPut(map, UUID.fromString("1125097f-a6a4-4ac9-9be4-a96a2fd48e70"));
    System.out.println(response);
} catch (ApiException e) {
    e.printStackTrace();
}
$apiInstance = new com\hydrogen\nucleus\Api\BusinessApi(
    new GuzzleHttp\Client(),
    $config);
//Update Business
$business = new \stdClass; // object | business
$business->dba_name = "abb1";
$business_id = "4a39d289-f7e2-46b2-bd28-0938f92e1d63"; // string | UUID business_id

try {
    $result = $apiInstance->updateBusinessUsingPut($business, $business_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BusinessApi->updateBusinessUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BusinessApi.new
#Update a Business
business = {"legal_name" => 'CAD'}
business_id = '4a39d289-f7e2-46b2-bd28-0938f92e1d63' # String | UUID business_id


begin
  result = api_instance.update_business_using_put(business, business_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling BusinessApi->update_business_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BusinessApi();
//Update Business
var businessupdates = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var business_id = "79c00351-ede2-44e3-8aeb-b7871e6f391c";
const updateBusiness = () => {
    var api = new HydrogenNucleusApi.BusinessApi()
    var updateBusiness = new HydrogenNucleusApi.Business(); // {AccountAllocationMapping} allocRequest
    updateBusiness.dba_name = "ABC";
    // api.getAllAdminClientUsingGet({}, callback);
    apiInstance.updateBusinessUsingPut(updateBusiness, business_id, businessupdates);

Example Response

{
    "id": "b0c59dc7-00d3-49e6-b7c4-6bdbb6c0808b",
    "legal_name": "Pacocha and Sons",
    "dba_name": null,
    "legal_structure": "LLC",
    "category": null,
    "subcategory": null,
    "identification_number": "*** omitted ***",
    "identification_number_type": "EIN",
    "incorporation_date": null,
    "incorporation_country": null,
    "incorporation_state": null,
    "email": null,
    "phone_number": null,
    "website": "http://pacochaandsons.com",
    "address": [
        {
            "address_line1": "0303 Heidi Freeway",
            "address_line2": null,
            "type": "registered",
            "is_primary": false,
            "city": "Karsonburgh",
            "state": "NY",
            "postalcode": "98559",
            "country": "US"
        }
    ],
    "ownership": [
        {
            "client_id": "714e8854-45ac-427e-a05d-d784bfc27f87",
            "role": "President",
            "percent_ownership": null,
            "is_beneficial": false,
            "is_primary": true
        },
        {
            "client_id": "02245dc8-7f43-45cd-882f-0c16961128eb",
            "role": "Vice-President",
            "percent_ownership": null,
            "is_beneficial": true,
            "is_primary": false
        }
    ],
    "is_public": null,
    "ticker": null,
    "status": null,
    "is_verified": true,
    "is_active": true,
    "metadata":{},
    "secondary_id": null,
    "create_date": "2020-12-16T09:13:51.697+0000",
    "update_date": "2020-12-16T09:22:08.170+0000"
}

Update the information for a business registered with your tenant. The unique business_id must be provided. To obtain the appropriate business_id, use the GET /business endpoint to view all available business_ids registered with your tenant and their current information. The details to be updated must also be provided. The endpoint returns the business_id and the details for the business. If you wish to have the business be no longer available for further activity without permanently deleting it, use this endpoint to mark a business as inactive by changing the is_active field to false.

HTTP REQUEST

PUT /business/{business_id}

Delete a business

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/business/11291d9b-fce0-4536-b4be-311f1a35c11f"
api_instance = nucleus_api.BusinessApi(nucleus_api.ApiClient(configuration))
#Delete Business
business_id = '17539e3e-232d-4d15-8354-61276b248f1a' # str | UUID business_id

try:
    # Delete a business
    api_instance.delete_business_using_delete(business_id)
except ApiException as e:
    print("Exception when calling BusinessApi->delete_business_using_delete: %s\n" % e)
BusinessApi apiInstance = new BusinessApi();
//Delete a Business
try {
    Business responseDelete = apiInstance.deleteBusinessUsingDelete(UUID.fromString("74788497-df70-4883-a8e3-44d004e88e6a"));
    System.out.println(responseDelete);
} catch (ApiException e) {
    System.err.println("Exception when calling deleteBusinessUsingDelete");
    e.printStackTrace();
}
$apiInstance = new com\hydrogen\nucleus\Api\BusinessApi(
    new GuzzleHttp\Client(),
    $config);
//Delete Business
$business_id = "4a39d289-f7e2-46b2-bd28-0938f92e1d63"; // string | UUID business_id

try {
    $apiInstance->deleteBusinessUsingDelete($business_id);
} catch (Exception $e) {
    echo 'Exception when calling BusinessApi->deleteBusinessUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BusinessApi.new

#Delete a Business
business_id = '4a39d289-f7e2-46b2-bd28-0938f92e1d63' # String | UUID business_id


begin
  api_instance.delete_business_using_delete(business_id)
rescue NucleusApi::ApiError => e
  puts "Exception when calling BusinessApi->delete_business_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BusinessApi();
//Delete Business
var businessId = "8ad07e2c-d2ec-4ee1-b07d-6fb5dbdc4bc0"; // String | UUID business_id


var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deleteBusinessUsingDelete(businessId, callback);

Response (204 No Content)

Permanently delete a business registered with your tenant. The unique business_id must be provided. To obtain the appropriate business_id, use the GET /business endpoint to view all available business_ids registered with your tenant. This deletes the business_id and all the business information associated with it. To prevent a business_id from being used for further activity without permanently deleting it, you can use the PUT /business/{business_id} endpoint to mark a business as inactive by changing the is_active field to false.

HTTP REQUEST

DELETE /business/{business_id}

Business Activity

List all business asset sizes

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/business/099961da-7f41-4309-950f-2b51689a0033/asset_size"
api_instance = nucleus_api.BusinessApi(nucleus_api.ApiClient(configuration))
#Get Business Asset Size
business_id = '17539e3e-232d-4d15-8354-61276b248f1a' # str | UUID business_id
currency_conversion = 'USD'# str | Currency Code (optional)
end_date = 'null' # date | end date (optional) (default to null)
exclude_subledger = False # bool | exclude_subledger (optional) (default to false)
get_latest = False # bool | true or false (optional)
sort_type = 'null' # str |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in () (optional)
start_date = 'null' # date | start date (optional) (default to null)

try:
    # List all business asset sizes
    api_response = api_instance.get_business_asset_size_using_get(business_id, currency_conversion=currency_conversion, end_date=end_date, exclude_subledger=exclude_subledger, get_latest=get_latest, sort_type=sort_type, start_date=start_date)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BusinessApi->get_business_asset_size_using_get: %s\n" % e)
BusinessApi apiInstance = new BusinessApi();
//Get Business AssetSize
try {
    List<AvailableDateDoubleVO> result = apiInstance.getBusinessAssetSizeUsingGet(UUID.fromString("4a39d289-f7e2-46b2-bd28-0938f92e1d63"), null, enddate, true, false, null, startdate);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling getBusinessAssetSizeUsingGet");
    e.printStackTrace();
}
$apiInstance = new com\hydrogen\nucleus\Api\BusinessApi(
    new GuzzleHttp\Client(),
    $config);
//Get Business AssetSize
$business_id = "4a39d289-f7e2-46b2-bd28-0938f92e1d63"; // string | UUID business_id
$currency_conversion = null; // string | Currency Code
$end_date = new \DateTime("2020-10-18"); // \DateTime | end date
$exclude_subledger = true; // bool | exclude_subledger
$get_latest = false; // bool | true or false
$sort_type = null; // string | Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
$start_date = new \DateTime("2020-10-10"); // \DateTime | start date

try {
    $result = $apiInstance->getBusinessAssetSizeUsingGet($business_id, $currency_conversion, $end_date, $exclude_subledger, $get_latest, $sort_type, $start_date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BusinessApi->getBusinessAssetSizeUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BusinessApi.new
#Get Asset Size
business_id = 'business_id_example' # String | UUID business_id

opts = {
    currency_conversion: '4a39d289-f7e2-46b2-bd28-0938f92e1d63', # String | Currency Code
    end_date: Date.parse('2020-12-12'), # Date | end date
    exclude_subledger: false, # BOOLEAN | exclude_subledger
    get_latest: true, # BOOLEAN | true or false
    sort_type: nil, # String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    start_date: Date.parse('2020-10-12') # Date | start date
}

begin
  #List all business asset sizes
  result = api_instance.get_business_asset_size_using_get(business_id, opts)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling BusinessApi->get_business_asset_size_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BusinessApi();
//Get Business AssetSize
var businessId = "8ad07e2c-d2ec-4ee1-b07d-6fb5dbdc4bc0"; // String | UUID business_id

var opts = {
    'currencyConversion': null, // String | Currency Code
    'endDate': new Date(2020-12-26), // Date | end date
    'excludeSubledger': false, // Boolean | exclude_subledger
    'getLatest': true, // Boolean | true or false
    'sortType': null, // String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    'startDate': new Date(2020-10-18) // Date | start date
};

var asset = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBusinessAssetSizeUsingGet(businessId, opts, asset);

Example Response

[
    {
        "date": "2018-02-03",
        "currency_code": "USD",
        "value": 20000,
        "value_available": null,
        "value_pending": null,
        "cash_flow": 0
    },
    {
        "date": "2018-02-04",
        "currency_code": "USD",
        "value": 24500,
        "value_available": null,
        "value_pending": null,
        "cash_flow": 500
    }
]

Get a list of asset sizes per date for a business. Asset size records are created at the portfolio level and aggregated to yield the client asset size(s). The unique business_id must be provided. To obtain the appropriate business_id, use the GET /business endpoint to view all available business_ids registered with your tenant. The endpoint returns a list of asset sizes by date for the business. Additional parameters available to narrow down what is returned include: a date range, only obtaining the latest record, and sorting by different units of time (e.g. annually, quarterly, monthly, daily), etc.

HTTP REQUEST

GET /business/{business_id}/asset_size

ARGUMENTS

Parameter Type Required Description
get_latest boolean optional Retrieve only the latest asset size. Defaults to false if not set
sort_type string optional Sort the asset sizes by D Daily, M Monthly, Q Quarterly, Y Yearly. Defaults to D Daily if not set. Must be capital letters
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
exclude_subledger boolean optional If set to “true”, excludes portfolios under accounts where is_subledger = “true” to not double count assets of subaccounts. Defaults to “false” which includes all portfolios under an account.
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
date date Date for the asset size record. Displays the latest record if more than one entry exists for the given date.
currency_code string Alphabetic currency code for the asset size. See currency codes
value double Monetary value of all the business’ accounts on the particular date
value_available double Available monetary value of the business on the particular date
value_pending double Pending monetary value of the business on the particular date
cash_flow double Amount added to the client’s accounts or withdrawn from the accounts since the last asset size date. Value is used for performance calculations. Value may be positive or negative.

List all business transactions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/business/099961da-7f41-4309-950f-2b51689a0033/transaction"
api_instance = nucleus_api.BusinessApi(nucleus_api.ApiClient(configuration))
#Get Business Transaction
business_id = '17539e3e-232d-4d15-8354-61276b248f1a' # str | UUID business_id
ascending = False # bool | ascending (optional) (default to false)
currency_conversion = 'USD' # str | currency_conversion (optional)
end_date = '2020-12-10' # str | end date - yyyy-mm-dd (optional)
order_by = 'null' # str | order_by (optional) (default to update_date)
page = 0 # int | page (optional) (default to 0)
size = 25 # int | size (optional) (default to 25)
start_date = '2020-10-12' # str | start date - yyyy-mm-dd (optional)

try:
    # List all business transactions
    api_response = api_instance.get_business_client_transaction_all_using_get(business_id, ascending=ascending, currency_conversion=currency_conversion, end_date=end_date, order_by=order_by, page=page, size=size, start_date=start_date)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BusinessApi->get_business_client_transaction_all_using_get: %s\n" % e)
BusinessApi apiInstance = new BusinessApi();

//Get Business Transaction
try {
    PagePortfolioTransaction result2 = apiInstance.getBusinessClientTransactionAllUsingGet(UUID.fromString("4a39d289-f7e2-46b2-bd28-0938f92e1d63"), true, null, "2020-04-07", null, null, 0, 10, "2020-08-10");
    System.out.println(result2);
} catch (ApiException e) {
    System.err.println("Exception when calling getBusinessClientTransactionAllUsingGet");
    e.printStackTrace();
}
$apiInstance = new com\hydrogen\nucleus\Api\BusinessApi(
    new GuzzleHttp\Client(),
    $config);
//Get Business Transaction
$business_id = "4a39d289-f7e2-46b2-bd28-0938f92e1d63"; // string | UUID business_id
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$end_date = "2020-11-16"; // string | end date - yyyy-mm-dd
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 25; // int | size
$start_date = "2020-10-15"; // string | start date - yyyy-mm-dd

try {
    $result = $apiInstance->getBusinessClientTransactionAllUsingGet($business_id, $ascending, $currency_conversion, $end_date, $order_by, $page, $size, $start_date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BusinessApi->getBusinessClientTransactionAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BusinessApi.new
#Get Transactions
business_id = '4a39d289-f7e2-46b2-bd28-0938f92e1d63' # String | UUID business_id

opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: nil, # String | currency_conversion
    end_date: '2020-12-12', # String | end date - yyyy-mm-dd
    order_by: nil, # String | order_by
    page: 0, # Integer | page
    size: 25, # Integer | size
    start_date: '2020-10-14' # String | start date - yyyy-mm-dd
}

begin
  #List all business transactions
  result = api_instance.get_business_client_transaction_all_using_get(business_id, opts)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling BusinessApi->get_business_client_transaction_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BusinessApi();
//Get Client Transaction
var businessId = "8ad07e2c-d2ec-4ee1-b07d-6fb5dbdc4bc0"; // String | UUID business_id

var opts = {
    'ascending': false, // Boolean | ascending
    'currencyConversion': null, // String | currency_conversion
    'endDate': "2020-12-10", // String | end date - yyyy-mm-dd
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 25, // Number | size
    'startDate': "2020-10-10" // String | start date - yyyy-mm-dd
};

var transaction = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBusinessClientTransactionAllUsingGet(businessId, opts, transaction);

Example Response

{
  "content": [
    {
            "id": "efa289b2-3565-42e6-850b-8dad25727e99",
            "date": "2018-01-31T00:00:00.000+0000",
            "date_available": null,
            "is_recurring": false,
            "is_cleansed": false,
            "is_disputed": false,
            "is_read": true,
            "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
            "model_id": "6dbadddc-41ff-4634-a145-16678b422557",
            "price": 200,
            "quantity": 2,
            "currency_code": null,
            "amount": null,
            "balance": null,
            "merchant_id": null,
            "mid": null,
            "merchant": null,
            "merchant_category_code": null,
            "category": null,
            "subcategory": null,
            "description": null,
            "memo": null,
            "status": null,
            "location": {},
            "check": {},
            "funding_id": null,
            "security_id": "691c2255-a1a6-451f-b772-cb262725d7e2",
            "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
            "create_date": "2018-02-07T19:29:37.000+0000",
            "update_date": "2018-02-012T09:00:00.000+0000"
    },
    {
            "id": "efa289b2-3565-42e6-850b-8dad25727e24",
            "date": "2018-01-31T00:00:00.000+0000",
            "date_available": null,
            "is_recurring": false,
            "is_cleansed": false,
            "is_disputed": false,
            "is_read": true,
            "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
            "model_id": "6dbadddc-41ff-4634-a145-16678b422557",
            "price": 1000,
            "quantity": 6,
            "currency_code": null,
            "amount": null,
            "balance": null,
            "merchant_id": null,
            "mid": null,
            "merchant": null,
            "merchant_category_code": null,
            "category": null,
            "subcategory": null,
            "description": null,
            "memo": null,
            "status": null,
            "location": {},
            "check": {},
            "funding_id": null,
            "security_id": "0d652520-7e6a-461d-abe8-56b956c08d2e",
            "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
            "create_date": "2017-08-02T04:30:25.000+0000",
            "update_date": "2017-11-18T09:00:00.000+0000"
    }
  ],
    "total_pages": 1,
    "total_elements": 2,
    "last": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "id",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 2,
    "size": 25,
    "number": 2
}

Get the information for all transactions under a business. Transaction records are created at a portfolio level and all transactions for each portfolio below the business account(s) are returned to show the business transaction activity. The unique business_id must be provided. To obtain the appropriate business_id, use the GET /business endpoint to view all available business_ids registered with your tenant. The endpoint returns a list of transaction_ids and details for each transaction.

HTTP REQUEST

GET /business/{business_id}/transaction

ARGUMENTS

Parameter Type Required Description
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
currency_conversion string Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
id UUID The id for the transaction record
date timestamp Timestamp when the transaction occurred
date_available timestamp Timestamp when the transaction becomes available
is_cleansed boolean Indicates if the transaction has been cleansed by a data cleansing engine. Defaults to false which indicates that it has not been cleansed
is_read boolean Indicates if the transaction has been read. Defaults to false which indicates that it has not been read
is_recurring boolean Indicates if the transaction is recurring such as a subscription. Defaults to false which indicates that it is not recurring
is_disputed boolean Indicates if the transaction is disputed by the client. Defaults to false which indicates that it is not disputed
portfolio_id UUID The id of the portfolio that the transaction record relates to
funding_id UUID The id of the funding request that the transaction record relates to
model_id UUID The id of the model to which the portfolio that the transaction falls under subscribes
price integer Price for the security included in the transaction at which it was sold or purchased
quantity integer Quantity of shares of the security purchased
currency_code string Alphabetic currency code for the amount. See currency codes
amount double Amount of the transaction
balance double Updated balance of the portfolio as a result of the transaction
merchant_id UUID ID of the merchant resource for the transaction
mid string Acquirer ID of the merchant (MID) for the transaction
merchant string The merchant for the transaction such as the merchant posted for a credit or debit card charge
merchant_category_code string The MCC Code for the merchant as identified by the card network
category string Category of the transaction
subcategory string Subcategory of the transaction
description string Description of the transaction
memo string Memo attached to the transaction
status string Status of the transaction
location map Location where the transaction occurred
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      latitude double Latitude of the location where the transaction occurred
      longitude double Longitude of the location where the transaction occurred
check map Check associated with the banking transaction
      check_number string Number on the check such as “1234”
      check_amount double Monetary amount of the check
      check_images map Image(s) of the scanned check(s)
            image_url string URL where the image can be displayed
            image_type string Type of image for the check such as “png” or “jpeg”
security_id UUID The id of the security included in the transaction
transaction_code_id integer The id referring to the transaction codes defined by your business
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

Client

Clients represent users within your tenant, and are used throughout the Hydrogen platform. For example, accounts, cards, budgets are all created below clients.

Field Type Description
id UUID The id of the client
username string Username for the client used on the firm’s platform
password string User’s unique password for the application if stored with Hydrogen. All passwords should be passed as plain text and will be hashed and salted for storage using the Bcrypt algorithm. This field will not return in any responses.
authorities array The role(s) for the user. If not supplied, default is ROLE_CLIENT. Available values are ROLE_SUPER_ADMIN, ROLE_ADMIN, ROLE_PORTFOLIO_MANAGER, ROLE_MARKETING_MANAGER, ROLE_OPERATIONS, ROLE_SUPPORT, ROLE_BUSINESS_OWNER, ROLE_ADVISOR, ROLE_CLIENT. Comma separate if multiple roles exist for a user (e.g. “ROLE_ADMIN, ROLE_ADVISOR”). Please view the Authorities resource for more information on each role. To view what endpoints each role permissions, please see this guide
client_type string Defined client type for the client. Available client types are individual, firm, admin, business_owner, employee and advisor, all case sensitive
email string Contact email for the client in the format sample@example.com
business_id UUID If the client belongs to a specific Business, either as an owner or employee, the id of the business
firm_name string Company name if the client_type = “firm”. Use this field if the client and the business are one in the same, usually for a sole proprietor or small business.
firm_type string Company type such as Sole-Proprietor or LLP if the client_type = “firm”
title string The title of the client such as “Mr.”, “Ms.”, “Miss”, “Mrs.”, etc.
first_name string First name or given name of the client
middle_name string Middle name of the client
last_name string Last name or surname of the client
suffix string Suffix of the client such as “Jr.” or “Sr.”
phone_number string Phone number associated with the client
date_of_birth date Date of birth of the client in the ISO 8601 format YYYY-MM-DD. Returns as omitted in all API responses for security.
identification_number string National identification number for a client such as an SSN in the US, frequently used for Know-Your-Customer (KYC) purposes. Returns as omitted in all API responses for security.
identification_number_type string Type of national identification number for a client such as an SSN, TIN, or EIN in the US
country_of_residence string The country of residence of a client, often corresponding to the country issuing the identification number provided above using the ISO ALPHA-2 Code, frequently used for Know-Your-Customer (KYC) purposes. See country codes
country_of_citizenship array The country or countries of citizenship of a client, often corresponding to the country issuing the identification number provided above using the ISO ALPHA-2 Code, frequently used for Know-Your-Customer (KYC). See country codes
citizenship_status string The client’s citizenship status such as “Citizen” or “Resident Alien” in the US
gender string The client’s gender. Available values are female, male, and other.
employment map Employment details for the client
      employment_status string Status of employment. Value may be employed, unemployed, student, retired, self_employed
      job_title string Job title of client such as “Analyst” or “Associate”
      employer string Name of employer such as “Apple” or “Walmart”
      occupation string Occupation of client such as “Medical Services” or “Education”
income integer Annual income for the client
total_net_worth integer Total net worth of the client including the value of their home(s) and any cash and non cash holdings
liquid_net_worth integer Net worth of the client that can easily be converted to cash (cash, stocks, bonds, money market funds, CDs) excluding the value of their home(s) and retirement accounts
is_verified boolean Indicates if the identifying details provided by the client have been verified by a Know-Your-Customer (KYC) vendor. Defaults to false which indicates it is not verified
hydro_id string The Hydro ID associated with the client (if applicable). Corresponds to the Client Hydro entity
address map Address details for the client
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      type string Type of address such as “home”, “work”, “billing”, “mailing”, etc. This is used to differentiate between multiple addresses provided
      is_primary boolean Indicates if the address is the primary address for a client. Only one address may be primary for a client_id. If a user sets an address to is_primary = “true” then all other addresses for that client_id will be set to is_primary = “false.” Defaults to false which indicates the address is not primary
status string Status of the client such as “Registered” or “Active”
is_active boolean Indicates if the client is currently active. Defaults to true which indicates it is active
group array Group clients together with your own identifier such as their subscription plan, for use with spending controls and rewards
metadata map Custom information associated with the client in the format key:value. See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

Client Management

List all clients

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/client"
api_instance = nucleus_api.ClientApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_client_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_client_all_using_get: %s\n" % e)
ClientApi apiInstance = new ClientApi();
        try {
            PageClient List = apiInstance.getClientAllUsingGet(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getClientAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\ClientApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $clientlist = $apiInstance->getClientAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($clientlist);
} catch (Exception $e) {
    echo 'Exception when calling ClientApi->getClientAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::ClientApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  clientlsit = api_instance.get_client_all_using_get(opts)
  p clientlsit
rescue NucleusApi::ApiError => e
  puts "Exception when calling ClientApi->get_client_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.ClientApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var clientList = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getClientAllUsingGet(opts, clientList)

Example Response

{
    "content": [
        {
            "id": "8e1799f0-4429-4939-ae84-7391cff93ba5",
            "create_date": "2019-10-09T20:51:14.000+0000",
            "update_date": "2019-10-09T20:51:14.000+0000",
            "email": "jimhalpert@email.com",
            "business_id":null,
            "firm_name": null,
            "firm_type": null,
            "title": "Mr.",
            "first_name": "Jim",
            "last_name": "Halpert",
            "suffix": null,
            "date_of_birth": "**omitted**",
            "identification_number": "**omitted**",
            "identification_number_type": "SSN",
            "phone_number": "987-765-1244",
            "username": "jimhalpert@email.com",
            "client_type": "individual",
            "address": [],
            "hydro_id": null,
            "country_of_residence": "US",
            "country_of_citizenship": ["US"],
            "citizenship_status": null,
            "employment": {},
            "income": null,
            "gender": "male",
            "total_net_worth": null,
            "liquid_net_worth": null,
            "is_verified": false,
            "status": null,
            "is_active": true,
            "group": null,
            "metadata": {},
            "authorities": ["ROLE_CLIENT"]
        },
        {
            "id": "8fc301c0-50ef-4803-bb0c-b1dc57ffc85a",
            "create_date": "2019-10-09T20:50:13.000+0000",
            "update_date": "2019-10-09T20:50:13.000+0000",
            "email": "jim@email.com",
            "business_id":null,
            "firm_name": null,
            "firm_type": null,
            "title": "Mr.",
            "first_name": "Jim",
            "last_name": "Halpert",
            "suffix": null,
            "date_of_birth": "**omitted**",
            "identification_number": "**omitted**",
            "identification_number_type": "SSN",
            "phone_number": "987-765-1244",
            "username": "jim@email.com",
            "client_type": "individual",
            "address": [],
            "hydro_id": null,
            "country_of_residence": "US",
            "country_of_citizenship": ["US"],
            "citizenship_status": null,
            "employment": {},
            "income": null,
            "gender": "male",
            "total_net_worth": null,
            "liquid_net_worth": null,
            "is_verified": false,
            "status": null,
            "is_active": true,
            "group": null,
            "metadata": {
                "median_household_income": "10000"
            },
            "authorities": ["ROLE_CLIENT"]
        },
        {
            "id": "bb8394ca-84bd-4679-ac3e-874edeef15cf",
            "create_date": "2019-10-04T15:37:31.000+0000",
            "update_date": "2019-10-04T15:37:31.000+0000",
            "business_id":null,
            "firm_name": null,
            "firm_type": null,
            "title": "Mr.",
            "first_name": "John",
            "middle_name": "Henry",
            "last_name": "Smith",
            "suffix": null,
            "date_of_birth": "**omitted**",
            "identification_number": "**omitted**",
            "identification_number_type": "SSN",
            "phone_number": null,
            "username": "johnhenry@test.com",
            "client_type": "individual",
            "address": [],
            "hydro_id": null,
            "country_of_residence": "US",
            "country_of_citizenship": ["US"],
            "citizenship_status": null,
            "employment": {},
            "income": null,
            "gender": "male",
            "total_net_worth": null,
            "liquid_net_worth": null,
            "is_verified": false,
            "status": null,
            "is_active": true,
            "group": null,
            "metadata": {},
            "authorities": ["ROLE_CLIENT"]
        }
    ],
    "total_pages": 1,
    "total_elements": 3,
    "last": false,
    "number_of_elements": 25,
    "first": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "size": 25,
    "number": 0
}

Get details for all clients registered with your tenant. Note that the address information and the metadata information are nested objects within the client object.

HTTP REQUEST

GET /client

Create a client

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
          "email": "angelamartin@email.com",
          "username": "angelamartin@email.com",
          "client_type": "individual",
          "title": "Mrs.",
          "first_name": "Angela",
          "last_name": "Martin",
          "phone_number": "987-765-1244",
          "date_of_birth": "1971-12-27",
          "identification_number_type": "SSN",
          "country_of_residence": "US",
          "country_of_citizenship": ["US"],
          "gender": "female",
          "is_verified": true,
          "is_active": true,
          "metadata": {
            "median_household_income": "10000"
          }
      }' "https://api.hydrogenplatform.com/nucleus/v1/client"
api_instance = nucleus_api.ClientApi(nucleus_api.ApiClient(configuration))
# # Create a Client
client_new = nucleus_api.Client(first_name="Jack", last_name="Mason", email="jmason@email.com", username="jmason1", client_type="individual")
try:
    api_response = api_instance.create_client_using_post(client_new)
    pprint(api_response)
except ApiException as e:
    print("create_client_using_post: %s\n" % e)
ClientApi apiInstance = new ClientApi();
        //Create a Client
        Client createclient = new Client();
        createclient.setFirstName("Onestar");
        createclient.setLastName("One");
        createclient.setEmail("abc@email.com");
        createclient.setUsername("tre6656yte");
        createclient.setClientType("individual");

                try {
            Client result = apiInstance.createClientUsingPost(createclient);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createClientUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\ClientApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
//Create Client
$client = new \com\hydrogen\nucleus\Model\Client();

try {
    $client->setFirstName("Mack");
    $client->setLastName("Donald");
    $client->setEmail("abc@email.com");
    $client->setUsername("555g5");
    $client->setClientType("individual");
    $result = $apiInstance->createClientUsingPost($client);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createClientUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::ClientApi.new
#Create Client
client = NucleusApi::Client.new

begin
  client.first_name = "Andy"
  client.last_name = "Bick"
  client.email = "any@email.com"
  client.username = "6546545"
  client.client_type = "individual"
  result = api_instance.create_client_using_post(client)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_client_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.ClientApi();
//Create Client
var client = new HydrogenNucleusApi.Client();
client.first_name = "Andy";
client.last_name = "murray";
client.username = "fgdfd4";
client.email = "amu@email.com";
client.client_type = "individual";



var newcllient = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createClientUsingPost(client, newcllient)

Example Response

{
    "id": "11291d9b-fce0-4536-b4be-311f1a35c11f",
    "create_date": "2019-10-10T12:41:18.768+0000",
    "update_date": "2019-10-10T12:41:18.768+0000",
    "email": "angelamartin@email.com",
    "business_id":null,
    "firm_name": null,
    "firm_type": null,
    "title": "Mrs.",
    "first_name": "Angela",
    "last_name": "Martin",
    "suffix": null,
    "date_of_birth": "**omitted**",
    "identification_number": "**omitted**",
    "identification_number_type": "SSN",
    "phone_number": "987-765-1244",
    "username": "angelamartin@email.com",
    "password": null,
    "client_type": "individual",
    "address": [],
    "hydro_id": null,
    "country_of_residence": "US",
    "country_of_citizenship": ["US"],
    "citizenship_status": null,
    "gender": "female",
    "employment": {},
    "income": null,
    "total_net_worth": null,
    "liquid_net_worth": null,
    "is_verified": true,
    "status": null,
    "is_active": true,
    "group": null,
    "metadata": {
        "median_household_income": "10000"
    },
    "authorities": ["ROLE_CLIENT"]
}

Create a new client, or register a new user, with your tenant. The create_date will default to the current date. The endpoint returns a unique client_id that is used to manage the specific client and referenced in other endpoints.

HTTP REQUEST

POST /client

ARGUMENTS

Parameter Type Required Description
username string required Username for the client used on the firm’s platform
client_type string required Defined client type for the client. Available client types are individual, firm, admin, and advisor, all case sensitive
password string optional User’s unique password for the application if stored with Hydrogen. All passwords should be passed as plain text and will be hashed and salted for storage using the Bcrypt algorithm. This field will not return in any responses.
authorities array optional The role(s) for the user. If not supplied, default is ROLE_CLIENT. Available values are ROLE_SUPER_ADMIN, ROLE_ADMIN, ROLE_PORTFOLIO_MANAGER, ROLE_MARKETING_MANAGER, ROLE_OPERATIONS, ROLE_SUPPORT, ROLE_BUSINESS_OWNER, ROLE_ADVISOR, ROLE_CLIENT. Comma separate if multiple roles exist for a user (e.g. “ROLE_ADMIN, ROLE_ADVISOR”). Please view the Authorities resource for more information on each role. To view what endpoints each role permissions, please see this guide
email string optional Contact email for the client in the format sample@example.com
business_id UUID optional If the client belongs to a specific Business, either as an owner or employee, the id of the business
firm_name string optional Company name if the client_type = “firm”. Use this field if the client and the business are one in the same, usually for a sole proprietor or small business.
firm_type string optional Company type such as C-Corp or LLC if the client_type = “firm”
title string optional The title of the client such as “Mr.”, “Ms.”, “Miss”, “Mrs.”, etc.
first_name string optional First name or given name of the client
middle_name string optional Middle name of the client
last_name string optional Last name or surname of the client
suffix string optional Suffix of the client such as “Jr.” or “Sr.”
phone_number string optional Phone number associated with the client
date_of_birth date optional Date of birth of the client in the ISO 8601 format YYYY-MM-DD. Returns as omitted in all API responses for security.
identification_number string optional National identification number for a client such as an SSN in the US, frequently used for Know-Your-Customer (KYC) purposes. Returns as omitted in all API responses for security.
identification_number_type string optional Type of national identification number for a client such as an SSN, TIN, or EIN in the US
country_of_residence string optional The country of residence of a client, often corresponding to the country issuing the identification number provided above using the ISO ALPHA-2 Code, frequently used for Know-Your-Customer (KYC) purposes. See country codes
country_of_citizenship array optional The country or countries of citizenship of a client, often corresponding to the country issuing the identification number provided above using the ISO ALPHA-2 Code, frequently used for Know-Your-Customer (KYC). See country codes
citizenship_status string optional The client’s citizenship status such as “Citizen” or “Resident Alien” in the US
gender string optional The client’s gender. Available values are female, male, and other.
employment map optional Employment details for the client
      employment_status string optional Status of employment. Value may be employed, unemployed, student, retired, self_employed
      job_title string optional Job title of client such as “Analyst” or “Associate”
      employer string optional Name of employer such as “Apple” or “Walmart”
      occupation string optional Occupation of client such as “Medical Services” or “Education”
income integer optional The total income for the client
total_net_worth integer optional Total net worth of the client including the value of their home(s) and any cash and non cash holdings
liquid_net_worth integer optional Net worth of the client that can easily be converted to cash (cash, stocks, bonds, money market funds, CDs) excluding the value of their home(s) and retirement accounts
is_verified boolean optional Indicates if the identifying details provided by the client have been verified by a Know-Your-Customer (KYC) vendor. Defaults to false which indicates it is not verified
hydro_id string optional The Hydro ID associated with the client (if applicable). Corresponds to the Client Hydro entity
address map optional Address details for the client
      address_line1 string required Primary information for the street address, such as the street and building number
      address_line2 string optional Secondary information for the street address, such as a suite or apartment number
      city string required City for the address
      state string required State, province, or sub-country region for the address
      postalcode string optional Alphanumeric postal code or zip code for the address
      country string required Country for the address using the ISO ALPHA-2 Code. See country codes
      type string required Type of address such as “home”, “work”, “billing”, “mailing”, etc. This is used to differentiate between multiple addresses provided
      is_primary boolean optional Indicates if the address is the primary address for a client. Only one address may be primary for a client_id. If a user sets an address to is_primary = “true” then all other addresses for that client_id will be set to is_primary = “false.” Defaults to false which indicates the address is not primary
status string optional Status of the client such as “Registered” or “Active”
is_active boolean optional Indicates if the client is currently active. Defaults to true which indicates it is active
group array optional Group clients together with your own identifier such as their subscription plan, for use with spending controls and rewards
metadata map optional Custom information associated with the client in the format key:value.
See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a client

Retrieve the information for a client registered with your tenant. The unique client_id must be provided. The endpoint returns the client_id and the details for the client. Note that the address information and the metadata information are nested objects within the client object.

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/client/11291d9b-fce0-4536-b4be-311f1a35c11f"
api_instance = nucleus_api.ClientApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_client_using_get("474c590d-7ecf-4eab-9bd6-781096ad1621")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_client_using_get: %s\n" % e)
ClientApi apiInstance = new ClientApi();
        try {
            Client responseClient = apiInstance.getClientUsingGet(UUID.fromString("489a13a9-aab1-42d9-a84f-1ab0d95c919c"));
            System.out.println(responseClient);
        } catch (ApiException e) {
            System.err.println("Exception when calling getClientUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\ClientApi(
    new GuzzleHttp\Client(),
    $config);
$client_id = "489a13a9-aab1-42d9-a84f-1ab0d95c919c"; // string | UUID client_id

try {
    $client = $apiInstance->getClientUsingGet($client_id);
    print_r($client);
} catch (Exception $e) {
    echo 'Exception when calling ClientApi->getClientUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::ClientApi.new
client_id = '489a13a9-aab1-42d9-a84f-1ab0d95c919c' # String | UUID client_id

begin
  client = api_instance.get_client_using_get(client_id)
  p client
rescue NucleusApi::ApiError => e
  puts "Exception when calling ClientApi->get_client_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.ClientApi();
var clientId = "8dccec61-e85f-4a3f-a583-0a4df9ae7bd5";


var client = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getClientUsingGet(clientId, client)

Example Response

{
    "id": "11291d9b-fce0-4536-b4be-311f1a35c11f",
    "create_date": "2019-10-10T12:41:19.000+0000",
    "update_date": "2019-10-10T12:41:19.000+0000",
    "email": "angelamartin@email.com",
    "business_id":null,
    "firm_name": null,
    "firm_type": null,
    "title": "Mrs.",
    "first_name": "Angela",
    "last_name": "Martin",
    "suffix": null,
    "date_of_birth": "**omitted**",
    "identification_number": "**omitted**",
    "identification_number_type": "SSN",
    "phone_number": "987-765-1244",
    "username": "angelamartin@email.com",
    "client_type": "individual",
    "address": [],
    "hydro_id": "10lm4nz",
    "country_of_residence": "US",
    "country_of_citizenship": ["US"],
    "citizenship_status": null,
    "gender": "female",
    "employment": {},
    "income": null,
    "total_net_worth": null,
    "liquid_net_worth": null,
    "is_verified": true,
    "status": null,
    "is_active": true,
    "group": null,
    "metadata": {
        "median_household_income": "10000"
    },
    "authorities": ["ROLE_CLIENT"]
}

HTTP REQUEST

GET /client/{client_id}

Update a client

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
          "email": "angelaschrute@email.com",
          "username": "angelaschrute@email.com",
          "client_type": "individual",
          "title": "Mrs.",
          "first_name": "Angela",
          "last_name": "Schrute",
          "phone_number": "987-765-1244",
          "date_of_birth": "1971-12-27",
          "identification_number_type": "SSN",
          "country_of_residence": "US",
          "gender": "female",
          "is_verified": true,
          "is_active": true,
          "metadata": {
            "median_household_income": "10000"
          },
        }' "https://api.hydrogenplatform.com/nucleus/v1/client/11291d9b-fce0-4536-b4be-311f1a35c11f"
api_instance = nucleus_api.ClientApi(nucleus_api.ApiClient(configuration))
# # #Update Client
client_Update = {'gender': 'male'}
client_id = 'a05271bb-b963-4494-b6a2-b71738d23308'
try:
    api_response = api_instance.update_client_using_put(client_Update, client_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_client_using_put: %s\n" % e)
ClientApi apiInstance = new ClientApi();
        //        //Update Client
        Map map = new HashMap();
        map.put("firm_name", "ABC Corp");

        try {
            Client response = apiInstance.updateClientUsingPut(map, UUID.fromString("35158516-de7f-4955-895d-a3a3de9b21c0"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\ClientApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
//Update Client
$client_update = new stdClass();
$client_id = "d560e3d8-7dbb-4535-9e12-9525fa724af1";

try {
    $client_update->username = "abc44";
    $result = $apiInstance->updateClientUsingPut($client_update, $client_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateClientUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::ClientApi.new
#Update Client
client_update = {"first_name" => 'visa'}
client_id = 'ad4c3086-c3f2-4b41-87fb-06e611c58b76'
begin
  result = api_instance.update_client_using_put(client_update, client_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_client_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.ClientApi();
//Update Client
var apiInstance = new HydrogenNucleusApi.ClientApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var clientupdate = new HydrogenNucleusApi.Card();
var clientid = "6442305d-0b0e-4f51-9c11-b32d7c4811bc";

clientupdate.email = "teri@email.com";
apiInstance.updateClientUsingPut(clientupdate, clientid, callback)

Example Response

{
    "id": "11291d9b-fce0-4536-b4be-311f1a35c11f",
    "create_date": "2019-10-10T12:41:19.000+0000",
    "update_date": "2019-10-10T12:45:33.037+0000",
    "email": "angelaschrute@email.com",
    "business_id":null,
    "firm_name": null,
    "firm_type": null,
    "title": "Mrs.",
    "first_name": "Angela",
    "last_name": "Schrute",
    "suffix": null,
    "date_of_birth": "**omitted**",
    "identification_number": "**omitted**",
    "identification_number_type": "SSN",
    "phone_number": "987-765-1244",
    "username": "angelaschrute@email.com",
    "client_type": "individual",
    "address": [],
    "hydro_id": null,
    "country_of_residence": "US",
    "country_of_citizenship": ["US"],
    "citizenship_status": null,
    "gender": "other",
    "employment": {},
    "income": null,
    "total_net_worth": null,
    "liquid_net_worth": null,
    "is_verified": true,
    "status": null,
    "is_active": true,
    "group": null,
    "metadata": {
        "median_household_income": "10000"
    },
    "authorities": ["ROLE_CLIENT"]
}

Update the information for a client registered with your tenant. The unique client_id must be provided. To obtain the appropriate client_id, use the GET /client endpoint to view all available client_ids registered with your tenant and their current information. The details to be updated must also be provided. The endpoint returns the client_id and the details for the client. If you wish to have the client be no longer available for further activity without permanently deleting it, use this endpoint to mark a client as inactive by changing the is_active field to false.

HTTP REQUEST

PUT /client/{client_id}

Client Activity

List all client asset sizes

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/client/099961da-7f41-4309-950f-2b51689a0033/asset_size"
api_instance = nucleus_api.ClientApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_client_asset_size_using_get("1d987750-3cbd-4720-861c-6fc6ed3d6262")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_client_asset_size_using_get: %s\n" % e)
ClientApi apiInstance = new ClientApi();
        try {
            Object assetsize = apiInstance.getClientAssetSizeUsingGet(UUID.fromString("1d987750-3cbd-4720-861c-6fc6ed3d6262"), null, date2, true, true, null, date1);
            System.out.println(assetsize);
        } catch (ApiException e) {
            System.err.println("Exception when calling getClientAssetSizeUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\ClientApi(
    new GuzzleHttp\Client(),
    $config);
$client_id = "489a13a9-aab1-42d9-a84f-1ab0d95c919c"; // string | UUID client_id
$currency_conversion = null; // string | Currency Code
$end_date = new \DateTime("null"); // \DateTime | end date
$exclude_subledger = false; // bool | exclude_subledger
$get_latest = true; // bool | true or false
$sort_type = null; // string | Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
$start_date = new \DateTime("null"); // \DateTime | start date

try {
    $assetsizeclient = $apiInstance->getClientAssetSizeUsingGet($client_id, $currency_conversion, $end_date, $exclude_subledger, $get_latest, $sort_type, $start_date);
    print_r($assetsizeclient);
} catch (Exception $e) {
    echo 'Exception when calling ClientApi->getClientAssetSizeUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::ClientApi.new
client_id = '1d987750-3cbd-4720-861c-6fc6ed3d6262' # String | UUID client_id

opts = {
    currency_conversion: null, # String | Currency Code
    end_date: Date.parse('2018-08-07'), # Date | end date
    exclude_subledger: false, # BOOLEAN | exclude_subledger
    get_latest: true, # BOOLEAN | true or false
    sort_type: null, # String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    start_date: Date.parse('2018-06-07') # Date | start date
}

begin
  asset = api_instance.get_client_asset_size_using_get(client_id, opts)
  p asset
rescue NucleusApi::ApiError => e
  puts "Exception when calling ClientApi->get_client_asset_size_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.ClientApi();
var clientId = "1d987750-3cbd-4720-861c-6fc6ed3d6262";

var opts = {
    'endDate': "2018-07-25",
    'startDate': "2020-09-10",
    'getLatest': true,
    'excludeSubledger': true,
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    //'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 4 // Number | size

};
var clientassetsize = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getClientAssetSizeUsingGet(clientId, opts)

Example Response

[
    {
        "date": "2018-02-03",
        "currency_code": "USD",
        "value": 20000,
        "value_available": null,
        "value_pending": null,
        "cash_flow": 0
    },
    {
        "date": "2018-02-04",
        "currency_code": "USD",
        "value": 24500,
        "value_available": null,
        "value_pending": null,
        "cash_flow": 500
    }
]

Get a list of asset sizes per date for a client. Asset size records are created at the portfolio level and aggregated to yield the client asset size(s). The unique client_id must be provided. To obtain the appropriate client_id, use the GET /client endpoint to view all available client_ids registered with your tenant. The endpoint returns a list of asset sizes by date for the client. Additional parameters available to narrow down what is returned include: a date range, only obtaining the latest record, and sorting by different units of time (e.g. annually, quarterly, monthly, daily), etc.

HTTP REQUEST

GET /client/{client_id}/asset_size

ARGUMENTS

Parameter Type Required Description
get_latest boolean optional Retrieve only the latest asset size. Defaults to false if not set
sort_type string optional Sort the asset sizes by D Daily, M Monthly, Q Quarterly, Y Yearly. Defaults to D Daily if not set. Must be capital letters
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
exclude_subledger boolean optional If set to “true”, excludes portfolios under accounts where is_subledger = “true” to not double count assets of subaccounts. Defaults to “false” which includes all portfolios under an account.
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
date date Date for the asset size record. Displays the latest record if more than one entry exists for the given date.
currency_code string Alphabetic currency code for the asset size. See currency codes
value double Monetary value of all the client’s accounts on the particular date
value_available double Available monetary value of the client on the particular date
value_pending double Pending monetary value of the client on the particular date
cash_flow double Amount added to the client’s accounts or withdrawn from the accounts since the last asset size date. Value is used for performance calculations. Value may be positive or negative.

List all client transactions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/client/099961da-7f41-4309-950f-2b51689a0033/transaction"
api_instance = nucleus_api.ClientApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_client_transaction_all_using_get("1d987750-3cbd-4720-861c-6fc6ed3d6262")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_client_transaction_using_get: %s\n" % e)
ClientApi apiInstance = new ClientApi();
        try {
            Object clienttransaction = apiInstance.getClientTransactionAllUsingGet(UUID.fromString("1d987750-3cbd-4720-861c-6fc6ed3d6262"), true, null, date2, null, 0, 10, date1);
            System.out.println(clienttransaction);
        } catch (ApiException e) {
            System.err.println("Exception when calling getClientTransactionAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\ClientApi(
    new GuzzleHttp\Client(),
    $config);
$client_id = "489a13a9-aab1-42d9-a84f-1ab0d95c919c"; // string | UUID client_id
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$end_date = new \DateTime("2020-05-06"); // \DateTime | end_date
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size
$start_date = new \DateTime("2020-08-06"); // \DateTime | start_date

try {
    $clienttransaction = $apiInstance->getClientTransactionAllUsingGet($client_id, $ascending, $currency_conversion, $end_date, $order_by, $page, $size, $start_date);
    print_r($clienttransaction);
} catch (Exception $e) {
    echo 'Exception when calling ClientApi->getClientTransactionAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::ClientApi.new
client_id = '1d987750-3cbd-4720-861c-6fc6ed3d6262' # String | UUID client_id

opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | currency_conversion
    end_date: '2020-01-01', # String | end date - yyyy-mm-dd
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25, # Integer | size
    start_date: '2019-08-01' # String | start date - yyyy-mm-dd
}

begin
  transaction = api_instance.get_client_transaction_all_using_get(client_id, opts)
  p transaction
rescue NucleusApi::ApiError => e
  puts "Exception when calling ClientApi->get_client_transaction_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.ClientApi();
var clientId = "1d987750-3cbd-4720-861c-6fc6ed3d6262";

var opts = {
    'endDate': "2018-07-25",
    'startDate': "2020-09-10",
    'getLatest': true,
    'excludeSubledger': true,
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    //'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 4 // Number | size

};
var clienttransactions = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getClientTransactionAllUsingGet(clientId, opts, clienttransactions)

Example Response

{
  "content": [
    {
            "id": "efa289b2-3565-42e6-850b-8dad25727e99",
            "date": "2018-01-31T00:00:00.000+0000",
            "date_available": null,
            "is_recurring": false,
            "is_cleansed": false,
            "is_disputed": false,
            "is_read": true,
            "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
            "model_id": "6dbadddc-41ff-4634-a145-16678b422557",
            "price": 200,
            "quantity": 2,
            "currency_code": null,
            "amount": null,
            "balance": null,
            "merchant_id": null,
            "mid": null,
            "merchant": null,
            "merchant_category_code": null,
            "transaction_category_id": null,
            "category": null,
            "subcategory": null,
            "description": null,
            "memo": null,
            "status": null,
            "location": {},
            "check": {},
            "funding_id": null,
            "security_id": "691c2255-a1a6-451f-b772-cb262725d7e2",
            "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
            "create_date": "2018-02-07T19:29:37.000+0000",
            "update_date": "2018-02-012T09:00:00.000+0000"
    },
    {
            "id": "efa289b2-3565-42e6-850b-8dad25727e24",
            "date": "2018-01-31T00:00:00.000+0000",
            "date_available": null,
            "is_recurring": false,
            "is_cleansed": false,
            "is_disputed": false,
            "is_read": true,
            "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
            "model_id": "6dbadddc-41ff-4634-a145-16678b422557",
            "price": 1000,
            "quantity": 6,
            "currency_code": null,
            "amount": null,
            "balance": null,
            "merchant_id": null,
            "mid": null,
            "merchant": null,
            "merchant_category_code": null,
            "transaction_category_id": null,
            "category": null,
            "subcategory": null,
            "description": null,
            "memo": null,
            "status": null,
            "location": {},
            "check": {},
            "funding_id": null,
            "security_id": "0d652520-7e6a-461d-abe8-56b956c08d2e",
            "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
            "create_date": "2017-08-02T04:30:25.000+0000",
            "update_date": "2017-11-18T09:00:00.000+0000"
    }
  ],
    "total_pages": 1,
    "total_elements": 2,
    "last": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "id",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 2,
    "size": 25,
    "number": 2
}

Get the information for all transactions under a client registered with your tenant. Transaction records are created at a portfolio level and all transactions for each portfolio below the client’s account(s) are returned to show the client’s transaction activity. The unique client_id must be provided. To obtain the appropriate client_id, use the GET /client endpoint to view all available client_ids registered with your tenant. The endpoint returns a list of transaction_ids and details for each transaction.

HTTP REQUEST

GET /client/{client_id}/transaction

ARGUMENTS

Parameter Type Required Description
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
id UUID The id for the transaction record
date timestamp Timestamp when the transaction occurred
date_available timestamp Timestamp when the transaction becomes available
is_cleansed boolean Indicates if the transaction has been cleansed by a data cleansing engine. Defaults to false which indicates that it has not been cleansed
is_read boolean Indicates if the transaction has been read. Defaults to false which indicates that it has not been read
is_recurring boolean Indicates if the transaction is recurring such as a subscription. Defaults to false which indicates that it is not recurring
is_disputed boolean Indicates if the transaction is disputed by the client. Defaults to false which indicates that it is not disputed
portfolio_id UUID The id of the portfolio that the transaction record relates to
funding_id UUID The id of the funding request that the transaction record relates to
model_id UUID The id of the model to which the portfolio that the transaction falls under subscribes
price integer Price for the security included in the transaction at which it was sold or purchased
quantity integer Quantity of shares of the security purchased
currency_code string Alphabetic currency code for the amount. See currency codes
amount double Amount of the transaction
balance double Updated balance of the portfolio as a result of the transaction
merchant_id UUID ID of the merchant resource for the transaction
mid string Acquirer ID of the merchant (MID) for the transaction
merchant string The merchant for the transaction such as the merchant posted for a credit or debit card charge
merchant_category_code string The MCC Code for the merchant as identified by the card network
transaction_category_id string ID of the category resource for the transaction
category string Category of the transaction
subcategory string Subcategory of the transaction
description string Description of the transaction
memo string Memo attached to the transaction
status string Status of the transaction
location map Location where the transaction occurred
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      latitude double Latitude of the location where the transaction occurred
      longitude double Longitude of the location where the transaction occurred
check map Check associated with the banking transaction
      check_number string Number on the check such as “1234”
      check_amount double Monetary amount of the check
      check_images map Image(s) of the scanned check(s)
            image_url string URL where the image can be displayed
            image_type string Type of image for the check such as “png” or “jpeg”
security_id UUID The id of the security included in the transaction
transaction_code_id integer The id referring to the transaction codes defined by your firm
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

Household

Household Management

Aggregate clients in the same family into a household entity to view their finances across the household.

Field Type Description
id UUID The id of the household
name string The name of the household
category UUID The category of the household to link households together
subcategory UUID The subcategory of the household to link under a category
household_income double The annual income of the household
members array(map) Members of the household and their relationships to one another
      client_id UUID ID of the client member of the household
      is_primary boolean Indicates if the client is the primary member of the household. Defaults to false which indicates it’s not primary.
      client_relationships array(map) List of member relationships to the client
            client_id UUID ID of the client member of the relationship
            relationship string Relationship of the client to the client member in the household. Value may be father, mother, husband, wife, son, daughter, brother, sister, pet
is_active boolean Indicates if the household is currently active. Defaults to true which indicates it is active
metadata map Custom information associated with the household in the format key:value
See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all households

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
  "https://api.hydrogenplatform.com/nucleus/v1/household"
api_instance = nucleus_api.HouseholdApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_household_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_household_all_using_get: %s\n" % e)
HouseholdApi apiInstance = new HouseholdApi();
        try {
            PageHousehold List = apiInstance.getHouseholdAllUsingGet(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getHouseholdAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\HouseholdApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $householdlist = $apiInstance->getHouseholdAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($householdlist);
} catch (Exception $e) {
    echo 'Exception when calling HouseholdApi->getHouseholdAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::HouseholdApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  householdlist = api_instance.get_household_all_using_get(opts)
  p householdlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling HouseholdApi->get_household_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var householdlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getHouseholdAllUsingGet(opts, householdlist)

Example Response

{
    "content": [
        {
            "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
            "secondary_id": null,
            "create_date": "2020-01-07T20:54:33.000+0000",
            "update_date": "2020-01-07T20:54:33.000+0000",
            "name": "Young Family",
            "category": null,
            "subcategory": null,
            "household_income": null,
            "members": [
                {
                    "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
                    "is_primary": true,
                    "client_relationships": [
                        {
                          "client_id": "615663b9-a70e-4e5b-99ae-3b3eef20d6e9",
                          "relationship": "mother"
                        },
                        {
                          "client_id": "72a13a73-c5f6-4728-9454-bd0db32a0e3e",
                          "relationship": "wife"
                        }
                    ]
                },
                {
                    "client_id": "8e1799f0-4429-4939-ae84-7391cff93ba5",
                    "is_primary": true,
                    "client_relationships": [
                        {
                          "client_id": "bad983ab-4706-4463-a6c5-16a07e955c87",
                          "relationship": "father"
                        },
                        {
                          "client_id": "7e74b1d4-bd1c-44a1-8d25-7988a34a54ef",
                          "relationship": "husband"
                        }
                    ]
                }
            ],
            "is_active": true,
            "metadata": {}
        },
        {
          "id": "11291d9b-fce0-4536-b4be-311f1a35c11f",
          "secondary_id": null,
          "create_date": "2020-01-01T06:15:33.000+0000",
          "update_date": "2020-01-01T06:54:33.000+0000",
          "name": "Smith Family",
          "category": null,
          "subcategory": null,
          "household_income": null,
          "members": [
              {
                  "client_id": "8fc301c0-50ef-4803-bb0c-b1dc57ffc85a",
                  "is_primary": true,
                  "client_relationships": [
                      {
                        "client_id": "015fd383-5624-47ce-8f18-404f6dd2de60",
                        "relationship": "sister"
                      },
                      {
                        "client_id": "daugher",
                        "relationship": "38dbd41b-22e0-4a84-97d5-fae5a8b04589"
                      }
                  ]
              },
              {
                  "client_id": "bb8394ca-84bd-4679-ac3e-874edeef15cf",
                  "is_primary": true,
                  "client_relationships": [
                      {
                        "client_id": "34fe4744-1bfd-4356-b2f1-80fb10ae2fc0",
                        "relationship": "brother"
                      },
                      {
                        "client_id": "f28e47b8-72c9-4475-8914-68c5c6775dee",
                        "relationship": "son"
                      }
                  ]
              }
          ],
          "is_active": true,
          "metadata": {}
        }
    ],
    "last": true,
    "total_pages": 1,
    "total_elements": 1,
    "number_of_elements": 1,
    "first": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "size": 25,
    "number": 0
}

Get information for all households stored for your tenant. You can filter using one of the unique ids such as the members.client_id to view the households for a client or for another particular entity.

HTTP REQUEST

GET /household

Create a household

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
      "name": "Young Family",
      "members": [
          {
              "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
              "is_primary": true,
              "client_relationships": [
                  {
                    "client_id": "615663b9-a70e-4e5b-99ae-3b3eef20d6e9",
                    "relationship": "mother"
                  },
                  {
                    "client_id": "72a13a73-c5f6-4728-9454-bd0db32a0e3e",
                    "relationship": "wife"
                  }
              ]
          },
          {
              "client_id": "8e1799f0-4429-4939-ae84-7391cff93ba5",
              "is_primary": true,
              "client_relationships": [
                  {
                    "client_id": "bad983ab-4706-4463-a6c5-16a07e955c87",
                    "relationship": "father"
                  },
                  {
                    "client_id": "7e74b1d4-bd1c-44a1-8d25-7988a34a54ef",
                    "relationship": "husband"
                  }
              ]
          }
      ]
    }' "https://api.hydrogenplatform.com/nucleus/v1/household"
api_instance = nucleus_api.HouseholdApi(nucleus_api.ApiClient(configuration))
# # Create a HouseHold
clients1 = nucleus_api.ClientRelationship(client_id="9169484d-235c-47f1-a182-75227b1189f9", relationship="father")
clients2 = nucleus_api.ClientRelationship(client_id="2d7542b9-cf67-488d-881c-93dfae5e2ea9", relationship="brother")
members1 = nucleus_api.Member(client_id="e02f8acc-3977-4f0e-9436-c5b9c28dca09", is_primary="true", client_relationships=[clients1, clients2])
household = nucleus_api.Household(category=None, name="New", members=[members1])
try:
    api_response = api_instance.create_household_using_post(household)
    pprint(api_response)
except ApiException as e:
    print("create_household_using_post: %s\n" % e)
HouseholdApi apiInstance = new HouseholdApi();
        //Create a Household
        Household household = new Household();
        household.setName("New One");
        Member memberstat1 = new Member();
        memberstat1.setClientId(UUID.fromString("e02f8acc-3977-4f0e-9436-c5b9c28dca09"));
        memberstat1.setIsPrimary(false);
        ClientRelationship clientstat1 = new ClientRelationship();
        clientstat1.setClientId(UUID.fromString("9169484d-235c-47f1-a182-75227b1189f9"));
        clientstat1.setRelationship("father");
        ClientRelationship clientstat2 = new ClientRelationship();
        clientstat2.setClientId(UUID.fromString("2d7542b9-cf67-488d-881c-93dfae5e2ea9"));
        clientstat2.setRelationship("brother");
        List <ClientRelationship> data = Arrays.<ClientRelationship>asList(clientstat1, clientstat2);
        memberstat1.clientRelationships(data);
        Member memberstat2 = new Member();
        memberstat2.setClientId(UUID.fromString("903e408d-8a20-406e-9677-b8c7f0b990de"));
        memberstat2.setIsPrimary(false);
        ClientRelationship clientstat10 = new ClientRelationship();
        clientstat10.setClientId(UUID.fromString("9c32753b-09a6-4303-bed7-4d4b07c8bab8"));
        clientstat10.setRelationship("father");
        ClientRelationship clientstat20 = new ClientRelationship();
        clientstat20.setClientId(UUID.fromString("3f876310-0294-459c-83c6-678badc2b7e4"));
        clientstat20.setRelationship("brother");
        List <ClientRelationship> data1 = Arrays.<ClientRelationship>asList(clientstat10, clientstat20);
        memberstat2.clientRelationships(data1);
        List <Member> householddata = Arrays.<Member>asList(memberstat1, memberstat2);
        household.setMembers(householddata);

        try {
            Household result = apiInstance.createHouseholdUsingPost(household);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createHouseholdUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\HouseholdApi(
    new GuzzleHttp\Client(),
    $config);
//Create Household
$household = new \com\hydrogen\nucleus\Model\Household();
$member = new \com\hydrogen\nucleus\Model\Member();
$clientrelation = new \com\hydrogen\nucleus\Model\ClientRelationship();
$clientrelation1 = new \com\hydrogen\nucleus\Model\ClientRelationship();
try {
    $member->setClientId('e02f8acc-3977-4f0e-9436-c5b9c28dca09');
    $member->setIsPrimary("true");
    $clientrelation->setClientId("9169484d-235c-47f1-a182-75227b1189f9");
    $clientrelation->setRelationship("father");
    $clientrelation1->setClientId("2d7542b9-cf67-488d-881c-93dfae5e2ea9");
    $clientrelation1->setRelationship("brother");
    $household->setName("ABC");
    $household->setMembers([$member]);
    $result = $apiInstance->createHouseholdUsingPost($household);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createHouseholdUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::HouseholdApi.new
#Create Household
household = NucleusApi::Household.new
member = NucleusApi::Member.new
client1 = NucleusApi::ClientRelationship.new
client2 = NucleusApi::ClientRelationship.new

begin
  household.name = "MCC"
  member.client_id = "e02f8acc-3977-4f0e-9436-c5b9c28dca09"
  member.is_primary = "false"
  client1.client_id = "9169484d-235c-47f1-a182-75227b1189f9"
  client1.relationship = "father"
  client2.client_id = "2d7542b9-cf67-488d-881c-93dfae5e2ea9"
  client2.relationship = "brother"
  household.members = [member]
  result = api_instance.create_household_using_post(household)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_household_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
//Create a Household
var household = new HydrogenNucleusApi.Household();
var clientrelations = new HydrogenNucleusApi.ClientRelationship();
var clientrelations1 = new HydrogenNucleusApi.ClientRelationship();
var member1 = new HydrogenNucleusApi.Member();
member1.client_id = 'e02f8acc-3977-4f0e-9436-c5b9c28dca09';
member1.is_primary = "true";
clientrelations.client_id = '9169484d-235c-47f1-a182-75227b1189f9';
clientrelations.relationship = "father";
clientrelations1.client_id = "2d7542b9-cf67-488d-881c-93dfae5e2ea9";
clientrelations1.relationship = "father";
member1.client_relationships = [clientrelations, clientrelations1];
household.category = "New One";
household.name = "new";
household.members = [member1];


var newhousehold = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createHouseholdUsingPost(household, newhousehold)

Example Response

{
  "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
  "secondary_id": null,
  "create_date": "2020-01-07T20:54:33.000+0000",
  "update_date": "2020-01-07T20:54:33.000+0000",
  "name": "Young Family",
  "category": null,
  "subcategory": null,
  "household_income": null,
  "members": [
      {
          "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
          "is_primary": true,
          "client_relationships": [
              {
                "client_id": "615663b9-a70e-4e5b-99ae-3b3eef20d6e9",
                "relationship": "mother"
              },
              {
                "client_id": "72a13a73-c5f6-4728-9454-bd0db32a0e3e",
                "relationship": "wife"
              }
          ]
      },
      {
          "client_id": "8e1799f0-4429-4939-ae84-7391cff93ba5",
          "is_primary": true,
          "client_relationships": [
              {
                "client_id": "bad983ab-4706-4463-a6c5-16a07e955c87",
                "relationship": "father"
              },
              {
                "client_id": "7e74b1d4-bd1c-44a1-8d25-7988a34a54ef",
                "relationship": "husband"
              }
          ]
      }
  ],
  "is_active": true,
  "metadata": {}
}

Create a household. The endpoint returns a household_id that can then be used to manage the household.

HTTP REQUEST

POST /household

ARGUMENTS

Parameter Type Required Description
name string required The name of the household
category UUID optional The category of the household to link households together
subcategory UUID optional The subcategory of the household to link under a category
household_income double optional The annual income of the household
members array(map) required Members of the household and their relationships to one another
      client_id UUID required ID of the client member of the household
      is_primary boolean optional Indicates if the client is the primary member of the household. Defaults to false which indicates it’s not primary.
      client_relationships array(map) required List of member relationships to the client
            client_id UUID required ID of the client member of the relationship
            relationship string required Relationship of the client to the client member in the household. Value may be father, mother, husband, wife, son, daughter, brother, sister, pet
is_active boolean optional Indicates if the household is currently active. Defaults to true which indicates it is active
metadata map optional Custom information associated with the household in the format key:value
See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a household

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/household/1692a3c2-65b0-46a0-9a0a-66bc949f7ca1"
api_instance = nucleus_api.HouseholdApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_household_using_get("fcb966b5-8da1-4541-a488-07e99074e37b")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_household_using_get: %s\n" % e)
HouseholdApi apiInstance = new HouseholdApi();
        try {
            Household responseHousehold = apiInstance.getHouseholdUsingGet(UUID.fromString("6f851269-659b-4616-b860-e53e114559c2"));
            System.out.println(responseHousehold);
        } catch (ApiException e) {
            System.err.println("Exception when calling getHouseholdUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\HouseholdApi(
    new GuzzleHttp\Client(),
    $config);
$household_id = "6f851269-659b-4616-b860-e53e114559c2"; // string | UUID household_id

try {
    $household = $apiInstance->getHouseholdUsingGet($household_id);
    print_r($household);
} catch (Exception $e) {
    echo 'Exception when calling HouseholdApi->getHouseholdUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::HouseholdApi.new
household_id = '6f851269-659b-4616-b860-e53e114559c2' # String | UUID household_id
begin
  household = api_instance.get_household_using_get(household_id)
  p household
rescue NucleusApi::ApiError => e
  puts "Exception when calling HouseholdApi->get_household_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
var householdID = "6f851269-659b-4616-b860-e53e114559c2";

var household = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getHouseholdUsingGet(householdID, household)

Example Response

{
  "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
  "secondary_id": null,
  "create_date": "2020-01-07T20:54:33.000+0000",
  "update_date": "2020-01-07T20:54:33.000+0000",
  "name": "Young Family",
  "category": null,
  "subcategory": null,
  "household_income": null,
  "members": [
      {
          "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
          "is_primary": true,
          "client_relationships": [
              {
                "client_id": "615663b9-a70e-4e5b-99ae-3b3eef20d6e9",
                "relationship": "mother"
              },
              {
                "client_id": "72a13a73-c5f6-4728-9454-bd0db32a0e3e",
                "relationship": "wife"
              }
          ]
      },
      {
          "client_id": "8e1799f0-4429-4939-ae84-7391cff93ba5",
          "is_primary": true,
          "client_relationships": [
              {
                "client_id": "bad983ab-4706-4463-a6c5-16a07e955c87",
                "relationship": "father"
              },
              {
                "client_id": "7e74b1d4-bd1c-44a1-8d25-7988a34a54ef",
                "relationship": "husband"
              }
          ]
      }
  ],
  "is_active": true,
  "metadata": {}
}

Retrieve the information for a specific household. The endpoint returns the household_id and details for the household specified.

HTTP REQUEST

GET /household/{household_id}

Update a household

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
      "category": "Friends"
    }' "https://api.hydrogenplatform.com/nucleus/v1/household/1692a3c2-65b0-46a0-9a0a-66bc949f7ca1"
api_instance = nucleus_api.HouseholdApi(nucleus_api.ApiClient(configuration))
# # # Update a HouseHold
household_update = {'household_income': '1000'}
household_id = '2347b3d6-7e49-4a45-adc2-ff3bdd384abf'
try:
    api_response = api_instance.update_household_using_put(household_update, household_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_household_using_put: %s\n" % e)
HouseholdApi apiInstance = new HouseholdApi();
        //Update Household
        Map map = new HashMap();
        map.put("name", "New");

        try {
            Household response = apiInstance.updateHouseholdUsingPut(map, UUID.fromString("aff68a25-13f3-442a-a4f9-8a2f0d289f7c"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\HouseholdApi(
    new GuzzleHttp\Client(),
    $config);
//Update Household
$household_update = new stdClass();
$household_id = "2347b3d6-7e49-4a45-adc2-ff3bdd384abf";

try {
    $household_update->name = "new";
    $result = $apiInstance->updateHouseholdUsingPut($household_update, $household_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateHouseholdUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::HouseholdApi.new
#Update Household
household_update = {"category" => 'New'}
household_id = '04fefab3-4010-4661-a606-0ed3634e0c78'
begin
  result = api_instance.update_household_using_put(household_update, household_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_household_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
// //Update Household
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var householdupdate = new HydrogenNucleusApi.Household();
var householdid = '04fefab3-4010-4661-a606-0ed3634e0c78';

householdupdate.category = "New";
apiInstance.updateHouseholdUsingPut(householdid, householdupdate, callback)

Example Response

{
  "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
  "secondary_id": null,
  "create_date": "2020-01-07T20:54:33.000+0000",
  "update_date": "2020-05-07T10:15:12.000+0000",
  "name": "Young Family",
  "category": "Friends",
  "subcategory": null,
  "household_income": null,
  "members": [
      {
          "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
          "is_primary": true,
          "client_relationships": [
              {
                "client_id": "615663b9-a70e-4e5b-99ae-3b3eef20d6e9",
                "relationship": "mother"
              },
              {
                "client_id": "72a13a73-c5f6-4728-9454-bd0db32a0e3e",
                "relationship": "wife"
              }
          ]
      },
      {
          "client_id": "8e1799f0-4429-4939-ae84-7391cff93ba5",
          "is_primary": true,
          "client_relationships": [
              {
                "client_id": "bad983ab-4706-4463-a6c5-16a07e955c87",
                "relationship": "father"
              },
              {
                "client_id": "7e74b1d4-bd1c-44a1-8d25-7988a34a54ef",
                "relationship": "husband"
              }
          ]
      }
  ],
  "is_active": true,
  "metadata": {}
}

Update the information for a household. The unique household_id must be provided. To obtain the appropriate household_id, use the GET /household endpoint to view all households stored for your tenant and their current information. The details to be updated must also be provided. The endpoint returns the household_id and the details for the card.

HTTP REQUEST

PUT /household/{household_id}

Delete a household

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/household/0233ab54-58a0-4b43-aa65-a1c32f29ad69"
api_instance = nucleus_api.HouseholdApi(nucleus_api.ApiClient(configuration))
# # # Delete a HouseHold
household1_id = '17f098af-5d9d-4263-818a-33a934e03265'
try:
    api_instance.delete_household_using_delete(household1_id)
except ApiException as e:
    print("Exception when delete_household_using_delete: %s\n" % e)
HouseholdApi apiInstance = new HouseholdApi();
        //Delete a Household
        try {
            Household deleteresponse = apiInstance.deleteHouseholdUsingDelete(UUID.fromString("8b39a62b-247c-4b72-953e-6f648f5f970d"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\HouseholdApi(
    new GuzzleHttp\Client(),
    $config);
//Delete HouseHold
$household_did = "04fefab3-4010-4661-a606-0ed3634e0c78"; // string | UUID account_id

try {
    $apiInstance->deleteHouseholdUsingDelete($household_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deleteHouseholdUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::HouseholdApi.new

#Delete Household
household1_id = '17f098af-5d9d-4263-818a-33a934e03265'
begin
  result = api_instance.delete_household_using_delete(household1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_household_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
// //Delete a Goal
var householdidd = "17f098af-5d9d-4263-818a-33a934e03265";
var deletehousehold = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deleteHouseholdUsingDelete(householdidd, deletehousehold)

Response (204 No Content)

Permanently delete a household. The unique household_id must be provided. To obtain the appropriate household_id, use the GET /household endpoint to view all households stored for your tenant. This deletes the household_id and all household record information.

HTTP REQUEST

DELETE /household/{household_id}

Household Activity

List all household asset sizes

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/household/099961da-7f41-4309-950f-2b51689a0033/asset_size"
api_instance = nucleus_api.HouseholdApi(nucleus_api.ApiClient(configuration))
# List all HouseholdClientAssetSize
try:
    api_response = api_instance.get_household_client_asset_size_using_get("fcb966b5-8da1-4541-a488-07e99074e37b")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_household_client_asset_size_using_get: %s\n" % e)
HouseholdApi apiInstance = new HouseholdApi();
        //List HouseholdAssetSize
        try {
            Object householdasset = apiInstance.getHouseholdClientAssetSizeUsingGet(UUID.fromString("6f851269-659b-4616-b860-e53e114559c2"), null, date2, true, true, null, date1);
            System.out.println(householdasset);
        } catch (ApiException e) {
            System.err.println("Exception when calling getHouseholdClientAssetSizeUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\HouseholdApi(
    new GuzzleHttp\Client(),
    $config);
//Get HouseholdAssetSize
$household_id = "6f851269-659b-4616-b860-e53e114559c2"; // string | UUID household_id
$currency_conversion = null; // string | USD
$end_date = new \DateTime("2020-09-14"); // \DateTime | end date
$exclude_subledger = true; // bool | true or false
$get_latest = true; // bool | true or false
$sort_type = null; // string | Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
$start_date = new \DateTime("2020-08-14"); // \DateTime | start date

try {
    $householdasset = $apiInstance->getHouseholdClientAssetSizeUsingGet($household_id, $currency_conversion, $end_date, $exclude_subledger, $get_latest, $sort_type, $start_date);
    print_r($householdasset);
} catch (Exception $e) {
    echo 'Exception when calling HouseholdApi->getHouseholdClientAssetSizeUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::HouseholdApi.new
#Get Household AssetSize
household_id = '6f851269-659b-4616-b860-e53e114559c2' # String | UUID household_id

opts = {
    currency_conversion: null, # String | USD
    end_date: Date.parse('2020-01-08'), # Date | end date
    exclude_subledger: true, # BOOLEAN | true or false
    get_latest: true, # BOOLEAN | true or false
    sort_type: null, # String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    start_date: Date.parse('2019-08-23') # Date | start date
}

begin
  assetsize = api_instance.get_household_client_asset_size_using_get(household_id, opts)
  p assetsize
rescue NucleusApi::ApiError => e
  puts "Exception when calling HouseholdApi->get_household_client_asset_size_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
//List all Householdassetsize

var householdId = "6f851269-659b-4616-b860-e53e114559c2";
var opts = {
    'currencyConversion': null, // String | USD
    'endDate': new Date("2018-11-03"), // Date | end date
    'excludeSubledger': true, // Boolean | true or false
    'getLatest': true, // Boolean | true or false
    'sortType': null, // String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    'startDate': new Date("2018-08-01") // Date | start date
};

var asset = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' + data);
    }
};
apiInstance.getHouseholdClientAssetSizeUsingGet(householdId, opts, asset)

Example Response

[
  {
    "date": "2018-02-03",
    "currency_code": "USD",
    "value": 20000,
    "value_available": null,
    "value_pending": null,
    "cash_flow": 0
  },
  {
    "date": "2018-02-04",
    "currency_code": "USD",
    "value": 24500,
    "value_available": null,
    "value_pending": null,
    "cash_flow": 500
  }
]

Get a list of asset sizes per date for a household. Asset size records are created at the portfolio level and aggregated to yield the household asset size(s). The unique household_id must be provided. To obtain the appropriate household_id, use the GET /household endpoint to view all available household_ids registered with your tenant. The endpoint returns a list of asset sizes by date for the household.

HTTP REQUEST

GET /household/{household_id}/asset_size

ARGUMENTS

Parameter Type Required Description
get_latest boolean optional Retrieve only the latest asset size. Defaults to false if not set
sort_type string optional Sort the asset sizes by D Daily, M Monthly, Q Quarterly, Y Yearly. Defaults to D Daily if not set. Must be capital letters
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
exclude_subledger boolean optional If set to “true”, excludes portfolios under accounts where is_subledger = “true” to not double count assets of subaccounts. Defaults to “false” which includes all portfolios under an account.
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
date date Date for the asset size record. Displays the latest record if more than one entry exists for the given date.
currency_code string Alphabetic currency code for the asset size. See currency codes
value double Monetary value of all the household’s accounts on the particular date
value_available double Available monetary value of the household on the particular date
value_pending double Pending monetary value of the household on the particular date
cash_flow double Amount added to the household’s accounts or withdrawn from the accounts since the last asset size date. Value is used for performance calculations. Value may be positive or negative.

List all household transactions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/household/099961da-7f41-4309-950f-2b51689a0033/transaction"
api_instance = nucleus_api.HouseholdApi(nucleus_api.ApiClient(configuration))
# List all HouseholdClientTransactions
try:
    api_response = api_instance.get_household_client_transaction_using_get("fcb966b5-8da1-4541-a488-07e99074e37b")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_household_client_transaction_using_get: %s\n" % e)
HouseholdApi apiInstance = new HouseholdApi();
        //List Householdtransaction
        try {
            Object householtransaction = apiInstance.getHouseholdClientTransactionUsingGet(UUID.fromString("6f851269-659b-4616-b860-e53e114559c2"), true, null, date2, null, 0, 10, date1);
            System.out.println(householtransaction);
        } catch (ApiException e) {
            System.err.println("Exception when calling getHouseholdClientHoldingUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\HouseholdApi(
    new GuzzleHttp\Client(),
    $config);
//Get HouseholdTransaction
$household_id = "6f851269-659b-4616-b860-e53e114559c2"; // string | UUID household_id
$ascending = false; // bool | ascending
$currency_conversion = null; // string | USD
$end_date = new \DateTime("2020-09-14"); // \DateTime | end date
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size
$start_date = new \DateTime("2020-08-14"); // \DateTime | start date

try {
    $householdtransaction = $apiInstance->getHouseholdClientTransactionUsingGet($household_id, $ascending, $currency_conversion, $end_date, $order_by, $page, $size, $start_date);
    print_r($householdtransaction);
} catch (Exception $e) {
    echo 'Exception when calling HouseholdApi->getHouseholdClientTransactionUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::HouseholdApi.new

#Get all Transactions
household_id = '6f851269-659b-4616-b860-e53e114559c2' # String | UUID household_id

opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | USD
    end_date: Date.parse('2013-10-20'), # Date | end date
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25, # Integer | size
    start_date: Date.parse('2013-10-20') # Date | start date
}

begin
  transaction = api_instance.get_household_client_transaction_using_get(household_id, opts)
  p transaction
rescue NucleusApi::ApiError => e
  puts "Exception when calling HouseholdApi->get_household_client_transaction_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.HouseholdApi();
//List all Transactions


var householdId = "6f851269-659b-4616-b860-e53e114559c2";
var opts = {
    'currencyConversion': null, // String | USD
    'endDate': new Date("2018-11-03"), // Date | end date
    'excludeSubledger': true, // Boolean | true or false
    'getLatest': true, // Boolean | true or false
    'sortType': null, // String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    'startDate': new Date("2018-08-01") // Date | start date
};

var transactions = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' + data);
    }
};
apiInstance.getHouseholdClientTransactionUsingGet(householdId, opts, transactions)

Example Response

{
  "content": [
    {
      "id": "efa289b2-3565-42e6-850b-8dad25727e99",
      "date": "2018-01-31T00:00:00.000+0000",
      "date_available": null,
      "is_recurring": false,
      "is_cleansed": false,
      "is_disputed": false,
      "is_read": true,
      "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
      "model_id": "6dbadddc-41ff-4634-a145-16678b422557",
      "price": 200,
      "quantity": 2,
      "currency_code": null,
      "amount": null,
      "balance": null,
      "merchant_id": null,
      "mid": null,
      "merchant": null,
      "merchant_category_code": null,
      "transaction_category_id": null,
      "category": null,
      "subcategory": null,
      "description": null,
      "memo": null,
      "status": null,
      "location": {},
      "check": {},
      "funding_id": null,
      "security_id": "691c2255-a1a6-451f-b772-cb262725d7e2",
      "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
      "create_date": "2018-02-07T19:29:37.000+0000",
      "update_date": "2018-02-012T09:00:00.000+0000"
    },
    {
      "id": "efa289b2-3565-42e6-850b-8dad25727e24",
      "date": "2018-01-31T00:00:00.000+0000",
      "date_available": null,
      "is_recurring": false,
      "is_cleansed": false,
      "is_disputed": false,
      "is_read": true,
      "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
      "model_id": "6dbadddc-41ff-4634-a145-16678b422557",
      "price": 1000,
      "quantity": 6,
      "currency_code": null,
      "amount": null,
      "balance": null,
      "merchant_id": null,
      "mid": null,
      "merchant": null,
      "merchant_category_code": null,
      "transaction_category_id": null,
      "category": null,
      "subcategory": null,
      "description": null,
      "memo": null,
      "status": null,
      "location": {},
      "check": {},
      "funding_id": null,
      "security_id": "0d652520-7e6a-461d-abe8-56b956c08d2e",
      "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
      "create_date": "2017-08-02T04:30:25.000+0000",
      "update_date": "2017-11-18T09:00:00.000+0000"
    }
  ],
    "total_pages": 1,
    "total_elements": 2,
    "last": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "id",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 2,
    "size": 25,
    "number": 2
}

Get the information for all transactions under a household registered with your tenant. Transaction records are created at a portfolio level and all transactions for each portfolio below the household’s account(s) are returned to show the household’s transaction activity. The unique household_id must be provided. To obtain the appropriate household_id, use the GET /household endpoint to view all available household_ids registered with your tenant. The endpoint returns a list of transaction_ids and details for each transaction.

HTTP REQUEST

GET /household/{household_id}/transaction

ARGUMENTS

Parameter Type Required Description
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
id UUID The id for the transaction record
date timestamp Timestamp when the transaction occurred
date_available timestamp Timestamp when the transaction becomes available
is_cleansed boolean Indicates if the transaction has been cleansed by a data cleansing engine. Defaults to false which indicates that it has not been cleansed
is_read boolean Indicates if the transaction has been read. Defaults to false which indicates that it has not been read
is_recurring boolean Indicates if the transaction is recurring such as a subscription. Defaults to false which indicates that it is not recurring
is_disputed boolean Indicates if the transaction is disputed by the client. Defaults to false which indicates that it is not disputed
portfolio_id UUID The id of the portfolio that the transaction record relates to
funding_id UUID The id of the funding request that the transaction record relates to
model_id UUID The id of the model to which the portfolio that the transaction falls under subscribes
price integer Price for the security included in the transaction at which it was sold or purchased
quantity integer Quantity of shares of the security purchased
currency_code string Alphabetic currency code for the amount. See currency codes
amount double Amount of the transaction
balance double Updated balance of the portfolio as a result of the transaction
merchant_id UUID ID of the merchant resource for the transaction
mid string Acquirer ID of the merchant (MID) for the transaction
merchant string The merchant for the transaction such as the merchant posted for a credit or debit card charge
merchant_category_code string The MCC Code for the merchant as identified by the card network
transaction_category_id string ID of the category resource for the transaction
category string Category of the transaction
subcategory string Subcategory of the transaction
description string Description of the transaction
memo string Memo attached to the transaction
status string Status of the transaction
location map Location where the transaction occurred
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      latitude double Latitude of the location where the transaction occurred
      longitude double Longitude of the location where the transaction occurred
check map Check associated with the banking transaction
      check_number string Number on the check such as “1234”
      check_amount double Monetary amount of the check
      check_images map Image(s) of the scanned check(s)
            image_url string URL where the image can be displayed
            image_type string Type of image for the check such as “png” or “jpeg”
security_id UUID The id of the security included in the transaction
transaction_code_id integer The id referring to the transaction codes defined by your firm
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

Portfolio

Portfolio Management

Portfolios are created under accounts and hold cash for debit accounts. Every account must have at least one portfolio if you wish to track balances/asset sizes, and transactions. An account may have one of more portfolios, but the weights of all the portfolios must add up to 100%.

Field Type Description
id UUID The id of the portfolio
name string Name of the portfolio such as “Debit Account”
account_id UUID The id of the account to which the portfolio belongs
model_id UUID The id of the model to which the portfolio subscribes
percentage double Weight of the portfolio as a percentage of an account based on the weight of the portfolio’s model within the account’s allocation; ex. 20 representing 20%. If the account only has one portfolio input 100
account_number string Account number for the portfolio if the portfolio represents a subledger under a master account. Differs from the id for the portfolio which is auto generated.
description string Description for the portfolio such as “Stock Portfolio”
currency_code string Alphabetic currency code for the base currency of the portfolio, limited to 3 characters. See currency codes
is_subledger boolean Indicates if the portfolio represents a subledger or subaccount under a master account for a banking account. Defaults to false which indicates that it is not a subledger
status string Status of the portfolio such as “Registered” or “Active”
is_active boolean Indicates if the portfolio is active. Defaults to true which indicates that it is currently active
metadata map Custom information associated with the portfolio in the format key:value. See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all portfolios

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_all_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            PagePortfolio List = apiInstance.getPortfolioAllUsingGet(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $portfoliolist = $apiInstance->getPortfolioAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($portfoliolist);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  portfoliolist = api_instance.get_portfolio_all_using_get(opts)
  p portfoliolist
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var portfoliolist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getPortfolioAllUsingGet(opts, portfoliolist)

Example Response

{
    "content": [
        {
            "id": "04907eaa-3f33-49be-a35b-378cdf639fba",
            "create_date": "2018-01-01T21:56:03.000+0000",
            "update_date": "2018-01-15T21:56:03.000+0000",
            "description": "Portfolio 93 - Retirement Goal 1",
            "name": "Portfolio 93",
            "percentage": 100,
            "account_id": "04907eaa-3f33-49be-a35b-378cdf639fba",
            "model_id": "d5e3daf8-1ebf-4654-ac7a-2685502ec387",
            "account_number": null,
            "is_subledger": false,
            "status": null,
            "is_active": true,
            "metadata": {},
            "currency_code": "USD"
        },
        {
            "id": "099961da-7f41-4309-950f-2b51689a0033",
            "create_date": "2018-01-01T21:56:03.000+0000",
            "update_date": "2018-01-15T21:56:03.000+0000",
            "description": "Portfolio 10 - Major Purchase Goal 1",
            "name": "Portfolio 10",
            "percentage": 100,
            "account_id": "099961da-7f41-4309-950f-2b51689a0033",
            "model_id": "f68508c6-e23b-482e-b4f3-b449964eb08a",
            "account_number": null,
            "is_subledger": false,
            "status": null,
            "is_active": true,
            "metadata": {},
            "currency_code": "USD"
        }
    ],
    "last": false,
    "total_pages": 1,
    "total_elements": 2,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 2,
    "size": 25,
    "number": 0
}

Get the information for all portfolios assigned to all of your firm’s accounts. Note that the metadata is stored as a nested object within the portfolio object.

HTTP REQUEST

GET /portfolio

Create a portfolio

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
            "description": "Portfolio 93 - Retirement Goal 1",
            "name": "Portfolio 93",
            "percentage": 100,
            "account_id": "04907eaa-3f33-49be-a35b-378cdf639fba",
            "model_id": "d5e3daf8-1ebf-4654-ac7a-2685502ec387"
      }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # Create a Portfolio
portfolio = nucleus_api.Portfolio(name="New", account_id="39febc7f-ce86-4815-b4cb-cca9d05ba701", percentage="100")
try:
    api_response = api_instance.create_portfolio_using_post(portfolio)
    pprint(api_response)
except ApiException as e:
    print("create_portfolio_using_post: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Create a Portfolio
        Portfolio portfolio = new Portfolio();
        portfolio.setName("Andy");
        portfolio.setAccountId(UUID.fromString("39febc7f-ce86-4815-b4cb-cca9d05ba701"));
        portfolio.setPercentage(30.0);

                try {
            Portfolio result = apiInstance.createPortfolioUsingPost(portfolio);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createPortfolioUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Create Portfolio
$portfolio = new \com\hydrogen\nucleus\Model\Portfolio();

try {
    $portfolio->setAccountId("39febc7f-ce86-4815-b4cb-cca9d05ba701");
    $portfolio->setName("ABC");
    $portfolio->setPercentage("30");
    $result = $apiInstance->createPortfolioUsingPost($portfolio);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createPortfolioUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
#Create Portfolio
portfolio = NucleusApi::Portfolio.new

begin
  portfolio.account_id = "39febc7f-ce86-4815-b4cb-cca9d05ba701"
  portfolio.name = "ANdy"
  portfolio.percentage = "100"
  result = api_instance.create_portfolio_using_post(portfolio)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_portfolio_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Create a Portfolio
var portfolio = new HydrogenNucleusApi.Portfolio();
portfolio.account_id = '39febc7f-ce86-4815-b4cb-cca9d05ba701';
portfolio.name = "AN";
portfolio.percentage = "10";


var newportfolio = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createPortfolioUsingPost(portfolio, newportfolio)

Example Response

{
  "id": "04907eaa-3f33-49be-a35b-378cdf639fba",
  "create_date": "2018-01-01T21:56:03.000+0000",
  "description": "Portfolio 93 - Retirement Goal 1",
  "name": "Portfolio 93",
  "percentage": 100,
  "account_id": "04907eaa-3f33-49be-a35b-378cdf639fba",
  "model_id": "d5e3daf8-1ebf-4654-ac7a-2685502ec387",
  "account_number": null,
  "is_subledger": false,
  "status": null,
  "is_active": true,
  "metadata": {}
}

Create a new portfolio for an account. The account_id that the portfolio belongs to and the model_id to which the portfolio subscribes must be provided. To obtain the appropriate account_id, use the GET /account endpoint to view all accounts defined for your tenant. To obtain the appropriate model_id, use the GET /model endpoint to view all the models defined for your tenant. The create_date will default to the current date. The endpoint returns a portfolio_id used to manage the portfolio.

HTTP REQUEST

POST /portfolio

ARGUMENTS

Parameter Type Required Description
name string required Name of the portfolio such as “Debit Account”
account_id UUID required The id of the account to which the portfolio belongs
percentage double required Weight of the portfolio as a percentage of an account based on the weight of the portfolio’s model within the account’s allocation; ex. 20 representing 20%. If the account only has one portfolio input 100
model_id UUID optional The id of the model to which the portfolio subscribes
account_number string optional Account number for the portfolio if the portfolio represents a subledger under a master account. Differs from the id for the portfolio which is auto generated.
description string optional Description for the portfolio such as “Stock Portfolio”
currency_code string optional Alphabetic currency code for the base currency of the portfolio, limited to 3 characters. See currency codes
is_subledger boolean optional Indicates if the portfolio represents a subledger or subaccount under a master account for a banking account. Defaults to false which indicates that it is not a subledger
status string optional Status of the portfolio such as “Registered” or “Active”
is_active boolean optional Indicates if the portfolio is active. Defaults to true which indicates that it is currently active
metadata map optional Custom information associated with the portfolio in the format key:value. See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a portfolio

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio/04907eaa-3f33-49be-a35b-378cdf639fba"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_using_get("f2bec1bf-a472-4b85-864b-5de85f0ba525")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            Portfolio responsePortfolio = apiInstance.getPortfolioUsingGet(UUID.fromString("e87bbceb-70e0-4822-b8e6-93bf7a51cd57"));
            System.out.println(responsePortfolio);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$portfolio_id = "e87bbceb-70e0-4822-b8e6-93bf7a51cd57"; // string | UUID portfolio_id

try {
    $portfolio = $apiInstance->getPortfolioUsingGet($portfolio_id);
    print_r($portfolio);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
portfolio_id = 'e87bbceb-70e0-4822-b8e6-93bf7a51cd57' # String | UUID portfolio_id
begin
  #Retrieve a portfolio
  portfolio = api_instance.get_portfolio_using_get(portfolio_id)
  p portfolio
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var portfolioID = "e87bbceb-70e0-4822-b8e6-93bf7a51cd57";

var opts = {
    'currencyConversion': null, // String | USD
};

var portfolio = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getPortfolioUsingGet(portfolioID, portfolio)

Example Response

{
  "id": "04907eaa-3f33-49be-a35b-378cdf639fba",
  "create_date": "2018-01-01T21:56:03.000+0000",
  "update_date": "2018-01-15T21:56:03.000+0000",
  "description": "Portfolio 93 - Retirement Goal 1",
  "name": "Portfolio 93",
  "percentage": 100,
  "account_id": "04907eaa-3f33-49be-a35b-378cdf639fba",
  "model_id": "d5e3daf8-1ebf-4654-ac7a-2685502ec387",
  "account_number": null,
  "is_subledger": false,
  "status": null,
  "is_active": true,
  "metadata": {}
}

Retrieve a portfolio for an account. The portfolio_id must be provided. The endpoint returns the portfolio_id and the details for the portfolio specified.

HTTP REQUEST

GET /portfolio/{portfolio_id}

Update a portfolio

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
          "description": "Test Portfolio 1 Retirement",
          "name": "Test Portfolio 1",
          "percentage": 100,
          "account_id": "e281137e-748d-4f45-aaf1-ec91b90d7fe4",
          "model_id": "17b0323c-5a69-4d1e-a7b7-98c6d423148f",
          "metadata": {}
      }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio/04907eaa-3f33-49be-a35b-378cdf639fba"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Update a Portfolio
portfolio_update = {'currency_code': 'GBP'}
portfolio_id = '8e2a3acc-f01b-4b92-8823-0d2f03e1f94b'
try:
    api_response = api_instance.update_portfolio_using_put(portfolio_update, portfolio_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_portfolio_using_put: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
          //Update a Portfolio
        Map map = new HashMap();
        map.put("percentage", "40");

        try {
            Portfolio response = apiInstance.updatePortfolioUsingPut(map, UUID.fromString("d2de48cb-f25d-4277-b29d-ade138d1832e"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Update Portfolio
$portfolio_update = new stdClass();
$portfolio_id = "7e2a7ebb-0647-47a9-8b8c-03843c464750";

try {
    $portfolio_update->percentage = "50";
    $result = $apiInstance->updatePortfolioUsingPut($portfolio_update, $portfolio_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updatePortfolioUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
#Update Portfolio
portfolio_update = {"name" => 'USD'}
portfolio_id = 'c8890677-e8b7-45d7-b843-6d103e1658e3'
begin
  result = api_instance.update_portfolio_using_put(portfolio_update, portfolio_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_portfolio_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Update Portfolio
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var portfolioupdate = new HydrogenNucleusApi.Portfolio();
var portid = '02dd93a9-3ea0-40d4-8061-5a6bffd9ce99';

portfolioupdate.currency_code = "USD";
apiInstance.updatePortfolioUsingPut(portfolioupdate, portid, callback)

Example Response

{
  "id": "04907eaa-3f33-49be-a35b-378cdf639fba",
  "create_date": "2018-01-01T21:56:03.000+0000",
  "update_date": "2018-01-15T21:56:03.000+0000",
  "description": "Portfolio 93 - Retirement Goal 1",
  "name": "Portfolio 93",
  "percentage": 100,
  "account_id": "04907eaa-3f33-49be-a35b-378cdf639fba",
  "model_id": "d5e3daf8-1ebf-4654-ac7a-2685502ec387",
  "account_number": null,
  "is_subledger": false,
  "status": null,
  "is_active": true,
  "metadata": {}
}

Update a portfolio for an account. The portfolio_id must be provided. To obtain the appropriate portfolio_id, use the GET /portfolio endpoint to view all portfolios firm-wide and their current information. The details to be updated must also be provided. The endpoint returns the portfolio_id and the details for the portfolio.

HTTP REQUEST

PUT /portfolio/{portfolio_id}

Delete a portfolio

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio/04907eaa-3f33-49be-a35b-378cdf639fba"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # Delete a Portfolio
portfoilo1_id = '298257c3-4010-4ee7-9c1c-233a9eb85aee'
try:
    api_instance.delete_portfolio_using_delete(portfoilo1_id)
except ApiException as e:
    print("Exception when delete_portfolio_using_delete: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();

        //Delete a Portfolio
        try {
            Portfolio deleteresponse = apiInstance.deletePortfolioUsingDelete(UUID.fromString("49826337-2a05-4a10-a4ca-55743ffe54b4"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Delete Portfolio
$portfolio_did = "03313070-ee0b-4a13-b438-9c99f128ff61"; // string | UUID account_id

try {
    $apiInstance->deletePortfolioUsingDelete($portfolio_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deletePortfolioUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new

#Delete Portfolio
portfolio1_id = '1b460630-0e3f-48cb-a161-c133e7d621fe'
begin
  result = api_instance.delete_portfolio_using_delete(portfolio1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_portfolio_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
// //Delete a Portfolio
var portassetdid = "4e67302c-d6a4-454e-8dca-0982836e1953";


var deleteportfolioasset = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deletePortfolioAssetSizeUsingDelete(portassetdid, deleteportfolioasset)

Response (204 No Content)

Permanently delete a portfolio for an account. The portfolio_id must be provided. To obtain the appropriate portfolio_id, use the GET /portfolio endpoint to view all portfolios firm-wide. This deletes the portfolio_id and removes the portfolio record from the account entirely.

HTTP REQUEST

DELETE /portfolio/{portfolio_id}

Portfolio Asset Sizes

Portfolio asset sizes represent the total monetary value or balance of the portfolio, including negative values. Asset sizes are used to track the progression of the portfolio. Asset size records are created at a portfolio level and aggregated at an account, client, and goal level.

Field Type Description
id UUID The id of the portfolio asset size record
date timestamp Timestamp for this asset size record
asset_size double Monetary value of the portfolio on a particular date, such as the current “balance” of a bank account or investment account. Value may be negative or positive
asset_size_available double Available monetary value of the portfolio on a particular date. This most often corresponds to the “available balance” of a bank account. Value may be be negative or positive
asset_size_pending double Pending monetary value of the portfolio on a particular date. This most often corresponds to the “pending balance” of a bank account. Value may be be negative or positive
cash_flow double Net monetary value that has flowed in or out of the portfolio since the last asset size date, usually via deposits or withdrawals. Can be negative or positive
portfolio_id UUID The id of the portfolio that the asset size record corresponds to
model_id UUID The id of the model to which the portfolio subscribes. Derived from the portfolio
account_id UUID The id of the account that the portfolio corresponds to. Derived from the portfolio
currency_code string Alphabetic currency code for the base currency of the assets, limited to 3 characters. See currency codes
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all portfolio asset sizes

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_asset_size"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_asset_size_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_asset_size_all_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            PagePortfolioAssetSizeLog List = apiInstance.getPortfolioAssetSizeAllUsingGet(true, null, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioAssetSizeAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $portfolioassetsizelist = $apiInstance->getPortfolioAssetSizeAllUsingGet($ascending, $currency_conversion, $filter, $order_by, $page, $size);
    print_r($portfolioassetsizelist);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioAssetSizeAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | currency_conversion
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  assetsizelist = api_instance.get_portfolio_asset_size_all_using_get(opts)
  p assetsizelist
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_asset_size_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var opts = {
    'ascending': false, // Boolean | ascending
    'currencyConversion': null, // String | currency_conversion
    'filter': null, // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var portfolioassetlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};

apiInstance.getPortfolioAssetSizeAllUsingGet(opts, portfolioassetlist)

Example Response

{
    "content": [
        {
            "id": "01b252d3-1412-477f-8d29-6e2ff6e54c81",
            "create_date": "2018-02-02T9:00:03.000+0000",
            "update_date": "2018-02-02T21:56:03.000+0000",
            "cash_flow": -50,
            "asset_size": 89160,
            "asset_size_available": null,
            "asset_size_pending": null,
            "date": "2018-02-02T00:00:00.000+0000",
            "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "portfolio_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "model_id": "9875ce25-82fe-4db5-90b2-2e0fa1f8791d",
            "currency_code": "USD"
        },
        {
            "id": "63ffef5e-1962-477a-9803-bc6a334d142c",
            "create_date": "2018-01-26T9:00:03.000+0000",
            "update_date": "2018-01-26T21:56:03.000+0000",
            "cash_flow": 100,
            "asset_size": 88250,
            "asset_size_available": null,
            "asset_size_pending": null,
            "date": "2018-01-25T00:00:00.000+0000",
            "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "portfolio_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "model_id": "9875ce25-82fe-4db5-90b2-2e0fa1f8791d",
            "currency_code": "USD"
        },
        {
            "id": "013380bf-7f17-44c1-93c5-892a7ed3498c",
            "create_date": "2018-01-22T9:00:03.000+0000",
            "update_date": "2018-01-22T21:56:03.000+0000",
            "cash_flow": 0,
            "asset_size": 39050,
            "asset_size_available": null,
            "asset_size_pending": null,
            "date": "2018-01-22T00:00:00.000+0000",
            "account_id": "eb3d7f60-a133-4ca9-815f-3677bcdc23a3",
            "portfolio_id": "eb3d7f60-a133-4ca9-815f-3677bcdc23a3",
            "model_id": "4ff21db3-97ab-4bbd-9885-be6aec522c44",
            "currency_code": "USD"
        }
    ],
    "last": false,
    "total_pages": 3,
    "total_elements": 3,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 3,
    "size": 25,
    "number": 0
}

Get a list of asset sizes per date for all portfolios defined for your tenant. The endpoint returns a list of portfolio_asset_size_ids and the details for each asset size. You can filter using a portfolio_id to view the asset size records for a specific portfolio. To obtain the appropriate portfolio_id use the GET /portfolio endpoint to view portfolios firm-wide.

HTTP REQUEST

GET /portfolio_asset_size

Create a portfolio asset size

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
          "cash_flow": -50,
          "asset_size": 89160,
          "date": "2018-02-02",
          "portfolio_id": "fbc03484-08e8-446d-83aa-6d6cc236355e"
      }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio_asset_size"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # Create a PortfolioAssetSize
portfolio_asset = nucleus_api.PortfolioAssetSizeLog(_date="2020-10-10", asset_size="100", cash_flow="300", portfolio_id="b44d84ad-b1b2-463e-9ba8-b20523dd3e7a", account_id="ae66a845-cfe1-4402-9b0a-3aed87b33e29", model_id="b65c005a-f62f-4b0e-9528-b47f343fa049")
try:
    api_response = api_instance.create_portfolio_asset_size_using_post(portfolio_asset)
    pprint(api_response)
except ApiException as e:
    print("create_portfolio_asset_size_using_post: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Create Portfolio Asset Size
        PortfolioAssetSizeLog assetsize = new PortfolioAssetSizeLog();
        assetsize.setDate(odt);
        assetsize.setAssetSize(300.00);
        assetsize.setCashFlow(2000.0);
        assetsize.setPortfolioId(UUID.fromString("b44d84ad-b1b2-463e-9ba8-b20523dd3e7a"));

                        try {
            PortfolioAssetSizeLog result = apiInstance.createPortfolioAssetSizeUsingPost(assetsize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createPortfolioAssetSizeUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Create PortfolioAsset
$portfolio_asset = new \com\hydrogen\nucleus\Model\PortfolioAssetSizeLog();

try {
    $portfolio_asset->setPortfolioId('b44d84ad-b1b2-463e-9ba8-b20523dd3e7a');
    $portfolio_asset->setDate("2020-10-10");
    $portfolio_asset->setAssetSize("200");
    $portfolio_asset->setCashFlow("300");
    $result = $apiInstance->createPortfolioAssetSizeUsingPost($portfolio_asset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createPortfolioAssetSizeUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new

#Create Portfolio Asset Size
portfolio_asset = NucleusApi::PortfolioAssetSizeLog.new

begin
  portfolio_asset.portfolio_id = "b44d84ad-b1b2-463e-9ba8-b20523dd3e7a"
  portfolio_asset.date = "2020-10-10"
  portfolio_asset.asset_size = "300"
  portfolio_asset.cash_flow = "400"
  result = api_instance.create_portfolio_asset_size_using_post(portfolio_asset)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_portfolio_asset_size_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Create a PortfolioAsetSize
var portfolioasset = new HydrogenNucleusApi.PortfolioAssetSizeLog();
portfolioasset.portfolio_id = 'b44d84ad-b1b2-463e-9ba8-b20523dd3e7a';
portfolioasset.cash_flow = "300";
portfolioasset.asset_size = "30";
portfolioasset.date = "2020-11-10";


var newportfolioasset = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createPortfolioAssetSizeUsingPost(portfolioasset, newportfolioasset)

Example Response

{
  "id": "01b252d3-1412-477f-8d29-6e2ff6e54c81",
  "create_date": "2018-02-02T9:00:03.000+0000",
  "cash_flow": -50,
  "asset_size": 89160,
  "asset_size_available": null,
  "asset_size_pending": null,
  "date": "2018-02-02T00:00:00.000+0000",
  "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
  "portfolio_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
  "model_id": "9875ce25-82fe-4db5-90b2-2e0fa1f8791d"
}

Create a new asset size record for a portfolio. The unique portfolio_id must be provided, which will automatically pass in the model_id and account_id assigned to the portfolio. To obtain the appropriate portfolio_id, use the GET /portfolio endpoint to view all the portfolios defined for your tenant. The endpoint returns a portfolio_asset_size_id id used to manage the asset size record.

HTTP REQUEST

POST /portfolio_asset_size

ARGUMENTS

Parameter Type Required Description
date timestamp required Timestamp for this asset size record
asset_size double required Monetary value of the portfolio on a particular date, such as the current “balance” of a bank account or investment account. Value may be negative or positive
asset_size_available double optional Available monetary value of the portfolio on a particular date. This most often corresponds to the “available balance” of a bank account. Value may be be negative or positive
asset_size_pending double optional Pending monetary value of the portfolio on a particular date. This most often corresponds to the “pending balance” of a bank account. Value may be be negative or positive
cash_flow double required Net monetary value that has flowed in or out of the portfolio since the last asset size date, usually via deposits or withdrawals. Can be negative or positive.
portfolio_id UUID required The id of the portfolio that the asset size record corresponds to
currency_code string optional Alphabetic currency code for the base currency of the assets, limited to 3 characters. See currency codes
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a portfolio asset size

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_asset_size/01b252d3-1412-477f-8d29-6e2ff6e54c81"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_asset_size_using_get("ccd4c432-a660-4c9c-8d81-ecb2b9cb845a")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_asset_size_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            PortfolioAssetSizeLog responseAssetSize = apiInstance.getPortfolioAssetSizeUsingGet(UUID.fromString("96093f31-bab2-4c0e-a71b-f5925d9b2ef1"), null);
            System.out.println(responseAssetSize);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioAssetSizeUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$portfolio_asset_size_id = "96093f31-bab2-4c0e-a71b-f5925d9b2ef1"; // string | portfolio_asset_size_id
$currency_conversion = null; // string | currency_conversion

try {
    $portfolioassetsize = $apiInstance->getPortfolioAssetSizeUsingGet($portfolio_asset_size_id, $currency_conversion);
    print_r($portfolioassetsize);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioAssetSizeUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
portfolio_asset_size_id = '96093f31-bab2-4c0e-a71b-f5925d9b2ef1' # String | portfolio_asset_size_id

opts = {
    currency_conversion: null, # String | currency_conversion
}

begin
  assetsize = api_instance.get_portfolio_asset_size_using_get(portfolio_asset_size_id, opts)
  p assetsize
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_asset_size_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var portfolioassetSizeID = "96093f31-bab2-4c0e-a71b-f5925d9b2ef1";

var opts = {
    'currencyConversion': null, // String | USD
};

var portfolioasset = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getPortfolioAssetSizeUsingGet(portfolioassetSizeID, opts, portfolioasset)

Example Response

{
  "id": "01b252d3-1412-477f-8d29-6e2ff6e54c81",
  "create_date": "2018-02-02T9:00:03.000+0000",
  "update_date": "2018-02-02T21:56:03.000+0000",
  "cash_flow": -50,
  "asset_size": 89160,
  "asset_size_available": null,
  "asset_size_pending": null,
  "date": "2018-02-02T00:00:00.000+0000",
  "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
  "portfolio_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
  "model_id": "9875ce25-82fe-4db5-90b2-2e0fa1f8791d"
}

Retrieve the information for a portfolio asset size record. The portfolio_asset_size_id must be provided. The endpoint returns the portfolio_asset_size_id and the details for the portfolio asset size record specified.

HTTP REQUEST

GET /portfolio_asset_size/{portfolio_asset_size_id}

Update a portfolio asset size

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
            "cash_flow": -50,
            "asset_size": 89160,
            "date": "2018-02-02",
            "portfolio_id": "fbc03484-08e8-446d-83aa-6d6cc236355e"
        }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio_asset_size/01b252d3-1412-477f-8d29-6e2ff6e54c81"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Update a PortfolioAssetSize
portfolio_asset_update = {'currency_code': 'GBP'}
portfolio_asset_id = 'a2f57cdf-db19-4ec1-b4be-a133bfbc2832'
try:
    api_response = api_instance.update_portfolio_asset_size_using_put(portfolio_asset_update, portfolio_asset_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_portfolio_asset_size_using_put: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Update a Portfolio AssetSize
        Map map1 = new HashMap();
        map1.put("cash_flow", "3000");

        try {
            PortfolioAssetSizeLog response = apiInstance.updatePortfolioAssetSizeUsingPut(map1, UUID.fromString("490367a5-cc20-4126-838b-0fd7e83810bc"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Update Portfolio Asset
$portfolio_asset_update = new stdClass();
$portfolio_asset_id = "490367a5-cc20-4126-838b-0fd7e83810bc";

try {
    $portfolio_asset_update->cash_flow = "400";
    $result = $apiInstance->updatePortfolioAssetSizeUsingPut($portfolio_asset_update, $portfolio_asset_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updatePortfolioAssetSizeUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
#Update Portfolio AssetSIze
portfolio_asset_update = {"currency_code" => 'USD'}
portfolio_asset_id = '5de9d2e5-061c-4e7f-a76b-5520cc64dbd7'
begin
  result = api_instance.update_portfolio_asset_size_using_put(portfolio_asset_update, portfolio_asset_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_portfolio_asset_size_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Create a PortfolioAsetSize
var portfolioasset = new HydrogenNucleusApi.PortfolioAssetSizeLog();
//Update PortfolioAsset
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var portfolioassetupdate = new HydrogenNucleusApi.PortfolioAssetSizeLog();
var portassetid = '0fdaddd5-24ba-4e89-92e4-b1ae3514b7d5';

portfolioassetupdate.currency_code = "USD";
apiInstance.updatePortfolioAssetSizeUsingPut(portfolioassetupdate, portassetid, callback)

Example Response

{
  "id": "01b252d3-1412-477f-8d29-6e2ff6e54c81",
  "create_date": "2018-02-02T9:00:03.000+0000",
  "update_date": "2018-02-02T21:56:03.000+0000",
  "cash_flow": -50,
  "asset_size": 89160,
  "asset_size_available": null,
  "asset_size_pending": null,
  "date": "2018-02-02T00:00:00.000+0000",
  "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
  "portfolio_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
  "model_id": "9875ce25-82fe-4db5-90b2-2e0fa1f8791d"
}

Update the information for a portfolio asset size record. The portfolio_asset_size_id must be provided. To obtain the appropriate portfolio_asset_size_id use the GET /portfolio_asset_size endpoint to view all portfolio asset size records and their current information. The details to be updated must also be provided. The endpoint returns the portfolio_asset_size_id and the details for the portfolio asset size record.

HTTP REQUEST

PUT /portfolio_asset_size/{portfolio_asset_size_id}

Delete a portfolio asset size

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_asset_size/01b252d3-1412-477f-8d29-6e2ff6e54c81"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Delete a PortfolioAssetSize
portfoiloasset1_id = '14e4e3a8-78cf-46d2-bb99-bb79358c8aeb'
try:
    api_instance.delete_portfolio_asset_size_using_delete(portfoiloasset1_id)
except ApiException as e:
    print("Exception when delete_portfolio_asset_size_using_delete: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Delete a PortfolioAssetSize
        try {
            PortfolioAssetSizeLog deleteresponse = apiInstance.deletePortfolioAssetSizeUsingDelete(UUID.fromString("415153f3-e4b7-47db-8ba0-aa85569d41ad"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
// //Delete a Portfolio
var portassetdid = "4e67302c-d6a4-454e-8dca-0982836e1953";


var deleteportfolioasset = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deletePortfolioAssetSizeUsingDelete(portassetdid, deleteportfolioasset)
api_instance = NucleusApi::PortfolioApi.new

#Delete Portfolio Asset
portfolio_asset1_id = 'cb92ada8-2c57-4d94-a217-b34a0d83cb0f'
begin
  result = api_instance.delete_portfolio_asset_size_using_delete(portfolio_asset1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_portfolio_asset_size_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Create a PortfolioAsetSize
var portfolioasset = new HydrogenNucleusApi.PortfolioAssetSizeLog();
//Update PortfolioAsset
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var portfolioassetupdate = new HydrogenNucleusApi.PortfolioAssetSizeLog();
var portassetid = '0fdaddd5-24ba-4e89-92e4-b1ae3514b7d5';

portfolioassetupdate.currency_code = "USD";
apiInstance.updatePortfolioAssetSizeUsingPut(portfolioassetupdate, portassetid, callback)

Response (204 No Content)

Permanently delete a portfolio asset size record. The portfolio_asset_size_id must be provided. To obtain the appropriate portfolio_asset_size_id use the GET /portfolio_asset_size endpoint to view all portfolio asset size records. This deletes the portfolio_asset_size_id and the details of the portfolio asset size record from the portfolio.

HTTP REQUEST

DELETE /portfolio_asset_size/{portfolio_asset_size_id}

Portfolio Transactions

Transactions represent the debits or credits to cards. Transactions are created at a portfolio level and aggregated at an account, client, and goal level.

Field Type Description
id UUID The id of the portfolio transaction record
portfolio_id UUID The id of the portfolio that the transaction record relates to
funding_id UUID The id of the funding request that the transaction record relates to
security_id UUID The id of the security that was bought or sold in the transaction. If the portfolio is for a bank account and no security is being bought such as a money market fund, then leave empty, or optionally create a “CASH” security
transaction_code_id UUID The id of the transaction code for the type of transaction
date timestamp Timestamp when the transaction occurred
date_available timestamp Timestamp when the transaction becomes available
price double Price at which the security was bought or sold
quantity double Quantity of units of a security that were bought or sold
currency_code string Alphabetic currency code for the transaction, limited to 3 characters. See currency codes
amount double Amount of the transaction
balance double Updated balance of the portfolio as a result of the transaction
merchant_id UUID ID of the merchant resource for the transaction
mid string Acquirer ID of the merchant (MID) for the transaction
merchant string The merchant for the transaction such as the merchant posted for a credit or debit card charge
merchant_category_code string The MCC Code for the merchant as identified by the card network
transaction_category_id string ID of the category resource for the transaction
category string Category of the transaction
subcategory string Subcategory of the transaction
description string Description of the transaction
memo string Memo attached to the transaction
status string Status of the transaction
location map Location where the transaction occurred
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      latitude double Latitude of the location where the transaction occurred
      longitude double Longitude of the location where the transaction occurred
model_id UUID The id of the model to which the portfolio subscribes. Derived from the portfolio
account_id UUID The id of the account that the portfolio falls under. Derived from the portfolio
check map Check associated with the banking transaction
      check_number string Number on the check such as “1234”
      check_amount double Monetary amount of the check
      check_images map Image(s) of the scanned check(s)
            image_url string URL where the image can be displayed
            image_type string Type of image for the check such as “png” or “jpeg”
is_cleansed boolean Indicates if the transaction has been cleansed by a data cleansing engine. Defaults to false which indicates that it has not been cleansed
is_read boolean Indicates if the transaction has been read. Defaults to false which indicates that it has not been read
is_recurring boolean Indicates if the transaction is recurring such as a subscription. Defaults to false which indicates that it is not recurring
is_disputed boolean Indicates if the transaction is disputed by the client. Defaults to false which indicates that it is not disputed
metadata map Custom information associated with the portfolio transaction in the format key:value. See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all portfolio transactions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_transaction"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_transaction_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_transaction_all_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            PagePortfolioTransaction List = apiInstance.getPortfolioTransactionAllUsingGet(true, null, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioTransactionAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $portfoliotransactionlist = $apiInstance->getPortfolioTransactionAllUsingGet($ascending, $currency_conversion, $filter, $order_by, $page, $size);
    print_r($portfoliotransactionlist);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioTransactionAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | currency_conversion
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  transactionlist = api_instance.get_portfolio_transaction_all_using_get(opts)
  p transactionlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_transaction_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var opts = {
    'ascending': false, // Boolean | ascending
    'currencyConversion': null, // String | currency_conversion
    'filter': null, // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var portfoliotransactionlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};

apiInstance.getPortfolioTransactionAllUsingGet(opts, portfoliotransactionlist)

Example Response

{
    "content": [
        {
            "id": "099961da-7f41-4309-950f-2b51689a0033",
            "create_date": "2018-01-01T9:00:03.000+0000",
            "update_date": "2018-01-05T21:56:03.000+0000",
            "date": "2018-01-02T00:00:00.000+0000",
            "date_available": null,
            "is_recurring": false,
            "is_disputed": false,
            "is_cleansed": false,
            "is_read": false,
            "price": 1,
            "quantity": 9000,
            "currency_code": null,
            "amount": null,
            "balance": null,
            "merchant_id": null,
            "mid": null,
            "merchant": null,
            "merchant_category_code": null,
            "transaction_category_id": null,
            "category": null,
            "subcategory": null,
            "description": null,
            "memo": null,
            "status": null,
            "location": {},
            "check": {},
            "funding_id": null,
            "security_id": "9679fd84-f6d5-44f9-bba9-a5fcb1b8b028",
            "transaction_code_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
            "portfolio_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "model_id": "feb846da-a06d-402e-a3bb-abc7260f7138",
            "metadata": {}
        },
        {
            "id": "107516c3-9035-4811-af7c-501be5a1fe26",
            "create_date": "2018-01-02T9:00:03.000+0000",
            "update_date": "2018-01-08T21:56:03.000+0000",
            "date": "2018-01-02T00:00:00.000+0000",
            "date_available": null,
            "is_recurring": false,
            "is_disputed": false,
            "is_cleansed": false,
            "is_read": false,
            "price": 60,
            "quantity": 133.33,
            "currency_code": null,
            "amount": null,
            "balance": null,
            "merchant_id": null,
            "mid": null,
            "merchant": null,
            "merchant_category_code": null,
            "transaction_category_id": null,
            "category": null,
            "subcategory": null,
            "description": null,
            "memo": null,
            "status": null,
            "location": {},
            "check": {},
            "funding_id": null,
            "security_id": "36a4b748-8a63-49a2-950f-deaa240c63d1",
            "transaction_code_id": "62fd0a9f-4bac-4b1d-94d2-2c5ea2adca3d",
            "portfolio_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
            "account_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
            "model_id": "21098ed9-6439-46ba-abd9-eb6cf28866fb",
            "metadata": {}
        },
        {
            "id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
            "create_date": "2018-01-02T9:00:03.000+0000",
            "update_date": "2018-01-08T21:56:03.000+0000",
            "date": "2018-01-02T00:00:00.000+0000",
            "date_available": null,
            "is_recurring": false,
            "is_disputed": false,
            "is_cleansed": false,
            "is_read": false,
            "price": 30,
            "quantity": 280,
            "currency_code": null,
            "amount": null,
            "balance": null,
            "merchant_id": null,
            "mid": null,
            "merchant": null,
            "merchant_category_code": null,
            "transaction_category_id": null,
            "category": null,
            "subcategory": null,
            "description": null,
            "memo": null,
            "status": null,
            "location": {},
            "check": {},
            "funding_id": null,
            "security_id": "7853af80-8d42-4bbb-bc06-00eda88a668e",
            "transaction_code_id": "62fd0a9f-4bac-4b1d-94d2-2c5ea2adca3d",
            "portfolio_id": "bab849d6-de96-4dc7-a5ea-19be45c52a4e",
            "account_id": "bab849d6-de96-4dc7-a5ea-19be45c52a4e",
            "model_id": "40a4bd78-d798-49f7-b1e8-35144c82e35e",
            "metadata": {}
        }
    ],
    "last": false,
    "total_pages": 1,
    "total_elements": 3,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 3,
    "size": 25,
    "number": 0
}

Get the information for all transaction records for all portfolios defined for your tenant. The endpoint returns a list of portfolio_transaction_ids and the details for each transaction record. You can filter using a portfolio_id to view the transaction records for a specific portfolio. You can also provide a date range to view the transactions on the dates within that range. To obtain the appropriate portfolio_id use the GET /portfolio endpoint to view portfolios firm-wide.

HTTP REQUEST

GET /portfolio_transaction

Create a portfolio transaction

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
            "date": "2018-01-02",
            "is_read": false,
            "price": 1,
            "quantity": 9000,
            "security_id": "9679fd84-f6d5-44f9-bba9-a5fcb1b8b028",
            "transaction_code_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
            "portfolio_id": "647c54c3-b649-477e-8cc7-eee56a120dd3"
      }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio_transaction"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Create a PortfolioTransaction
check = nucleus_api.Check(check_number="5646686")
portfolio_transaction = nucleus_api.PortfolioTransaction(portfolio_id="b44d84ad-b1b2-463e-9ba8-b20523dd3e7a", _date="2020-10-10", transaction_code_id="56cd03e2-978e-4c16-a004-9564960bc4ac", account_id="ae66a845-cfe1-4402-9b0a-3aed87b33e29", model_id="b65c005a-f62f-4b0e-9528-b47f343fa049", check=check)
try:
    api_response = api_instance.create_portfolio_transaction_using_post(portfolio_transaction)
    pprint(api_response)
except ApiException as e:
    print("create_portfolio_transaction_using_post: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Create a Portfolio Transaction
        PortfolioTransaction transaction = new PortfolioTransaction();
        transaction.setPortfolioId(UUID.fromString("b44d84ad-b1b2-463e-9ba8-b20523dd3e7a"));
        transaction.setDate(odt);
        transaction.setTransactionCodeId(UUID.fromString("56cd03e2-978e-4c16-a004-9564960bc4ac"));

        try {
            PortfolioTransaction response = apiInstance.createPortfolioTransactionUsingPost(transaction);
            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling createPortfolioTransactionUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Create Portfolio Transaction
$portfolio_transaction = new \com\hydrogen\nucleus\Model\PortfolioTransaction();

try {
    $portfolio_transaction->setPortfolioId("b44d84ad-b1b2-463e-9ba8-b20523dd3e7a");
    $portfolio_transaction->setDate("2020-10-10");
    $portfolio_transaction->setTransactionCodeId("56cd03e2-978e-4c16-a004-9564960bc4ac");
    $result = $apiInstance->createPortfolioTransactionUsingPost($portfolio_transaction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createPortfolioTransactionUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
#Create Portfolio Transaction
portfolio_transaction = NucleusApi::PortfolioTransaction.new

begin
  portfolio_transaction.portfolio_id = "b44d84ad-b1b2-463e-9ba8-b20523dd3e7a"
  portfolio_transaction.transaction_code_id = "56cd03e2-978e-4c16-a004-9564960bc4ac"
  portfolio_transaction.date = '2020-10-10'
  result = api_instance.create_portfolio_transaction_using_post(portfolio_transaction)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_portfolio_transaction_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Create a PortfolioTransaction
var portfoliotransaction = new HydrogenNucleusApi.PortfolioTransaction();
portfoliotransaction.portfolio_id = 'b44d84ad-b1b2-463e-9ba8-b20523dd3e7a';
portfoliotransaction.transaction_code_id = '56cd03e2-978e-4c16-a004-9564960bc4ac';
portfoliotransaction.date = "2020-10-10";



var newportfoliotransaction = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createPortfolioTransactionUsingPost(portfoliotransaction, newportfoliotransaction)

Example Response

{
  "id": "099961da-7f41-4309-950f-2b51689a0033",
  "create_date": "2018-01-01T9:00:03.000+0000",
  "update_date": "2018-01-05T21:56:03.000+0000",
  "date": "2018-01-02T00:00:00.000+0000",
  "date_available": null,
  "is_recurring": false,
  "is_disputed": false,
  "is_cleansed": false,
  "is_read": false,
  "price": 1,
  "quantity": 9000,
  "currency_code": null,
  "amount": null,
  "balance": null,
  "merchant_id": null,
  "merchant": null,
  "merchant_category_code": null,
  "transaction_category_id": null,
  "category": null,
  "subcategory": null,
  "description": null,
  "memo": null,
  "status": null,
  "location": {},
  "check": {},
  "security_id": "9679fd84-f6d5-44f9-bba9-a5fcb1b8b028",
  "transaction_code_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
  "portfolio_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "model_id": "feb846da-a06d-402e-a3bb-abc7260f7138",
  "metadata": {}
}

Create a new transaction record for a portfolio. The unique portfolio_id must be provided, which will automatically pass in the model_id and account_id assigned to the portfolio. To obtain the appropriate portfolio_id, use the GET /portfolio endpoint to view all the portfolios defined for your tenant. The endpoint returns a portfolio_transaction_id used to manage the transaction record.

HTTP REQUEST

POST /portfolio_transaction

ARGUMENTS

Parameter Type Required Description
portfolio_id UUID required The id of the portfolioo that the transaction record relates to
transaction_code_id UUID required The id of the transaction code for the type of transaction
date timestamp required Timestamp when the transaction occurred
date_available timestamp optional Timestamp when the transaction becomes available
funding_id UUID optional The id of the funding request that the transaction record relates to
security_id UUID optional The id of the security that was bought or sold in the transaction. If the portfolio is for a bank account and no security is being bought such as a money market fund, then leave empty, or optionally create a “CASH” security
price double optional Price at which the security was bought or sold
quantity double optional Quantity of units of a security that were bought or sold
currency_code string optional Alphabetic currency code for the transaction, limited to 3 characters. See currency codes
amount double optional Amount of the transaction
balance double optional Updated balance of the portfolio as a result of the transaction
merchant_id UUID optional ID of the merchant resource for the transaction
merchant string optional The merchant for the transaction such as the merchant posted for a credit or debit card charge
merchant_category_code string optional The MCC Code for the merchant as identified by the card network
transaction_category_id string optional ID of the category resource for the transaction
category string optional Category of the transaction
subcategory string optional Subcategory of the transaction
description string optional Description of the transaction
memo string optional Memo attached to the transaction
status string optional Status of the transaction
location map optional Location where the transaction occurred
      address_line1 string optional Primary information for the street address, such as the street and building number
      address_line2 string optional Secondary information for the street address, such as a suite or apartment number
      city string optional City for the address
      state string optional State, province, or sub-country region for the address
      postalcode string optional Alphanumeric postal code or zip code for the address
      country string optional Country for the address using the ISO ALPHA-2 Code. See country codes
      latitude double optional Latitude of the location where the transaction occurred
      longitude double optional Longitude of the location where the transaction occurred
check map optional Check associated with the banking transaction
      check_number string required Number on the check such as “1234”
      check_amount double optional Monetary amount of the check
      check_images map optional Image(s) of the scanned check(s)
            image_url string required URL where the image can be displayed
            image_type string optional Type of image for the check such as “png” or “jpeg”
is_cleansed boolean optional Indicates if the transaction has been cleansed by a data cleansing engine. Defaults to false which indicates that it has not been cleansed
is_read boolean optional Indicates if the transaction has been read. Defaults to false which indicates that it has not been read
is_recurring boolean optional Indicates if the transaction is recurring such as a subscription. Defaults to false which indicates that it is not recurring
is_disputed boolean optional Indicates if the transaction is disputed by the client. Defaults to false which indicates that it is not disputed
metadata map optional Custom information associated with the portfolio transaction in the format key:value. See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a portfolio transaction

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_transaction/099961da-7f41-4309-950f-2b51689a0033"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_transaction_using_get("7cbaffc3-8f6c-4dda-934e-0347b3a7eafc")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_transaction_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            PortfolioTransaction responseTransaction = apiInstance.getPortfolioTransactionUsingGet(UUID.fromString("51d4a4be-3a54-4f45-9aff-65f155a18040"), null);
            System.out.println(responseTransaction);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioTransactionUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$portfolio_transaction_id = "51d4a4be-3a54-4f45-9aff-65f155a18040"; // string | UUID portfolio_transaction_id
$currency_conversion = null; // string | USD

try {
    $portfoliotransaction = $apiInstance->getPortfolioTransactionUsingGet($portfolio_transaction_id, $currency_conversion);
    print_r($portfoliotransaction);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioTransactionUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
portfolio_transaction_id = '51d4a4be-3a54-4f45-9aff-65f155a18040' # String | UUID portfolio_transaction_id

opts = {
    currency_conversion: null # String | USD
}

begin
  transaction = api_instance.get_portfolio_transaction_using_get(portfolio_transaction_id, opts)
  p transaction
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_transaction_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var portfoliotransactionID = "51d4a4be-3a54-4f45-9aff-65f155a18040";

var opts = {
    'currencyConversion': null, // String | USD
};

var portfolitransaction = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getPortfolioTransactionUsingGet(portfoliotransactionID, opts, portfolitransaction)

Example Response

{
  "id": "099961da-7f41-4309-950f-2b51689a0033",
  "create_date": "2018-01-01T9:00:03.000+0000",
  "update_date": "2018-01-05T21:56:03.000+0000",
  "date": "2018-01-02T00:00:00.000+0000",
  "date_available": null,
  "is_recurring": false,
  "is_disputed": false,
  "is_cleansed": false,
  "is_read": false,
  "price": 1,
  "quantity": 9000,
  "currency_code": null,
  "amount": null,
  "balance": null,
  "merchant_id": null,
  "merchant": null,
  "merchant_category_code": null,
  "transaction_category_id": null,
  "category": null,
  "subcategory": null,
  "description": null,
  "memo": null,
  "status": null,
  "location": {},
  "check": {},
  "security_id": "9679fd84-f6d5-44f9-bba9-a5fcb1b8b028",
  "transaction_code_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
  "portfolio_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "model_id": "feb846da-a06d-402e-a3bb-abc7260f7138",
  "metadata": {}
}

Retrieve the information for a portfolio transaction record. The portfolio_transaction_id must be provided. The endpoint returns the portfolio_transaction_id and the details for the portfolio transaction record specified.

HTTP REQUEST

GET /portfolio_transaction/{portfolio_transaction_id}

Update a portfolio transaction

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
              "date": "2018-01-02",
              "is_read": false,
              "price": 1,
              "quantity": 9000,
              "security_id": "9679fd84-f6d5-44f9-bba9-a5fcb1b8b028",
              "transaction_code_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
              "portfolio_id": "647c54c3-b649-477e-8cc7-eee56a120dd3"
        }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio_transaction/099961da-7f41-4309-950f-2b51689a0033"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Update a PortfolioTransaction
portfolio_transaction_update = {'currency_code': 'USD'}
portfolio_transaction_id = '1263d086-7374-4d48-9f2e-67b7069fcea2'
try:
    api_response = api_instance.update_portfolio_transaction_using_put(portfolio_transaction_update, portfolio_transaction_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_portfolio_transaction_using_put: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Update a Portfolio Transaction
        Map map5 = new HashMap();
        map5.put("is_read", "true");

        try {
            PortfolioTransaction response = apiInstance.updatePortfolioTransactionUsingPut(map5, UUID.fromString("d8afa26b-74d2-4740-969e-fec2c72c7ffe"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Update Portfolio Transaction
$portfolio_transaction_update = new stdClass();
$portfolio_transaction_id = "d8e18d0e-d9bb-4827-b1cf-f4489de83275";

try {
    $portfolio_transaction_update->date = "2020-10-10";
    $result = $apiInstance->updatePortfolioTransactionUsingPut($portfolio_transaction_update, $portfolio_transaction_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updatePortfolioTransactionUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
#Update Portfolio Transaction
portfolio_transaction_update = {"price" => '202'}
portfolio_transaction_id = 'a5abf725-c44b-4b3c-acfb-0dbb6b1d8ff6'
begin
  result = api_instance.update_portfolio_transaction_using_put(portfolio_transaction_update, portfolio_transaction_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_portfolio_transaction_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
// //Update PortfolioTransaction
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var portfoliotransupdate = new HydrogenNucleusApi.PortfolioTransaction();
var porttransid = '262b7bb8-187f-4f5d-b2c8-d2e0472f3554';

portfoliotransupdate.currency_code = "CAD";
apiInstance.updatePortfolioTransactionUsingPut(portfoliotransupdate, porttransid, callback)

Example Response

{
  "id": "099961da-7f41-4309-950f-2b51689a0033",
  "create_date": "2018-01-01T9:00:03.000+0000",
  "update_date": "2018-01-05T21:56:03.000+0000",
  "date": "2018-01-02T00:00:00.000+0000",
  "date_available": null,
  "is_recurring": false,
  "is_disputed": false,
  "is_cleansed": false,
  "is_read": false,
  "price": 1,
  "quantity": 9000,
  "currency_code": null,
  "amount": null,
  "balance": null,
  "merchant_id": null,
  "merchant": null,
  "merchant_category_code": null,
  "transaction_category_id": null,
  "category": null,
  "subcategory": null,
  "description": null,
  "memo": null,
  "status": null,
  "location": {},
  "check": {},
  "security_id": "9679fd84-f6d5-44f9-bba9-a5fcb1b8b028",
  "transaction_code_id": "a65929b6-b0a9-46e5-858a-121f0b10f4fb",
  "portfolio_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "model_id": "feb846da-a06d-402e-a3bb-abc7260f7138",
  "metadata": {}
}

Update the information for a portfolio transaction record. The portfolio_transaction_id must be provided. To obtain the appropriate portfolio_transaction_id use the GET /portfolio_transaction endpoint to view all portfolio transaction records and their current information. The details to be updated must also be provided. The endpoint returns the portfolio_transaction_id and the details for the portfolio transaction record.

HTTP REQUEST

PUT /portfolio_transaction/{portfolio_transaction_id}

Delete a portfolio transaction

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_transaction/099961da-7f41-4309-950f-2b51689a0033"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Delete a PortfolioTransaction
portfolioTransaction1_id = 'ff1cb9e1-9861-48b3-9c2a-d8127aa0efef'
try:
    api_instance.delete_portfolio_transaction_using_delete(portfolioTransaction1_id)
except ApiException as e:
    print("Exception when delete_portfolio_transaction_using_delete: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Delete a PortfolioTransaction
        try {
            PortfolioTransaction deleteresponse = apiInstance.deletePortfolioTransactionUsingDelete(UUID.fromString("dd456353-fcdd-48d2-a638-58dd007e2c52"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
//Delete Portfolio Transaction
$portfoliotransaction_did = "3758449e-ebd1-45da-8c8f-bbb191717ceb"; // string | UUID account_id

try {
    $apiInstance->deletePortfolioTransactionUsingDelete($portfoliotransaction_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deletePortfolioTransactionUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new

#Delete Portfolio Transaction
portfolio_transaction1_id = '7f074654-7f9d-4112-ae3f-3afb629f25b3'
begin
  result = api_instance.delete_portfolio_transaction_using_delete(portfolio_transaction1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_portfolio_transaction_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
// // // //Delete a PortfolioTransaction
var porttransdid = "f61945b1-4453-43cb-b080-9af34f60052f";


var deleteportfoliotrans = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deletePortfolioTransactionUsingDelete(porttransdid, deleteportfoliotrans)

Response (204 No Content)

Permanently delete a portfolio transaction record. The portfolio_transaction_id must be provided. To obtain the appropriate portfolio_transaction_id use the GET /portfolio_transaction endpoint to view all portfolio transaction records. This deletes the portfolio_transaction_id and the details of the portfolio transaction record from the portfolio.

HTTP REQUEST

DELETE /portfolio_transaction/{portfolio_transaction_id}

Portfolio Goal

Assign a portfolio to a goal and track over time. This endpoint should be used if you are tracking goals at a portfolio level such as creating goals in subaccounts for a banking/savings solution.

Field Type Description
id UUID The id of the portfolio goal record
portfolio_id UUID The id of the portfolio that the goal is for
date date The date the portfolio-goal relationship exists
goals map List of goals mapped to the portfolio with the goal and weight
      goal_id UUID The id of the goal assigned to the portfolio
      weight double The weight of the goal for the portfolio on the date specified
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all portfolio goals

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_goal"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_goal_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_goal_all_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            PagePortfolioGoal List = apiInstance.getPortfolioGoalAllUsingGet(true, null, null, 0, 5);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioGoalAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $portfoliogoallist = $apiInstance->getPortfolioGoalAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($portfoliogoallist);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioGoalAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  goallist = api_instance.get_portfolio_goal_all_using_get(opts)
  p goallist
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_goal_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var opts = {
    'ascending': false, // Boolean | ascending
    'currencyConversion': null, // String | currency_conversion
    'filter': null, // String | filter
    'orderBy': null, // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var portfolioGoallist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};

apiInstance.getPortfolioGoalAllUsingGet(opts, portfolioGoallist)

Example Response

{
    "content": [
        {
            "id": "0d6d469e-22a9-4587-8249-bce8763d6efd",
            "portfolio_id": "46841d3c-ac30-4011-b0a6-a0fcb313ebe3",
            "date": "2019-01-02",
            "goals": [
              {
                "goal_id": "17b0323c-5a69-4d1e-a7b7-98c6d423148f",
                "weight": "100"
              }
            ],
            "secondary_id": null,
            "create_date": "2019-01-03T19:29:37.000+0000",
            "update_date": "2019-01-03T19:29:37.000+0000"
        }
    ],
    "total_pages": 1,
    "total_elements": 1,
    "last": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "id",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "first": true,
    "number_of_elements": 1,
    "size": 25,
    "number": 0
}

List all portfolio goals defined for your tenant. You can filter using a portfolio_id to view the goals for a specific portfolio. To obtain the appropriate portfolio_id, use the GET /portfolio endpoint to view all portfolios firm-wide. The endpoint returns a list of ids and the details for each portfolio goal.

HTTP REQUEST

GET /portfolio_goal

Create a portfolio goal

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
          "portfolio_id": "46841d3c-ac30-4011-b0a6-a0fcb313ebe3",
          "date": "2019-01-02",
          "goals": [
            {
              "goal_id": "17b0323c-5a69-4d1e-a7b7-98c6d423148f",
              "weight": "100"
            }
          ]
      }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio_goal"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # Create a PortfolioGoal
map = nucleus_api.PortfolioGoalMap(goal_id="cd2ce0df-5d83-4129-8f9b-fdcf14ad16ca", weight="100")
portfolio_goal = nucleus_api.PortfolioGoal(_date="2020-10-10", portfolio_id="7923f20a-0424-4edb-9992-eada1054b12b", goals=[map])
try:
    api_response = api_instance.create_portfolio_goal_using_post(portfolio_goal)
    pprint(api_response)
except ApiException as e:
    print("create_portfolio_goal_using_post: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Create a Portfolio Goal
        PortfolioGoal goal = new PortfolioGoal();
        goal.setPortfolioId(UUID.fromString("7923f20a-0424-4edb-9992-eada1054b12b"));
        goal.setDate(date);
        PortfolioGoalMap maps = new PortfolioGoalMap();
        maps.setGoalId(UUID.fromString("cd2ce0df-5d83-4129-8f9b-fdcf14ad16ca"));
        maps.setWeight(100.0);
        List<PortfolioGoalMap> stats = Arrays.asList(maps);
        goal.setGoals(stats);

        try {
            PortfolioGoal result = apiInstance.createPortfolioGoalUsingPost(goal);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createPortfolioGoalUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);


//Create Portfolio Goal
$portfolio_goal = new \com\hydrogen\nucleus\Model\PortfolioGoal();
$maps = new \com\hydrogen\nucleus\Model\PortfolioGoalMap();

try {
    $portfolio_goal->setPortfolioId('7923f20a-0424-4edb-9992-eada1054b12b');
    $portfolio_goal->setDate("2020-10-10");
    $maps->setGoalId("cd2ce0df-5d83-4129-8f9b-fdcf14ad16ca");
    $maps->setWeight("30");
    $portfolio_goal->setGoals([$maps]);
    $result = $apiInstance->createPortfolioGoalUsingPost($portfolio_goal);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createPortfolioGoalUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
#Create Portfolio Goal
portfolio_goal = NucleusApi::PortfolioGoal.new
map = NucleusApi::PortfolioGoalMap.new

begin
  portfolio_goal.portfolio_id = "7923f20a-0424-4edb-9992-eada1054b12b"
  portfolio_goal.date = "2020-10-10"
  map.goal_id = "cd2ce0df-5d83-4129-8f9b-fdcf14ad16ca"
  map.weight = "50"
  portfolio_goal.goals = [map]
  result = api_instance.create_portfolio_goal_using_post(portfolio_goal)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_portfolio_goal_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Create a PortfolioGoal
var portfoliogoal = new HydrogenNucleusApi.PortfolioGoal();
portfoliogoal.portfolio_id = '7923f20a-0424-4edb-9992-eada1054b12b';
portfoliogoal.date = "2020-06-10";
var map = new HydrogenNucleusApi.PortfolioGoalMap();
map.goal_id = 'cd2ce0df-5d83-4129-8f9b-fdcf14ad16ca';
map.weight = "100";
portfoliogoal.goals = [map];



var newportfoliogoal = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createPortfolioGoalUsingPost(portfoliogoal, newportfoliogoal)

Example Response

{
  "id": "0d6d469e-22a9-4587-8249-bce8763d6efd",
  "portfolio_id": "46841d3c-ac30-4011-b0a6-a0fcb313ebe3",
  "date": "2019-01-02",
  "goals": [
    {
      "goal_id": "17b0323c-5a69-4d1e-a7b7-98c6d423148f",
      "weight": "100"
    }
  ],
  "secondary_id": null,
  "create_date": "2019-01-03T19:29:37.000+0000",
  "update_date": "2019-01-03T19:29:37.000+0000"
}

Create a new portfolio goal defined for your tenant. The unique portfolio_id must be provided. To obtain the appropriate portfolio_id, use the GET /portfolio endpoint to view all portfolios firm-wide. The endpoint returns a portfolio_goal_id used to manage the portfolio goal.

HTTP REQUEST

POST /portfolio_goal

ARGUMENTS

Parameter Type Required Description
portfolio_id UUID required The id of the portfolio that the goal is for
date date required The date the portfolio-goal relationship exists
goals map required List of goals mapped to the portfolio with the goal and weight
      goal_id UUID required The id of the goal assigned to the portfolio
      weight double required The weight of the goal for the portfolio on the date specified
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a portfolio goal

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_goal/0d6d469e-22a9-4587-8249-bce8763d6efd"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_portfolio_goal_using_get("a0a4be74-38e5-497c-9bf5-0a8a019db99b")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_portfolio_goal_using_get: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        try {
            PortfolioGoal responseGoal = apiInstance.getPortfolioGoalUsingGet(UUID.fromString("04f5ed39-dbd5-4bfb-8d55-6e4b1796e6ed"));
            System.out.println(responseGoal);
        } catch (ApiException e) {
            System.err.println("Exception when calling getPortfolioGoalUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);
$portfolio_goal_id = "04f5ed39-dbd5-4bfb-8d55-6e4b1796e6ed"; // string | UUID portfolio_goal_id

try {
    $portfoliogoal = $apiInstance->getPortfolioGoalUsingGet($portfolio_goal_id);
    print_r($portfoliogoal);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioApi->getPortfolioGoalUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
portfolio_goal_id = '04f5ed39-dbd5-4bfb-8d55-6e4b1796e6ed' # String | UUID portfolio_goal_id


begin
  goal = api_instance.get_portfolio_goal_using_get(portfolio_goal_id)
  p goal
rescue NucleusApi::ApiError => e
  puts "Exception when calling PortfolioApi->get_portfolio_goal_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var portfoliogoalID = "04f5ed39-dbd5-4bfb-8d55-6e4b1796e6ed";

var opts = {
    'currencyConversion': null, // String | USD
};

var portfoliogoal = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getPortfolioGoalUsingGet(portfoliogoalID, portfoliogoal)

Example Response

{
  "id": "0d6d469e-22a9-4587-8249-bce8763d6efd",
  "portfolio_id": "46841d3c-ac30-4011-b0a6-a0fcb313ebe3",
  "date": "2019-01-02",
  "goals": [
    {
     "goal_id": "17b0323c-5a69-4d1e-a7b7-98c6d423148f",
     "weight": "100"
    }
  ],
  "secondary_id": null,
  "create_date": "2019-01-03T19:29:37.000+0000",
  "update_date": "2019-01-03T19:29:37.000+0000"
}

Retrieve the information for a portfolio goal. The portfolio_goal_id must be provided. The endpoint returns the portfolio_goal_id and the details for the portfolio goal specified.

HTTP REQUEST

GET /portfolio_goal/{portfolio_goal_id}

Update a portfolio goal

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
        "goals": [
          {
            "goal_id": "e281137e-748d-4f45-aaf1-ec91b90d7fe4",
            "weight":100
          }
        ]
      }' "https://api.hydrogenplatform.com/nucleus/v1/portfolio_goal/0d6d469e-22a9-4587-8249-bce8763d6efd"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Update a PortfolioGoal
portfolio_goal_update = {'secondary_id': 'None'}
portfolio_goal_id = '3b6d473c-8bad-4d29-b558-b4c9fae593a6'
try:
    api_response = api_instance.update_portfolio_goal_using_put(portfolio_goal_update, portfolio_goal_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_portfolio_goal_using_put: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Update a Portfolio Goal
        Map map3 = new HashMap();
        map3.put("date", "2020-05-06");

        try {
            PortfolioGoal response = apiInstance.updatePortfolioGoalUsingPut(map3, UUID.fromString("1acf9fa0-c0a4-42b9-b9b6-62d6d963aca8"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);


//Create Portfolio Goal
$portfolio_goal = new \com\hydrogen\nucleus\Model\PortfolioGoal();
//Update Portfolio Goal
$portfolio_goal_update = new stdClass();
$portfolio_goal_id = "3b6d473c-8bad-4d29-b558-b4c9fae593a6";

try {
    $portfolio_goal_update->date = "2020-10-10";
    $result = $apiInstance->updatePortfolioGoalUsingPut($portfolio_goal_update, $portfolio_goal_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updatePortfolioGoalUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new
#Update Portfolio Goal
portfolio_goal_update = {"date" => '2020-10-10'}
portfolio_goal_id = '1acf9fa0-c0a4-42b9-b9b6-62d6d963aca8'
begin
  result = api_instance.update_portfolio_goal_using_put(portfolio_goal_update, portfolio_goal_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_portfolio_goal_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
//Update PortfolioGoal
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var portfoliogoalupdate = new HydrogenNucleusApi.PortfolioGoal();
var portgoalid = '2e641b9b-535e-45f7-b227-6b4974682952';

portfoliogoalupdate.secondary_id = "null";
apiInstance.updatePortfolioGoalUsingPut(portfoliogoalupdate, portgoalid, callback)

Example Response

{
  "id": "0d6d469e-22a9-4587-8249-bce8763d6efd",
  "portfolio_id": "46841d3c-ac30-4011-b0a6-a0fcb313ebe3",
  "date": "2019-01-02",
  "goals": [
    {
     "goal_id": "e281137e-748d-4f45-aaf1-ec91b90d7fe4",
     "weight": "100"
    }
  ],
  "secondary_id": null,
  "create_date": "2019-01-03T19:29:37.000+0000",
  "update_date": "2019-01-25T17:18:25.000+0000"
}

Update the information for a portfolio goal. The portfolio_goal_id must be provided. To obtain the appropriate portfolio_goal_id, use the GET /portfolio_goal endpoint to view all the portfolio goals and their current information. The details to be updated must also be provided. The endpoint returns the portfolio_goal_id and the details for the portfolio goal.

HTTP REQUEST

PUT /portfolio_goal/{portfolio_goal_id}

Delete a portfolio goal

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/portfolio_goal/0d6d469e-22a9-4587-8249-bce8763d6efd"
api_instance = nucleus_api.PortfolioApi(nucleus_api.ApiClient(configuration))
# # # Delete a PortfolioGoal
portfoilogoal1_id = '6fb93dd7-da48-477e-b00f-88159b3b355d'
try:
    api_instance.delete_portfolio_goal_using_delete(portfoilogoal1_id)
except ApiException as e:
    print("Exception when delete_portfolio_goal_using_delete: %s\n" % e)
PortfolioApi apiInstance = new PortfolioApi();
        //Delete a PortfolioGoal
        try {
            PortfolioGoal deleteresponse = apiInstance.deletePortfolioGoalUsingDelete(UUID.fromString("724daa64-c5b0-403a-9b5a-75e43de672ac"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\PortfolioApi(
    new GuzzleHttp\Client(),
    $config);

//Delete Portfolio Goal
$portfoliogoal_did = "1acf9fa0-c0a4-42b9-b9b6-62d6d963aca8"; // string | UUID account_id

try {
    $apiInstance->deletePortfolioGoalUsingDelete($portfoliogoal_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deletePortfolioGoalUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::PortfolioApi.new

#Delete Portfolio Goal
portfolio_goal1_id = 'd835fd5e-e464-44b4-a77a-ff90d3e98d0d'
begin
  result = api_instance.delete_portfolio_goal_using_delete(portfolio_goal1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_portfolio_goal_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.PortfolioApi();
// // //Delete a PortfolioGoal
var portgoaldid = "1acf9fa0-c0a4-42b9-b9b6-62d6d963aca8";


var deleteportfoligoal = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deletePortfolioGoalUsingDelete(portgoaldid, deleteportfoligoal)

Response (204 No Content)

Permanently delete a goal for a portfolio. The portfolio_goal_id must be provided. To obtain the appropriate portfolio_goal_id, use the GET /portfolio_goal endpoint to view all the portfolio goals. This deletes the portfolio_goal_id and the goal record from the portfolio.

HTTP REQUEST

DELETE /portfolio_goal/{portfolio_goal_id}

Wallet

These entities are used to store the data model for the Hydrogen Wallet product.

Card

Card Management

Store a debit card that has been issued through the back office.

Field Type Description
id UUID The id of the card
client_id UUID The id of the client to whom the card belongs
business_id UUID The id of the business to whom the card belongs
portfolio_id UUID The id of the portfolio under the account linked to the card. Portfolios store balances and transactions.
card_program_id UUID The id of the card program the card belongs to
card_name string Name of the card
institution_name string Name of the institution to issue the card
institution_id UUID ID of the institution resource for this card
card_holder_name string Name of the person to whom the card is issued
expiry_date date Expiration date of the card
card_type string Type of card. Value may be credit, debit, or prepaid
card_network string Card network for the card. Value may be visa, mastercard, amex, or discover
card_issuance string Type of card issuance. Value may be physical, virtual, or both
card_image string Link to an image of the card artwork with the card details
mask string Masked version of the card number
currency_code string Alphabetic currency code for the base currency of the card, limited to 3 characters
See currency codes
credit_limit double Credit limit of the card if it’s a credit card
prepaid_amount double Amount loaded on card if it’s a prepaid card
address array(map) Address details for the card
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code.
See country codes
      type string Type of address. Value may be mailing or billing
phone_number string Phone number associated with the card
fulfillment string Status of the fulfillment of a physical card such as “ordered” or “shipped”
status string Status of the card such as “pending”, “issued”, or “suspended”
is_primary boolean Indicates if the card is the primary card for a client. Only one card may be primary for a client_id. If a user sets a card to is_primary = “true” then all other cards for that client_id will be set to is_primary = “false.” Defaults to false which indicates the card is not primary
is_reloadable boolean Indicates if the card is reloadable. Defaults to false which indicates it is not reloadable
is_pin_set boolean Indicates if the card PIN has been set. Defaults to false which indicates it has not been set
is_active boolean Indicates if the card is currently active. Defaults to true which indicates it is active
metadata map Custom information associated with the card in the format key:value
See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all cards

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
  "https://api.hydrogenplatform.com/nucleus/v1/card"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_card_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_card_all_using_get: %s\n" % e)
CardApi apiInstance = new CardApi();
        try {
            PageCard List = apiInstance.getCardAllUsingGet(true, null, null, 1, 5);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getCardAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $cardlist = $apiInstance->getCardAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($cardlist);
} catch (Exception $e) {
    echo 'Exception when calling CardApi->getCardAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  cardlist = api_instance.get_card_all_using_get(opts)
  p cardlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling CardApi->get_card_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var cardlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getCardAllUsingGet(opts, cardlist)

Example Response

{
    "content": [
        {
            "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
            "secondary_id": null,
            "create_date": "2020-01-07T20:54:33.000+0000",
            "update_date": "2020-01-07T20:54:33.000+0000",
            "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
            "business_id": null,
            "portfolio_id": "93ef9134-h7p1-5ef2-9dbc-p88bf435d22b",
            "card_program_id": null,
            "card_name": "Travel Rewards",
            "institution_name": "Citywide Bank",
            "institution_id": null,
            "card_holder_name": "Sarah Johnson",
            "expiry_date": "12/31/2030",
            "card_type": "credit",
            "card_network": "visa",
            "card_issuance": "physical",
            "card_image": null,
            "mask": "1752",
            "currency_code": "USD",
            "credit_limit": 5000.00,
            "prepaid_amount": null,
            "address": [
                {
                    "address_line1": "354 Halsted Street",
                    "address_line2": "Apt 2",
                    "city": "Chicago",
                    "state": "IL",
                    "postalcode": "60608",
                    "country": "US",
                    "type": "mailing"
                },
                {
                    "address_line1": "483 Morgan Street",
                    "address_line2": "Apt 3",
                    "city": "Chicago",
                    "state": "IL",
                    "postalcode": "60608",
                    "country": "US",
                    "type": "billing"
                }
            ],
            "phone_number": "7739462148",
            "fulfillment": null,
            "status": null,
            "is_primary": false,
            "is_reloadable": false,
            "is_pin_set": true,
            "is_active": true,
            "metadata": {}
        },
        {
            "id": "0233ab54-58a0-4b43-aa65-a1c32f29ad69",
            "secondary_id": null,
            "create_date": "2019-12-20T18:39:44.000+0000",
            "update_date": "2019-12-20T18:39:44.000+0000",
            "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
            "business_id": null,
            "portfolio_id": "b690fc43-9cdd-4547-b8cd-afadf6b58b2a",
            "card_program_id": null,
            "card_name": "Virtual Visa",
            "institution_name": "Citywide Bank",
            "institution_id": null,
            "card_holder_name": "John Smith",
            "expiry_date": "12/31/2025",
            "card_type": "prepaid",
            "card_network": "visa",
            "card_issuance": "virtual",
            "card_image": null,
            "mask": "6789",
            "currency_code": "USD",
            "credit_limit": null,
            "prepaid_amount": 500,
            "address": [
                {
                    "address_line1": "3 Downtown Street",
                    "address_line2": "",
                    "city": "New York",
                    "state": "NY",
                    "postalcode": "01191",
                    "country": "US",
                    "type": "billing"
                }
            ],
            "phone_number": "2123734583",
            "fulfillment": null,
            "status": null,
            "is_primary": false,
            "is_reloadable": true,
            "is_pin_set": false,
            "is_active": true,
            "metadata": {}
        }
    ],
    "last": true,
    "total_pages": 1,
    "total_elements": 2,
    "number_of_elements": 2,
    "first": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "size": 25,
    "number": 0
}

Get information for all cards stored for your tenant. You can filter using one of the unique ids such as the client_id to view the cards for a client or for another particular entity.

HTTP REQUEST

GET /card

Create a card

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
      "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
      "portfolio_id": "b690fc43-9cdd-4547-b8cd-afadf6b58b2a",
      "card_name": "Travel Rewards",
      "institution_name": "Citywide Bank",
      "card_holder_name": "Sarah Johnson",
      "expiry_date": "12/31/2000",
      "card_type": "credit",
      "card_network": "visa",
      "card_issuance": "physical",
      "mask": "1752",
      "currency_code": "USD",
      "prepaid_amount": 5000.00,
      "address": [
            {
                "address_line1": "483 Morgan Street",
                "address_line2": "Apt 3",
                "city": "Chicago",
                "state": "NY",
                "postalcode": "60608",
                "country": "US",
                "type": "billing"
            },
            {
                "address_line1": "354 Halsted Street",
                "address_line2": "Apt 2",
                "city": "Chicago",
                "state": "NY",
                "postalcode": "60608",
                "country": "US",
                "type": "mailing"
            }
      ],
      "phone_number": "7739462148",
    "is_reloadable": false
    }' "https://api.hydrogenplatform.com/nucleus/v1/card"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
# # Create a Card
card = nucleus_api.Card(client_id="19f02c69-343a-4661-91c6-4426cc90e7f9", portfolio_id="5113915a-1ada-48f1-be2e-14cc8dd59776", card_name="Visa", institution_name="Yes Bank", card_holder_name="Tom", card_type="debit", card_issuance="physical")
try:
    api_response = api_instance.create_card_using_post(card)
    pprint(api_response)
except ApiException as e:
    print("create_card_using_post: %s\n" % e)
CardApi apiInstance = new CardApi();
        //Create A Card
        Card card = new Card();
        card.setClientId(UUID.fromString("19f02c69-343a-4661-91c6-4426cc90e7f9"));
        card.setPortfolioId(UUID.fromString("5113915a-1ada-48f1-be2e-14cc8dd59776"));
        card.setCardProgramId(null);
        card.setCardName("Visa");
        card.setInstitutionName("Yes Bank");
        card.setCardHolderName("Tom Kirkman");
        card.setCardType("debit");
        card.setCardIssuance("physical");

                        try {
            Card result = apiInstance.createCardUsingPost(card);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createCardUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
//Create Card
$card = new \com\hydrogen\nucleus\Model\Card();

try {
    $card->setClientId("19f02c69-343a-4661-91c6-4426cc90e7f9");
    $card->setPortfolioId("5113915a-1ada-48f1-be2e-14cc8dd59776");
    $card->setCardProgramId("bfc1b849-bd33-4660-b5a6-39ffa80d8c25");
    $card->setCardName("AB");
    $card->setCardHolderName("ANS");
    $card->setInstitutionName("ABS BANK");
    $card->setCardType("visa");
    $card->setCardIssuance("physical");
    $result = $apiInstance->createCardUsingPost($card);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createCardUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
#Create Card
card = NucleusApi::Card.new

begin
  card.client_id = "19f02c69-343a-4661-91c6-4426cc90e7f9"
  card.portfolio_id = "5113915a-1ada-48f1-be2e-14cc8dd59776"
  card.card_name = "visa"
  card.card_type = "debit"
  card.institution_name = "ABC BANK"
  card.card_holder_name = "MINK"
  card.card_issuance = "physical"
  result = api_instance.create_card_using_post(card)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_card_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();
//Create Card
var cardn = new HydrogenNucleusApi.Card();
cardn.client_id = '19f02c69-343a-4661-91c6-4426cc90e7f9';
cardn.portfolio_id = '5113915a-1ada-48f1-be2e-14cc8dd59776';
cardn.card_program_id = '781be039-fee9-4b5e-9fd8-f8ad6ceaf5c3';
cardn.card_name = "One";
cardn.institution_name = "ABC";
cardn.card_holder_name = "MESSI";
cardn.card_type = "debit";
cardn.card_issuance = "physical";

var newcard = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createCardUsingPost(cardn, newcard)

Example Response

{
    "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
    "secondary_id": null,
    "create_date": "2020-01-07T20:54:32.000+0000",
    "update_date": "2020-01-07T20:54:32.000+0000",
    "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
    "business_id": null,
    "portfolio_id": "b690fc43-9cdd-4547-b8cd-afadf6b58b2a",
    "card_program_id": null,
    "card_name": "Travel Rewards",
    "institution_name": "Citywide Bank",
    "institution_id": null,
    "card_holder_name": "Sarah Johnson",
    "expiry_date": "12/31/2000",
    "card_type": "credit",
    "card_network": "visa",
    "card_issuance": "physical",
    "card_image": null,
    "mask": "1752",
    "currency_code": "USD",
    "credit_limit": null,
    "prepaid_amount": 5000.00,
    "address": [
      {
          "address_line1": "354 Halsted Street",
          "address_line2": "Apt 2",
          "city": "Chicago",
          "state": "NY",
          "postalcode": "60608",
          "country": "US",
          "type": "mailing"
      },
      {
          "address_line1": "483 Morgan Street",
          "address_line2": "Apt 3",
          "city": "Chicago",
          "state": "NY",
          "postalcode": "60608",
          "country": "US",
          "type": "billing"
      }
    ],
    "phone_number": "7739462148",
    "fulfillment": null,
    "status": null,
    "is_primary": false,
    "is_reloadable": false,
    "is_pin_set": false,
    "is_active": true,
    "metadata": {}
}

Create a card for a client. The endpoint returns a card_id that can then be used to manage the card.

HTTP REQUEST

POST /card

ARGUMENTS

Parameter Type Required Description
client_id UUID required, conditional The id of the client to whom the card belongs
business_id UUID required, conditional The id of the business to whom the card belongs
portfolio_id UUID required The id of the portfolio under the account linked to the card. Portfolios store balances and transactions.
card_name string required Name of the card
institution_name string required, conditional Name of the institution for the card, e.g. HSBC. Either this name or the institution_id must be supplied.
institution_id UUID required, conditional ID of the institution resource for this card. Either this name or the institution_name must be supplied.
card_holder_name string required Name of the person to whom the card is issued
card_type string required Type of card. Value may be credit, debit, or prepaid
card_issuance string required Type of card issuance. Value may be physical, virtual, or both
card_program_id UUID optional The id of the card program the card belongs to
card_image string optional Link to an image of the card artwork with the card details
card_network string optional Card network for the card. Value may be visa, mastercard, amex, or discover
mask string optional Masked version of the card number
expiry_date date optional Expiration date of the card
currency_code string optional Alphabetic currency code for the base currency of the card, limited to 3 characters
See currency codes
credit_limit double optional Credit limit of the card if it’s a credit card
prepaid_amount double optional Amount loaded on card if it’s a prepaid card
address array(map) optional Address details for the card
      address_line1 string required Primary information for the street address, such as the street and building number
      address_line2 string optional Secondary information for the street address, such as a suite or apartment number
      city string required City for the address
      state string required State, province, or sub-country region for the address
      postalcode string optional Alphanumeric postal code or zip code for the address
      country string required Country for the address using the ISO ALPHA-2 Code.
See country codes
      type string required Type of address. Value may be mailing or billing
phone_number string optional Phone number associated with the card
fulfillment string optional Status of the fulfillment of a physical card such as “ordered” or “shipped”
status string optional Status of the card such as pending or issued
is_primary boolean optional Indicates if the card is the primary card for a client. Only one card may be primary for a client_id. If a user sets a card to is_primary = “true” then all other cards for that client_id will be set to is_primary = “false.” Defaults to false which indicates the card is not primary
is_reloadable boolean optional Indicates if the card is reloadable. Defaults to false which indicates it is not reloadable
is_pin_set boolean optional Indicates if the card PIN has been set. Defaults to false which indicates it has not been set
is_active boolean optional Indicates if the card is currently active. Defaults to true which indicates it is active
metadata map optional Custom information associated with the card in the format key:value
See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a card

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/card/0233ab54-58a0-4b43-aa65-a1c32f29ad69"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_card_using_get("a47c88a5-7e61-4419-87ec-2366170ce496")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_card_using_get: %s\n" % e)
CardApi apiInstance = new CardApi();
        try {
            Card responseCard = apiInstance.getCardUsingGet(UUID.fromString("40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"));
            System.out.println(responseCard);
        } catch (ApiException e) {
            System.err.println("Exception when calling getCardAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
$card_id = "40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"; // string | UUID card_id

try {
    $card = $apiInstance->getCardUsingGet($card_id);
    print_r($card);
} catch (Exception $e) {
    echo 'Exception when calling CardApi->getCardUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  cardlist = api_instance.get_card_all_using_get(opts)
  p cardlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling CardApi->get_card_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();
var cardId = "2f36f818-cf18-482e-b7c7-e432b7c0511a";


var card = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getCardUsingGet(cardId, card)

Example Response

{
    "id": "0233ab54-58a0-4b43-aa65-a1c32f29ad69",
    "secondary_id": null,
    "create_date": "2019-12-20T18:39:44.000+0000",
    "update_date": "2019-12-20T18:39:44.000+0000",
    "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
    "business_id": null,
    "portfolio_id": "b690fc43-9cdd-4547-b8cd-afadf6b58b2a",
    "card_program_id": null,
    "card_name": "Virtual Visa",
    "institution_name": "Citywide Bank",
    "institution_id": null,
    "card_holder_name": "John Smith",
    "expiry_date": "12/31/2025",
    "card_type": "prepaid",
    "card_network": "visa",
    "card_issuance": "virtual",
    "card_image": null,
    "mask": "6789",
    "currency_code": "USD",
    "credit_limit": null,
    "prepaid_amount": 5000.00,
    "address": [
        {
            "address_line1": "3 Downtown Street",
            "address_line2": "",
            "city": "New York",
            "state": "NY",
            "postalcode": "01191",
            "country": "US",
            "type": "billing"
        }
    ],
    "phone_number": "2123734583",
    "fulfillment": null,
    "status": null,
    "is_primary": false,
    "is_reloadable": false,
    "is_pin_set": false,
    "is_active": true,
    "metadata": {}
}

Retrieve the information for a specific card associated with a client. The endpoint returns the card_id and details for the card specified.

HTTP REQUEST

GET /card/{card_id}

Update a card

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
      "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
      "card_name": "Virtual Visa",
      "institution_name": "Citywide Bank",
      "card_holder_name": "John Smith",
      "expiry_date": "12/31/2025",
      "card_type": "debit",
      "card_network": "visa",
      "card_issuance": "virtual",
      "mask": "6789",
      "currency_code": "USD",
      "address": [
        {
            "address_line1": "3 Downtown Street",
            "address_line2": "",
            "city": "New York",
            "state": "NY",
            "postalcode": "01191",
            "country": "US",
            "type": "billing"
        }
      ],
      "phone_number": "2123734583",
      "is_active": true
    }' "https://api.hydrogenplatform.com/nucleus/v1/card/0233ab54-58a0-4b43-aa65-a1c32f29ad69"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
# #Update Card
card_Update = {'currency_code': 'AUD'}
card_id = 'd5efa2f8-89c7-4508-bdec-49ce1b6a2d8e'
try:
    api_response = api_instance.update_card_using_put(card_Update, card_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_card_using_put: %s\n" % e)
CardApi apiInstance = new CardApi();
//Update a Card
        Map map = new HashMap();
        map.put("institution_name", "ABC BANK");

        try {
            Card response = apiInstance.updateCardUsingPut(map, UUID.fromString("e5079bb8-a25c-4c21-8dc0-c649ca98c024"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
//Update Card
$card_update = new stdClass();
$card_id = "51e680bb-87f3-45a4-863e-ef153c8016d5";

try {
    $card_update->card_holder_name = "max";
    $result = $apiInstance->updateCardUsingPut($card_update,  $card_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateCardUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
#Update Card
card_update = {"card_type" => 'visa'}
card_id = 'bf84ea77-7934-44c9-9d77-6911e41bb6f1'
begin
  result = api_instance.update_card_using_put(card_update, card_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_card_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();
// //Update Card
var apiInstance = new HydrogenNucleusApi.CardApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var cardupdaten = new HydrogenNucleusApi.Card();
var cardid1 = "020a7549-198a-486e-baf2-baa35bb330bf";

cardupdaten.card_name = "CITI";
apiInstance.updateCardUsingPut(cardupdaten, cardid1, callback)

Example Response

{
    "id": "0233ab54-58a0-4b43-aa65-a1c32f29ad69",
    "secondary_id": null,
    "create_date": "2019-12-20T18:39:44.000+0000",
    "update_date": "2020-01-07T21:19:30.000+0000",
    "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
    "business_id": null,
    "portfolio_id": "b690fc43-9cdd-4547-b8cd-afadf6b58b2a",
    "card_program_id": null,
    "card_name": "Virtual Visa",
    "institution_name": "Citywide Bank",
    "institution_id": null,
    "card_holder_name": "John Smith",
    "expiry_date": "12/31/2025",
    "card_type": "prepaid",
    "card_network": "visa",
    "card_issuance": "virtual",
    "card_image": null,
    "mask": "6789",
    "currency_code": "USD",
    "credit_limit": null,
    "prepaid_amount": 500,
    "address": [
        {
            "address_line1": "3 Downtown Street",
            "address_line2": "",
            "city": "New York",
            "state": "NY",
            "postalcode": "01191",
            "country": "US",
            "type": "billing"
        }
    ],
    "phone_number": "2123734583",
    "fulfillment": null,
    "status": null,
    "is_primary": false,
    "is_reloadable": true,
    "is_pin_set": false,
    "is_active": true,
    "metadata": {}
}

Update the information for a card. The unique card_id must be provided. To obtain the appropriate card_id, use the GET /card endpoint to view all cards stored for your tenant and their current information. The details to be updated must also be provided. The endpoint returns the card_id and the details for the card.

HTTP REQUEST

PUT /card/{card_id}

Card Activity

Cardholder Overview

Aggregates the details of all cards under a tenant including the card details and latest balance. This view is useful to display a admin dashboard for cards.

Field Type Description
client_details list Details from the client_id associated with the card
      title string Title of client such as “Mr.” or “Mrs.”
      first_name string First name of client
      middle_name string Middle name of client
      last_name string Last name of client
      email string Email address of client
      status string Status of client such as “active”
      create_date timestamp Time the client was created
total_balance list Total balance of all cards for the client
      currency_code string Alphabetic currency code for the balance, limited to 3 characters. See currency codes
      total_balance float Total latest balance for all cards
      total_balance_available float Total latest available balance for all cards
card_details list Details for each card the client owns
      card_id UUID ID of the card
      card_name string Name of the card
      card_holder_name string Name of the cardholder
      card_type string Type of card such as “prepaid”
      card_network string Card network. Value may be “mastercard”, “visa”, “amex”, “discover”
      card_issuance string Type of issuance. Value may be “physical”, “virtual”
      mask integer Last 4 digits of the card PAN
      expiry_date date Date the card expires
      prepaid_amount float Amount preloaded on the card
      status string Status of the card such as “activated”
      card_balance list Latest balance for each card listed above
            currency_code string Alphabetic currency code for the balance, limited to 3 characters. See currency codes
            balance float Latest balance for the card
            balance_available float Latest available balance for the card
            balance_timestamp float Timestamp for the balance

HTTP REQUEST

GET /card/cardholder_overview

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
  "https://api.hydrogenplatform.com/nucleus/v1/card/cardholder_overview"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
# List all ClientCard
try:
    api_response = api_instance.get_all_client_cards_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_all_client_cards_using_get: %s\n" % e)
CardApi apiInstance = new CardApi();
        //Get Cardholder Overview
        try {
            Object cardholderoverview = apiInstance.getAllClientCardsUsingGet(true, null, null, null, 0, 10);
            System.out.println(cardholderoverview);
        } catch (ApiException e) {
            System.err.println("Exception when calling getAllClientCardsUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
//Get CardholderOverview
//$card_id = "40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"; // string | UUID card_id
$ascending = false; // bool | ascending
$currency_conversion = null; // string | USD
$end_date = new \DateTime("2013-10-20"); // \DateTime | end date
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size
$start_date = new \DateTime("2013-10-20"); // \DateTime | start date

try {
    $cardtransaction = $apiInstance->getAllClientCardsUsingGet(true, null, null, null, 0, 10);
    print_r($cardtransaction);
} catch (Exception $e) {
    echo 'Exception when calling CardApi->getAllClientCardsUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
# Get cardholder Overview

opts = {
  ascending: false, # BOOLEAN | ascending
  currency_conversion: null, # String | USD
  end_date: Date.parse('2013-10-20'), # Date | end date
  order_by: null, # String | order_by
  page: 0, # Integer | page
  size: 25, # Integer | size
  start_date: Date.parse('2013-10-20') # Date | start date
}

begin
  cardoverviw = api_instance.get_all_client_cards_using_get
  p cardoverviw
rescue NucleusApi::ApiError => e
  puts "Exception when calling CardApi->get_all_client_cards_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();

//Get all CardHolderOverview
var overview = function(error, data, response) {
     if (error) {
         console.error(error);
     } else {
         console.log('API called successfully. Returned data: ' + data);
     }
 };
  // String | Card Id
 var opts = {
     'currencyConversion': null, // String | USD
     'endDate': new Date("2013-10-20"), // Date | end date
     'getLatest': true, // Boolean | true or false
     'sortType': null, // String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
     'startDate': new Date("2013-10-20") // Date | start date
 };
 apiInstance.getAllClientCardsUsingGet(opts, overview)

Example Response

{
    "content": [
        {
          "client_details":
          {
            "title": null,
            "first_name": null,
            "middle_name": null,
            "last_name": null,
            "email": null,
            "status": "verified",
            "create_date": "2020-04-22T08:00:45.571+0530",
            "total_balance": [
                {
                    "currency_code": null,
                    "total_balance": 450.0,
                    "total_balance_available": 0.0
                }
              ]
            },
            "card_details": [
                {
                    "card_id": "9429d47c-f7aa-4d6c-b6d1-f8e383b28e13",
                    "card_name": "null",
                    "card_holder_name": "null",
                    "card_type": "prepaid",
                    "card_issuance": "virtual",
                    "card_network": "visa",
                    "mask": null,
                    "expiry_date": null,
                    "prepaid_amount": null,
                    "status": "null",
                    "card_balance": {
                        "currency_code": null,
                        "balance": 50.0,
                        "balance_available": null,
                        "balance_timestamp": "2020-07-19T00:00:00.000+0530"
                    }
                },
                {
                    "card_id": "fc62eac7-afb8-4e6d-accd-f740fe6c7fe1",
                    "card_name": "null",
                    "card_holder_name": "null",
                    "card_type": "prepaid",
                    "card_issuance": "virtual",
                    "card_network": "visa",
                    "mask": null,
                    "expiry_date": null,
                    "prepaid_amount": null,
                    "status": "null",
                    "card_balance": {
                        "currency_code": null,
                        "balance": 50.0,
                        "balance_available": null,
                        "balance_timestamp": "2020-07-19T00:00:00.000+0530"
                    }
                }
            ]
        }
    ],
    "total_elements": 1,
    "total_pages": 1,
    "last": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "first": true,
    "number_of_elements": 1,
    "size": 25,
    "number": 0
}

List all card asset sizes

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/card/099961da-7f41-4309-950f-2b51689a0033/asset_size"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
# List all CardAssetSize
try:
    api_response = api_instance.get_card_asset_size_agg_all_using_get("7c495184-bdbd-47fa-9e9d-5132b27678dc")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_card_asset_size_agg_all_using_get: %s\n" % e)

CardApi apiInstance = new CardApi();
        //List All CardAssetSize
        try {
            Object cardassetsize = apiInstance.getCardAssetSizeAggAllUsingGet(UUID.fromString("40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"), null, date2, true, null, date1);
            System.out.println(cardassetsize);
        } catch (ApiException e) {
            System.err.println("Exception when calling getCardAssetSizeAggAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
//Get CardAssetSize
$card_id = "40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"; // string | Card Id
$currency_conversion = null; // string | USD
$end_date = new \DateTime("2013-10-20"); // \DateTime | end date
$get_latest = true; // bool | true or false
$sort_type = null; // string | Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
$start_date = new \DateTime("2013-10-20"); // \DateTime | start date

try {
    $cardassetsize = $apiInstance->getCardAssetSizeAggAllUsingGet($card_id, $currency_conversion, $end_date, $get_latest, $sort_type, $start_date);
    print_r($cardassetsize);
} catch (Exception $e) {
    echo 'Exception when calling CardApi->getCardAssetSizeAggAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
#Get card AssetSize
card_id = '40d6e6e4-4695-4fe8-9f91-dbfdd96ae766' # String | Card Id

opts = {
    currency_conversion: null, # String | USD
    end_date: Date.parse('2013-10-20'), # Date | end date
    get_latest: true, # BOOLEAN | true or false
    sort_type: null, # String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    start_date: Date.parse('2013-10-20') # Date | start date
}

begin
  cardasset = api_instance.get_card_asset_size_agg_all_using_get(card_id, opts)
  p cardasset
rescue NucleusApi::ApiError => e
  puts "Exception when calling CardApi->get_card_asset_size_agg_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();

//Get all CardAssetSize
var assetsize = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' + data);
    }
};
var cardId = "40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"; // String | Card Id
var opts = {
    'currencyConversion': null, // String | USD
    'endDate': new Date("2013-10-20"), // Date | end date
    'getLatest': true, // Boolean | true or false
    'sortType': null, // String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    'startDate': new Date("2013-10-20") // Date | start date
};
apiInstance.getCardAssetSizeAggAllUsingGet(cardId, opts, assetsize)

Example Response

[
  {
    "date": "2018-02-03",
    "currency_code": "USD",
    "value": 20000,
    "value_available": null,
    "value_pending": null,
    "cash_flow": 0
  },
  {
    "date": "2018-02-04",
    "currency_code": "USD",
    "value": 24500,
    "value_available": null,
    "value_pending": null,
    "cash_flow": 500
  }
]

Get a list of asset sizes per date for a card. Asset size records are created at the portfolio level and aggregated to yield the card asset size(s). The unique card_id must be provided. To obtain the appropriate card_id, use the GET /card endpoint to view all available card_ids registered with your firm. The endpoint returns a list of asset sizes by date for the card.

HTTP REQUEST

GET /card/{card_id}/asset_size

ARGUMENTS

Parameter Type Required Description
get_latest boolean optional Retrieve only the latest asset size. Defaults to false if not set
sort_type string optional Sort the asset sizes by D Daily, M Monthly, Q Quarterly, Y Yearly. Defaults to D Daily if not set. Must be capital letters
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
exclude_subledger boolean optional If set to “true”, excludes portfolios under accounts where is_subledger = “true” to not double count assets of subaccounts. Defaults to “false” which includes all portfolios under an account.
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
date date Date for the asset size record. Displays the latest record if more than one entry exists for the given date.
currency_code string Alphabetic currency code for the asset size. See currency codes
value double Monetary value of all the card’s accounts on the particular date
value_available double Available monetary value of the card on the particular date
value_pending double Pending monetary value of the card on the particular date
cash_flow double Amount added to the card’s accounts or withdrawn from the accounts since the last asset size date. Value is used for performance calculations. Value may be positive or negative.

List all card transactions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/card/099961da-7f41-4309-950f-2b51689a0033/transaction"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
# List all CardTransaction
try:
    api_response = api_instance.get_card_transaction_agg_all_using_get("7c495184-bdbd-47fa-9e9d-5132b27678dc")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_card_transaction_agg_all_using_get: %s\n" % e)
CardApi apiInstance = new CardApi();
        //List CardTransactions
        try {
            Object cardtransaction = apiInstance.getCardTransactionAggAllUsingGet(UUID.fromString("40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"), true, null, date2, null, 0, 10, date1);
            System.out.println(cardtransaction);
        } catch (ApiException e) {
            System.err.println("Exception when calling getCardTransactionAggAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
//Get CardTransactions
$card_id = "40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"; // string | UUID card_id
$ascending = false; // bool | ascending
$currency_conversion = null; // string | USD
$end_date = new \DateTime("2013-10-20"); // \DateTime | end date
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size
$start_date = new \DateTime("2013-10-20"); // \DateTime | start date

try {
    $cardtransaction = $apiInstance->getCardTransactionAggAllUsingGet($card_id, $ascending, $currency_conversion, $end_date, $order_by, $page, $size, $start_date);
    print_r($cardtransaction);
} catch (Exception $e) {
    echo 'Exception when calling CardApi->getCardTransactionAggAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
# Get card transaction
card_id = '0d6e6e4-4695-4fe8-9f91-dbfdd96ae766' # String | UUID card_id

opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | USD
    end_date: Date.parse('2013-10-20'), # Date | end date
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25, # Integer | size
    start_date: Date.parse('2013-10-20') # Date | start date
}

begin
  cardtransaction = api_instance.get_card_transaction_agg_all_using_get(card_id, opts)
  p cardtransaction
rescue NucleusApi::ApiError => e
  puts "Exception when calling CardApi->get_card_transaction_agg_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();

//Get all CardTransactions
var transactions = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' + data);
    }
};
var cardId = "40d6e6e4-4695-4fe8-9f91-dbfdd96ae766"; // String | Card Id
var opts = {
    'currencyConversion': null, // String | USD
    'endDate': new Date("2013-10-20"), // Date | end date
    'getLatest': true, // Boolean | true or false
    'sortType': null, // String |  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
    'startDate': new Date("2013-10-20") // Date | start date
};

apiInstance.getCardTransactionAggAllUsingGet(cardId, opts, transactions)

Example Response

{
  "content": [
    {
      "id": "efa289b2-3565-42e6-850b-8dad25727e99",
      "date": "2018-01-31T12:42:11.000+0000",
      "date_available": null,
      "is_recurring": false,
      "is_cleansed": true,
      "is_disputed": false,
      "is_read": true,
      "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
      "model_id": null,
      "price": null,
      "quantity": null,
      "currency_code": "USD",
      "amount": 8.75,
      "balance": null,
      "merchant_id": null,
      "mid": null,
      "merchant": "Starbucks",
      "merchant_category_code": null,
      "transaction_category_id": null,
      "category": "Food & Beverage",
      "subcategory": null,
      "description": null,
      "memo": null,
      "status": null,
      "location": {},
      "check": {},
      "funding_id": null,
      "security_id": null,
      "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
      "create_date": "2018-02-07T19:29:37.000+0000",
      "update_date": "2018-02-012T09:00:00.000+0000"
    },
    {
      "id": "efa289b2-3565-42e6-850b-8dad25727e24",
      "date": "2018-01-31T06:30:00.000+0000",
      "date_available": null,
      "is_recurring": false,
      "is_cleansed": false,
      "is_disputed": false,
      "is_read": true,
      "portfolio_id": "8ec467e6-6faa-4916-b380-6af0b21a34cc",
      "model_id": null,
      "price": null,
      "quantity": null,
      "currency_code": "USD",
      "amount": 12.10,
      "balance": null,
      "merchant_id": null,
      "mid": null,
      "merchant": null,
      "merchant_category_code": null,
      "transaction_category_id": null,
      "category": null,
      "subcategory": null,
      "description": "Mcdonald's #4572",
      "memo": null,
      "status": null,
      "location": {},
      "check": {},
      "funding_id": null,
      "security_id": null,
      "transaction_code_id": "f5af397b-7d22-433f-b01e-8202184a6386",
      "create_date": "2017-08-02T04:30:25.000+0000",
      "update_date": "2017-11-18T09:00:00.000+0000"
    }
  ],
    "total_pages": 1,
    "total_elements": 2,
    "last": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "id",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "descending": true,
            "ascending": false
        }
    ],
    "first": true,
    "number_of_elements": 2,
    "size": 25,
    "number": 2
}

Get the information for all transactions under a card registered with your firm. Transaction records are created at a portfolio level and all transactions for each portfolio below the card’s account(s) are returned to show the card’s transaction activity. The unique card_id must be provided. To obtain the appropriate card_id, use the GET /card endpoint to view all available card_ids registered with your firm. The endpoint returns a list of transaction_ids and details for each transaction.

HTTP REQUEST

GET /card/{card_id}/transaction

ARGUMENTS

Parameter Type Required Description
start_date date optional Start date for the data. Defaults to the first date if not set
end_date date optional End date for the data. Defaults to the last date if not set
currency_conversion string optional Alphabetic currency code for the currency to convert all monetary values to. Value may be USD, GBP, EUR, AUD, CAD. Only available in enterprise plan.

RESPONSE

Field Type Description
id UUID The id for the transaction record
date timestamp Timestamp when the transaction occurred
date_available timestamp Timestamp when the transaction becomes available
is_cleansed boolean Indicates if the transaction has been cleansed by a data cleansing engine. Defaults to false which indicates that it has not been cleansed
is_read boolean Indicates if the transaction has been read. Defaults to false which indicates that it has not been read
is_recurring boolean Indicates if the transaction is recurring such as a subscription. Defaults to false which indicates that it is not recurring
is_disputed boolean Indicates if the transaction is disputed by the client. Defaults to false which indicates that it is not disputed
portfolio_id UUID The id of the portfolio that the transaction record relates to
funding_id UUID The id of the funding request that the transaction record relates to
model_id UUID The id of the model to which the portfolio that the transaction falls under subscribes
price integer Price for the security included in the transaction at which it was sold or purchased
quantity integer Quantity of shares of the security purchased
currency_code string Alphabetic currency code for the amount. See currency codes
amount double Amount of the transaction
balance double Updated balance of the portfolio as a result of the transaction
merchant_id UUID ID of the merchant resource for the transaction
mid string Acquirer ID of the merchant (MID) for the transaction
merchant string The merchant for the transaction such as the merchant posted for a credit or debit card charge
merchant_category_code string The MCC Code for the merchant as identified by the card network
transaction_category_id string ID of the category resource for the transaction
category string Category of the transaction
subcategory string Subcategory of the transaction
description string Description of the transaction
memo string Memo attached to the transaction
status string Status of the transaction
location map Location where the transaction occurred
      address_line1 string Primary information for the street address, such as the street and building number
      address_line2 string Secondary information for the street address, such as a suite or apartment number
      city string City for the address
      state string State, province, or sub-country region for the address
      postalcode string Alphanumeric postal code or zip code for the address
      country string Country for the address using the ISO ALPHA-2 Code. See country codes
      latitude double Latitude of the location where the transaction occurred
      longitude double Longitude of the location where the transaction occurred
check map Check associated with the banking transaction
      check_number string Number on the check such as “1234”
      check_amount double Monetary amount of the check
      check_images map Image(s) of the scanned check(s)
            image_url string URL where the image can be displayed
            image_type string Type of image for the check such as “png” or “jpeg”
security_id UUID The id of the security included in the transaction
transaction_code_id integer The id referring to the transaction codes defined by your firm
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

Card Program

Card programs are issued and run by a program manager who is responsible for establishing relationships with processors, sponsor banks, card networks.

Field Type Description
id UUID The id of the card program
client_id UUID The id of a client to whom the card program belongs if it’s a business on your platform
name string Name of the card program
card_network string Card network for the cards being issued in the program. Value may be visa, mastercard, amex, or discover
card_type string Type of cards being issued in the program. Value may be credit, debit, or prepaid
issuing_bank string Name of the issuing or sponsor bank on the card program
card_processor string Name of the card processor for the card program
program_manager string Name of the card program manager
code string Code used to identify the card program
description string Description of the card program
is_delegated_authority boolean Indicates if the card program is delegating authority for transaction authorizations. Defaults to false which indicates that it is active
is_active boolean Indicates if the card program is active. Defaults to true which indicates that the it is active
metadata map Custom information associated with the card program in the format key:value
See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all card programs

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
  "https://api.hydrogenplatform.com/nucleus/v1/card_program"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_card_program_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_card_program_all_using_get: %s\n" % e)
CardApi apiInstance = new CardApi();
        try {
            PageCardProgram List = apiInstance.getCardProgramAllUsingGet(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getCardProgramAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $cardprogramlist = $apiInstance->getCardProgramAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($cardprogramlist);
} catch (Exception $e) {
    echo 'Exception when calling CardApi->getCardProgramAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  cardprogramlist = api_instance.get_card_program_all_using_get(opts)
  p cardprogramlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling CardApi->get_card_program_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var cardprogramlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getCardProgramAllUsingGet(opts, cardprogramlist)

Example Response

{
    "content": [
        {
            "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
            "secondary_id": null,
            "create_date": "2020-01-07T20:54:33.000+0000",
            "update_date": "2020-01-07T20:54:33.000+0000",
            "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
            "name": "E-Commerce Reloadable Program",
            "card_network": "visa",
            "card_type": "prepaid",
            "issuing_bank": "MetaBank",
            "card_processor": "Marqeta",
            "program_manager": "Marqeta",
            "code": "A89M4k28",
            "description": null,
            "is_delegated_authority": false,
            "is_active": true,
            "metadata": {}
        },
        {
            "id": "0233ab54-58a0-4b43-aa65-a1c32f29ad69",
            "secondary_id": null,
            "create_date": "2019-12-20T18:39:44.000+0000",
            "update_date": "2019-12-20T18:39:44.000+0000",
            "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
            "name": "Banking Program",
            "card_network": "visa",
            "card_type": "prepaid",
            "issuing_bank": "MetaBank",
            "card_processor": "Marqeta",
            "program_manager": "Marqeta",
            "code": "L43zn2659",
            "description": null,
            "is_delegated_authority": false,
            "is_active": true,
            "metadata": {}
        }
    ],
    "last": true,
    "total_pages": 1,
    "total_elements": 2,
    "number_of_elements": 2,
    "first": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "size": 25,
    "number": 0
}

Get information for all card programs stored for your tenant.

HTTP REQUEST

GET /card_program

Retrieve a card program

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/card_program/1692a3c2-65b0-46a0-9a0a-66bc949f7ca1"
api_instance = nucleus_api.CardApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_card_program_using_get("9e401672-8ce2-4ffb-b63c-7e37dc8e6e5b")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_card_program_using_get: %s\n" % e)
CardApi apiInstance = new CardApi();
        try {
            CardProgram responseProgram = apiInstance.getCardProgramUsingGet(UUID.fromString("850c5ab1-c7ce-4405-8a96-de159587d5fe"));
            System.out.println(responseProgram);
        } catch (ApiException e) {
            System.err.println("Exception when calling getCardProgramUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\CardApi(
    new GuzzleHttp\Client(),
    $config);
$card_program_id = "850c5ab1-c7ce-4405-8a96-de159587d5fe"; // string | UUID card_program_id

try {
    $cardprogram = $apiInstance->getCardProgramUsingGet($card_program_id);
    print_r($cardprogram);
} catch (Exception $e) {
    echo 'Exception when calling CardApi->getCardProgramUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::CardApi.new
card_program_id = '850c5ab1-c7ce-4405-8a96-de159587d5fe' # String | UUID card_program_id

begin
  cardprogram = api_instance.get_card_program_using_get(card_program_id)
  p cardprogram
rescue NucleusApi::ApiError => e
  puts "Exception when calling CardApi->get_card_program_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.CardApi();
var cardprogramId = "9e401672-8ce2-4ffb-b63c-7e37dc8e6e5b";

var cardprogramm = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getCardProgramUsingGet(cardprogramId, cardprogramm)

Example Response

{
    "id": "1692a3c2-65b0-46a0-9a0a-66bc949f7ca1",
    "secondary_id": null,
    "create_date": "2020-01-07T20:54:33.000+0000",
    "update_date": "2020-01-07T20:54:33.000+0000",
    "client_id": "87ef9136-f7e1-4ef0-8dbc-e58bf435d11c",
    "name": "E-Commerce Reloadable Program",
    "card_network": "visa",
    "card_type": "prepaid",
    "issuing_bank": "MetaBank",
    "card_processor": "Marqeta",
    "program_manager": "Marqeta",
    "code": "A89M4k28",
    "description": null,
    "is_delegated_authority": false,
    "is_active": true,
    "metadata": {}
}

Retrieve the information for a specific card program. The endpoint returns the card_program_id and details for the card program specified.

HTTP REQUEST

GET /card_program/{card_program_id}

Deposit

These entities are used to store the data model for the Hydrogen Deposit product.

Bank Link

Bank links are established connections between a client’s account on your platform and his or her bank account. They are used to transfer funds from the bank account to the account on your platform.

Field Type Description
id UUID The id for the specific bank link
bank_account_holder string Name of the individual that owns the bank account
bank_account_number string Account number of the bank account
institution_name string Name of the institution for this bank link, e.g. HSBC
institution_id UUID ID of the institution resource for this bank link
routing string Routing number of the bank for this bank link
routing_wire string Routing number of the bank for the bank link used for wire transfers
mask string The masked version of the bank account number for this bank link
bank_account_name string Name of the bank account, e.g. Mike’s HSBC Checking
client_id UUID The id of the client to which the bank link belongs
business_id UUID The id of the business to which the bank link belongs
account_id UUID The id of the account to which the bank link belongs
currency_code string Alphabetic currency code for the base currency of the bank account linked, limited to 3 characters. See currency codes
balance string Current balance of the bank account
available_balance string Available balance of the bank account, usually taking into consideration pending transactions or available overdraft
type string Used to indicate the type of bank account for this bank link such as a ‘savings’ account
is_default boolean Indicates if the bank link is the default link for a client. Only one bank link may be default for a client_id. If a user sets a bank link to is_default = “true” then all other bank links for that client_id will be set to is_default = “false.” Defaults to false which indicates the bank link is not default
is_active boolean Indicates if the bank link is active. Defaults to true which indicates it is active
is_link_verified boolean Indicates if the bank link has been verified. Defaults to false which indicates it has not been verified
link_verified_date date Date and time that the bank link was verified
metadata map Custom information associated with the bank link in the format key:value. See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created. Defaults to the current date
update_date timestamp Timestamp for the date and time that the record was last updated

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/bank_link"
FundingApi apiInstance = new FundingApi();
        try {
            PageBankLink List = apiInstance.getBankLinkAllUsingGet(true, null, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getBankLinkAllUsingGet");
            e.printStackTrace();
        }
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_bank_link_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_bank_link_all_using_get: %s\n" % e)
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $banklinklist = $apiInstance->getBankLinkAllUsingGet($ascending, $currency_conversion, $filter, $order_by, $page, $size);
    print_r($banklinklist);
} catch (Exception $e) {
    echo 'Exception when calling FundingApi->getBankLinkAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | currency_conversion
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  banklinklist = api_instance.get_bank_link_all_using_get(opts)
  p banklinklist
rescue NucleusApi::ApiError => e
  puts "Exception when calling FundingApi->get_bank_link_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var banklinklist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBankLinkAllUsingGet(opts, banklinklist)

Example Response

{
  "content":
  [
    {
      "id": "4ff21db3-97ab-4bbd-9885-be6aec522c44",
      "create_date": "2018-04-12T17:34:17.000+0000",
      "update_date": "2018-04-12T17:34:17.000+0000",
      "client_id": null,
      "business_id": null,
      "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
      "bank_account_holder": "Jon Linndt",
      "bank_account_name": "HSBC Checking",
      "bank_account_number": "111111",
      "mask": "xx1111",
      "institution_name": "HSBC",
      "institution_id": null,
      "routing": "111111",
      "routing_wire": "111111-22",
      "currency_code": "USD",
      "balance": "1600",
      "available_balance": "1500",
      "type": "Checking",
      "is_default": false,
      "is_active": true,
      "is_link_verified": true,
      "link_verified_date": "2018-01-01",
      "type": "Checking",
      "metadata": {}
    },
    {
      "id": "425a2f77-b24b-4d93-ba13-a7b6bd01e947",
      "create_date": "2018-04-12T17:34:17.000+0000",
      "update_date": "2018-04-12T17:34:17.000+0000",
      "client_id": null,
      "business_id": null,
      "account_id": "272d9271-be64-4eb8-a3f4-abc57ca547c2",
      "bank_account_holder": "Andrew Williams",
      "bank_account_number": "2552001002",
      "mask": "xxxxxx1002",
      "bank_account_name": "Bank 2 - Checking Account",
      "institution_name": "Bank XYZ2",
      "institution_id": null,
      "routing": "5289786002",
      "currency_code": "USD",
      "balance": "36754.04",
      "available_balance": "35754.04",
      "is_default": false,
      "is_active": true,
      "is_link_verified": true,
      "link_verified_date": "2018-02-10",
      "metadata": {}
    },
    {
      "id": "d787cf19-d11c-49f2-abf3-f5fec1b101d4",
      "create_date": "2018-04-09T20:46:14.000+0000",
      "update_date": "2018-04-09T20:46:14.000+0000",
      "client_id": null,
      "business_id": null,
      "account_id": "199a8c08-cdd5-4c8c-8abf-535447cea11b",
      "bank_account_holder": "JB Smith",
      "bank_account_number": "2552001001",
      "mask": "xxxxxx1001",
      "bank_account_name": "Bank XYZ - Checking Account1",
      "institution_name": "Bank XYZ",
      "institution_id": null,
      "routing": "5289786000",
      "routing_wire": "5289786011",
      "currency_code": "USD",
      "balance": "36760.00",
      "available_balance": "35760.00",
      "type": "Checking",
      "is_default": false,
      "is_active": true,
      "is_link_verified": true,
      "link_verified_date": "2018-02-10",
      "metadata": {}
    }
  ],
    "total_elements": 3,
    "last": true,
    "total_pages": 1,
    "first": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "number_of_elements": 16,
    "size": 25,
    "number": 0
}

Get all bank links defined for all clients defined for your tenant. The endpoint returns a list of UUIDs with details defined for each bank link. You can filter using an account_id to return the bank link(s) for a specific account.

HTTP REQUEST

GET /bank_link

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
              "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
              "bank_account_holder": "Jon Linndt",
              "bank_account_name": "HSBC Checking",
              "bank_account_number": "111111",
              "mask": "xx1111",
              "institution_name": "HSBC",
              "routing": "111111",
              "routing_wire": "111111-22",
              "currency_code": "USD",
              "balance": "1600",
              "available_balance": "1500",
              "type": "Checking",
              "is_active": true,
              "is_link_verified": true,
              "link_verified_date": "2018-01-01"
          }' "https://api.hydrogenplatform.com/nucleus/v1/bank_link"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# # # Create a BankLink
banklink = nucleus_api.BankLink(client_id="652584da-bc46-436e-9630-80c5d87b77ff", account_id="ef24a0d7-7a18-430a-857c-3b5e5582b2d1", bank_account_holder="John", bank_account_name="primary account", bank_account_number="66400085", mask="0776", routing="One", routing_wire=None, currency_code="GBP", balance="100.00", institution_name="Citi BAnk")
try:
    api_response = api_instance.create_bank_link_using_post(banklink)
    pprint(api_response)
except ApiException as e:
    print("create_bank_link_using_post: %s\n" % e)
FundingApi apiInstance = new FundingApi();
        //Create a Bank Link
        BankLink banklinknew = new BankLink();
        banklinknew.setClientId(UUID.fromString("652584da-bc46-436e-9630-80c5d87b77ff"));
        banklinknew.setAccountId(UUID.fromString("ef24a0d7-7a18-430a-857c-3b5e5582b2d1"));
        banklinknew.setBankAccountHolder("John Cena");
        banklinknew.setBankAccountName("Primary Account");
        banklinknew.setBankAccountNumber("65785457");
        banklinknew.setMask("0924");
        banklinknew.setRouting("One A");
        banklinknew.setRoutingWire(null);
        banklinknew.setCurrencyCode("USD");
        banklinknew.setBalance(500.00);

        try {
            BankLink response = apiInstance.createBankLinkUsingPost(banklinknew);
            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling createBankLinkUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//Create BankLink
$banklink = new \com\hydrogen\nucleus\Model\BankLink();

try {
    $banklink->setClientId("652584da-bc46-436e-9630-80c5d87b77ff");
    $banklink->setAccountId("ef24a0d7-7a18-430a-857c-3b5e5582b2d1");
    $banklink->setBankAccountHolder("ABc");
    $banklink->setBankAccountNumber("76");
    $banklink->setBankAccountName("New");
    $banklink->setMask("6565");
    $banklink->setRouting("766");
    $banklink->setRoutingWire("654");
    $banklink->setCurrencyCode("GBP");
    $banklink->setBalance("655");
    $banklink->setInstitutionName("ABC");

    $result = $apiInstance->createBankLinkUsingPost($banklink);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createBankLinkUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#Create BankLink
banklink = NucleusApi::BankLink.new

begin
  banklink.client_id = "652584da-bc46-436e-9630-80c5d87b77ff"
  banklink.account_id = "ef24a0d7-7a18-430a-857c-3b5e5582b2d1"
  banklink.bank_account_holder = "Nick"
  banklink.bank_account_name = "saving"
  banklink.bank_account_number = "7765"
  banklink.mask = "6654"
  banklink.routing = "664"
  banklink.routing_wire = "65767"
  banklink.currency_code = "USD"
  banklink.balance = "600"
  result = api_instance.create_bank_link_using_post(banklink)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_bank_link_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
Create a Bank Link
var banklink = new HydrogenNucleusApi.BankLink();
banklink.client_id = '652584da-bc46-436e-9630-80c5d87b77ff';
banklink.account_id = 'ef24a0d7-7a18-430a-857c-3b5e5582b2d1';
banklink.bank_account_holder = "ABC"
banklink.bank_account_number = "68757776";
banklink.mask = "656";
banklink.routing = "767";
banklink.balance = "200";
banklink.institution_name = "New";
var newbanklink = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createBankLinkUsingPost(banklink, newbanklink)

Example Response

{
  "id": "4ff21db3-97ab-4bbd-9885-be6aec522c44",
  "create_date": "2018-04-12T17:34:17.000+0000",
  "update_date": "2018-04-12T17:34:17.000+0000",
  "client_id": null,
  "business_id": null,
  "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "bank_account_holder": "Jon Linndt",
  "bank_account_name": "HSBC Checking",
  "bank_account_number": "111111",
  "mask": "xx1111",
  "institution_name": "HSBC",
  "institution_id": null,
  "routing": "111111",
  "routing_wire": "111111-22",
  "currency_code": "USD",
  "balance": "1600",
  "available_balance": "1500",
  "type": "Checking",
  "is_default": false,
  "is_active": true,
  "is_link_verified": true,
  "link_verified_date": "2018-01-01",
  "metadata": {}
}

Create a new bank link for an account. The unique account_id must be provided. To obtain the appropriate account_id, use the GET /account endpoint to view all the accounts defined for your tenant. The create_date will default to the current date. The endpoint returns a bank_link_id used to manage the bank link going forward.

HTTP REQUEST

POST /bank_link

ARGUMENTS

Parameter Type Required Description
bank_account_holder string required Name of the individual that owns the bank account
bank_account_number string required Account number of the bank account
institution_name string required, conditional Name of the institution for the bank link, e.g. HSBC. Either this name or the institution_id must be supplied.
institution_id UUID required, conditional ID of the institution resource for this bank link. Either this name or the institution_name must be supplied.
routing string required Routing number of the bank for the bank link
routing_wire string optional Routing number of the bank for the bank link used for wire transfers
mask string optional The masked version of the bank account number for this bank link
bank_account_name string optional Name of the bank account, e.g. Mike’s HSBC Checking
client_id UUID optional The id of the client to which the bank link belongs
business_id UUID optional The of for the business to which the bank link belongs
account_id UUID optional The id of the account to which the bank link belongs
currency_code string optional Alphabetic currency code for the base currency of the bank account linked, limited to 3 characters. See currency codes
balance string optional Current balance of the bank account
available_balance string optional Available balance of the bank account, usually taking into consideration pending transactions or available overdraft
type string optional Used to indicate the type of bank account for this bank link such as a ‘savings’ account
is_default boolean optional Indicates if the bank link is the default link for a client. Only one bank link may be default for a client_id. If a user sets a bank link to is_default = “true” then all other bank links for that client_id will be set to is_default = “false.” Defaults to false which indicates the bank link is not default
is_active boolean optional Indicates if the bank link is active. Defaults to true which indicates it is active
is_link_verified boolean optional Indicates if the bank link has been verified. Defaults to false which indicates it has not been verified
link_verified_date date optional Date and time that the bank link was verified
metadata map optional Custom information associated with the bank link in the format key:value. See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/bank_link/d787cf19-d11c-49f2-abf3-f5fec1b101d4"
FundingApi apiInstance = new FundingApi();
        try {
            BankLink responseBankLink = apiInstance.getBankLinkUsingGet(UUID.fromString("6d6eb20a-a331-4789-a90d-9698756e506f"), null);
            System.out.println(responseBankLink);
        } catch (ApiException e) {
            System.err.println("Exception when calling getBankLinkUsingGet");
            e.printStackTrace();
        }
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_bank_link_using_get("8ef52bdc-e521-4c6e-b4f6-5fb889b8ba18")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_bank_link_using_get: %s\n" % e)
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
$bank_link_id = "6d6eb20a-a331-4789-a90d-9698756e506f"; // string | UUID bank_link_id
$currency_conversion = null; // string | USD

try {
    $banklinklist = $apiInstance->getBankLinkUsingGet($bank_link_id, $currency_conversion);
    print_r($banklinklist);
} catch (Exception $e) {
    echo 'Exception when calling FundingApi->getBankLinkUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
bank_link_id = '6d6eb20a-a331-4789-a90d-9698756e506f' # String | UUID bank_link_id

opts = {
    currency_conversion: null, # String | USD
}

begin
  banklink = api_instance.get_bank_link_using_get(bank_link_id, opts)
  p banklink
rescue NucleusApi::ApiError => e
  puts "Exception when calling FundingApi->get_bank_link_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
var banklinkID = "6d6eb20a-a331-4789-a90d-9698756e506f";

var opts = {
    'currencyConversion': null, // String | USD
};


var banklink = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBankLinkUsingGet(banklinkID, banklink)

Example Response

{
  "id": "4ff21db3-97ab-4bbd-9885-be6aec522c44",
  "create_date": "2018-04-12T17:34:17.000+0000",
  "update_date": "2018-04-12T17:34:17.000+0000",
  "client_id": null,
  "business_id": null,
  "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "bank_account_holder": "Jon Linndt",
  "bank_account_name": "HSBC Checking",
  "bank_account_number": "111111",
  "mask": "xx1111",
  "institution_name": "HSBC",
  "institution_id": null,
  "routing": "111111",
  "routing_wire": "111111-22",
  "currency_code": "USD",
  "balance": "1600",
  "available_balance": "1500",
  "type": "Checking",
  "is_default": false,
  "is_active": true,
  "is_link_verified": true,
  "link_verified_date": "2018-01-01",
  "metadata": {}
}

Retrieve the information for a bank link for an account. The unique bank_link_id must be provided. The endpoint returns the details for the bank link specified.

HTTP REQUEST

GET /bank_link/{bank_link_id}

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
                "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
                "bank_account_holder": "Jon Linndt",
                "bank_account_name": "HSBC Checking",
                "bank_account_number": "111111",
                "mask": "xx1111",
                "institution_name": "HSBC",
                "routing": "111111",
                "routing_wire": "111111-22",
                "currency_code": "USD",
                "balance": "1600",
                "available_balance": "1600",
                "type": "Checking",
                "is_active": true,
                "is_link_verified": true,
                "link_verified_date": "2018-01-01",
                "metadata": {}
           }' "https://api.hydrogenplatform.com/nucleus/v1/bank_link/d787cf19-d11c-49f2-abf3-f5fec1b101d4"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# # Update a BankLink
banklink_update = {'balance': '1000'}
banklink_id = '2f5d07fd-f566-487b-accb-86ea1deb33d9'
try:
    api_response = api_instance.update_bank_link_bulk_using_put(banklink_update, banklink_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_bank_link_bulk_using_put: %s\n" % e)
FundingApi apiInstance = new FundingApi();
        //Update a BankLink
        BankLink update = new BankLink();
        update.setCurrencyCode("GBP");
        update.setBalance(100.00);

                try {
            BankLink updateResponse = apiInstance.updateBankLinkUsingPut(update, UUID.fromString("8ca49c52-babf-4a32-b721-af9a1d77ee93"));
            System.out.println(updateResponse);
        } catch (ApiException e) {
            System.err.println("Exception when calling updateBankLinkUsingPut");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//Update BankLink
$banklink_update = new stdClass();
$banklink_id = "4954981c-2d15-4994-8a34-7f746783fbf0";

try {
    $banklink_update->bank_account_name = "BAC";
    $result = $apiInstance->updateBankLinkUsingPut($banklink_update, $banklink_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateBankLinkUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#Update BankLink
banklink_update = {"currency_code" => 'CAD'}
banklink_id = '1f717704-4b85-41c7-89e5-0e8f8a049ac8'
begin
  result = api_instance.update_bank_link_bulk_using_put(banklink_update, banklink_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_bank_link_bulk_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
//Update BankLink
var apiInstance = new HydrogenNucleusApi.FundingApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var banklinkupdate = new HydrogenNucleusApi.BankLink();
var banklinkid = '84917a19-509e-443d-8a7a-2988d614e5ef';

banklinkupdate.institution_name = "New A";
apiInstance.updateBankLinkUsingPut(banklinkupdate, banklinkid, callback)

Example Response

{
  "id": "4ff21db3-97ab-4bbd-9885-be6aec522c44",
  "create_date": "2018-04-12T17:34:17.000+0000",
  "update_date": "2018-04-12T17:34:17.000+0000",
  "client_id": null,
  "business_id": null,
  "account_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
  "bank_account_holder": "Jon Linndt",
  "bank_account_name": "HSBC Checking",
  "bank_account_number": "111111",
  "mask": "xx1111",
  "institution_name": "HSBC",
  "institution_id": null,
  "routing": "111111",
  "routing_wire": "111111-22",
  "currency_code": "USD",
  "balance": "1600",
  "available_balance": "1600",
  "type": "Checking",
  "is_default": false,
  "is_active": true,
  "is_link_verified": true,
  "link_verified_date": "2018-01-01",
  "metadata": {}
}

Update the information for a bank link for an account. The unique bank_link_id must be provided. To obtain the appropriate bank_link_id, use the GET /bank_link endpoint to view all the bank links defined for your tenant and their current information. The details to be updated must also be provided. The endpoint returns the bank_link_id and all of the details for the bank link. If you wish to have a bank link be no longer available for use without permanently deleting it entirely, then use this endpoint to update the is_active field to false.

HTTP REQUEST

PUT /bank_link/{bank_link_id}

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/bank_link/d787cf19-d11c-49f2-abf3-f5fec1b101d4"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# # Delete a BankLink
bankl_id = '0de21665-f284-426d-a16d-300a3399f590'
try:
    api_instance.delete_bank_link_using_delete(bankl_id)
except ApiException as e:
    print("Exception when delete_bank_link_using_delete: %s\n" % e)
FundingApi apiInstance = new FundingApi();
        // Delete a BankLink
        try {
            BankLink deleteresponse = apiInstance.deleteBankLinkUsingDelete(UUID.fromString("305d4dd9-0c1e-4230-9d26-d459957ece09"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//Delete bankLink
$banklink_did = "9f23be21-b960-457c-95c7-ac5f8725ab9d"; // string | UUID account_id

try {
    $apiInstance->deleteBankLinkUsingDelete($banklink_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deleteBankLinkUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#Delete BankLink
banklink1_id = 'd71792e1-334b-4aea-89d7-2e8d84cbfc39'
begin
  result = api_instance.delete_bank_link_using_delete(banklink1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_bank_link_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
// // //Delete a BankLink
var banklinkd = "097cad0f-30d3-4394-a219-479c185285c8";


var deletebanklink = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deleteBankLinkUsingDelete(banklinkd, deletebanklink)

Response (204 No Content)

Permanently delete a bank link defined for an account. The unique bank_link_id must be provided. To obtain the appropriate bank_link_id, use the GET /bank_link endpoint to view all the bank links defined for your tenant. This will delete the bank_link_id and the associated information so that the bank link can no longer be used. If you wish to have the bank link be no longer available for use without permanently deleting it entirely, then use the PUT /bank_link/{bank_link_id} endpoint to update the is_active field to mark the bank_link_id as inactive.

HTTP REQUEST

DELETE /bank_link/{bank_link_id}

Funding

Funding Requests

Funding records represent requests to move money to/from a client’s account. All funding transactions to/from the account will always be connected to a funding request.

Field Type Description
id UUID The id for the specific funding request
currency_code string Alphabetic currency code for the request, limited to 3 characters. See currency codes
amount double Amount that is included in the funding request
threshold_amount double Amount set for a threshold to perform the funding request, such as an auto reload
account_id UUID The id for the account that will be submitting the funding request
receiving_account_id UUID The id for the account that will be receiving the funding request
business_id UUID The id for the business that will be initiating the funding request
card_id UUID The id for the card that will be receiving the funding request
description string Description for the request, such as “Initial Funding”
bank_link_id UUID In the case that the funding request relates to a specific bank link, the id of the bank link providing the funds for the funding request
receiving_bank_link_id UUID In the case that the funding request is sending money to another bank link, the id of the bank link
transfer_id UUID In the case that the funding request relates to the transfer of an external account into the account, the id of the transfer
portfolio_id UUID In the case that the funding request relates to a specific portfolio, the id of the portfolio where the funds are moving from
receiving_portfolio_id UUID In the case that the funding request relates to a specific portfolio, the id of the portfolio where the funds are moving to
support_ticket_id UUID DEPRECATED In the case that the funding request is attached to a Support Ticket, the id of the ticket
funding_type string The type of the funding transaction. Value may be bank_transfer, wire_transfer, cash, debit_card, credit_card, card_load, check, stock_certificate, digital_wallet, money_order, account_transfer, or other
transfer_type string Type of request if a bank_transfer. Value may be push or pull
transfer_speed string Speed of request if a bank_transfer. Value may be real_time, same_day, next_day, or standard
funding_status string Status of the funding request. Value may be received, initiated, processing, declined, cancelled, or completed.
frequency_unit string Frequency of the funding request. Value may be auto, one_time, daily, weekly, monthly, quarterly, or annually
frequency integer Number of frequency_unit between each request. For example, if the frequency_unit is weekly and the frequency is 2, this means the funding request occurs every two weeks. Default is 1
start_date date The date that the funding request should start
end_date date In the case that the funding request is recurring, the date that the funding request should stop occurring
last_request_date date The last date a recurring deposit or withdrawal was made to/from an account
next_request_date date The next date a recurring deposit or withdrawal is scheduled to/from an account
is_deposit boolean Indicator if the funding request is a deposit. true indicates it is a deposit, false a withdrawal
is_active boolean Indicates if the funding request is currently active. Defaults to true which indicates it is active
metadata map Custom information associated with the funding request in the format key:value. See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all funding requests

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/funding"
FundingApi apiInstance = new FundingApi();
        try {
            PageFunding List = apiInstance.getFundingAllUsingGet(true, null, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getFundingAllUsingGet");
            e.printStackTrace();
        }
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_funding_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_funding_all_using_get: %s\n" % e)
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $fundinglist = $apiInstance->getFundingAllUsingGet($ascending, $currency_conversion, $filter, $order_by, $page, $size);
    print_r($fundinglist);
} catch (Exception $e) {
    echo 'Exception when calling FundingApi->getFundingAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | currency_conversion
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  result = api_instance.get_funding_all_using_get(opts)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling FundingApi->get_funding_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var fundinglist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getFundingAllUsingGet(opts, fundinglist)

Example Response

{
    "content": [
    {
        "id": "708689ce-b0fd-4062-9954-6c8dd82707cf",
        "create_date": "2018-04-12T17:30:21.000+0000",
        "update_date": "2018-04-13T17:12:46.000+0000",
        "currency_code": "USD",
        "amount": 2000,
        "threshold_amount": null,
        "account_id": "04907eaa-3f33-49be-a35b-378cdf639fba",
        "receiving_account_id": "null",
        "business_id": null,
        "card_id": null,
        "bank_link_id": null,
        "receiving_bank_link_id": null,
        "portfolio_id": null,
        "receiving_portfolio_id": null,
        "description": "recurring funding",
        "frequency_unit": "one_time",
        "start_date": "2018-01-01",
        "end_date": "2019-01-01",
        "is_active": true,
        "is_deposit": true,
        "funding_type": "bank_transfer",
        "transfer_type": "push",
        "transfer_speed": "standard",
        "funding_status": "completed",
        "frequency": 2,
        "metadata": {}
    },
    {
        "id": "43a983e7-c930-443b-a499-53767814b07d",
        "create_date": "2018-03-19T16:06:47.000+0000",
        "update_date": "2018-03-19T16:06:47.000+0000",
        "currency_code": "USD",
        "amount": 2000,
        "threshold_amount": null,
        "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
        "receiving_account_id": "null",
        "business_id": null,
        "card_id": null,
        "bank_link_id": null,
        "receiving_bank_link_id": null,
        "portfolio_id": null,
        "receiving_portfolio_id": null,
        "frequency_unit": "monthly",
        "support_ticket_id": null,
        "start_date": "2018-01-01",
        "is_active": true,
        "is_deposit": true,
        "funding_type": "bank_transfer",
        "transfer_type": "push",
        "transfer_speed": "standard",
        "funding_status": "completed",
        "frequency": 2,
        "metadata": {}
    },
    {
        "id": "9f5d3254-95c5-4c9d-8fad-f47c801bb888",
        "create_date": "2018-02-28T21:58:26.000+0000",
        "update_date": "2018-03-19T16:05:40.000+0000",
        "currency_code": "USD",
        "amount": 2000,
        "threshold_amount": null,
        "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
        "receiving_account_id": "null",
        "business_id": null,
        "card_id": null,
        "bank_link_id": null,
        "receiving_bank_link_id": null,
        "portfolio_id": null,
        "receiving_portfolio_id": null,
        "frequency_unit": "monthly",
        "start_date": "2018-01-01",
        "is_active": true,
        "is_deposit": true,
        "funding_type": "bank_transfer",
        "transfer_type": "pull",
        "transfer_speed": "standard",
        "funding_status": "completed",
        "frequency": 2,
        "metadata": {}
    }
    ],
    "last": true,
    "total_elements": 3,
    "total_pages": 1,
    "first": true,
    "sort": [
        {
            "direction": "DESC",
            "property": "updateDate",
            "ignore_case": false,
            "null_handling": "NATIVE",
            "ascending": false,
            "descending": true
        }
    ],
    "number_of_elements": 3,
    "size": 25,
    "number": 0
}

Get the information for all funding requests defined for your tenant. You can filter using an account_id to return the funding requests for a specific account. Note that the metadata information is stored as a nested object within the order record object.

HTTP REQUEST

GET /funding

Create a funding request

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
            "amount": 2000,
            "currency_code": "USD",
            "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "frequency_unit": "monthly",
            "start_date": "2018-01-01",
            "is_active": true,
            "is_deposit": true,
            "funding_type": "bank_transfer",
            "transfer_type": "push",
            "transfer_speed": "standard",
            "funding_status": "completed",
            "frequency": 2
      }' "https://api.hydrogenplatform.com/nucleus/v1/funding"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# # Create a Funding
funding = nucleus_api.Funding(amount="200", currency_code="GBP", receiving_account_id="aa339d0b-2f96-476a-a0db-caca07d69168", card_id="6e660df4-530e-41d4-80fa-1471f0a5e5ef", description="New", frequency_unit="one_time", start_date="2020-10-10", end_date="2020-10-15", is_active="true", is_deposit="false", funding_type="bank_transfer", funding_status="initiated", frequency="1")
try:
    api_response = api_instance.create_funding_using_post(funding)
    pprint(api_response)
except ApiException as e:
    print("create_funding_using_post: %s\n" % e)
FundingApi apiInstance = new FundingApi();
        //Create a Funding
        Funding createfunding = new Funding();
        createfunding.setAmount(100.00);
        createfunding.setCurrencyCode("USD");
        createfunding.setReceivingAccountId(UUID.fromString("aa339d0b-2f96-476a-a0db-caca07d69168"));
        createfunding.setCardId(UUID.fromString("d532512d-bef7-4319-a018-c5955408f420"));
        createfunding.setDescription("One");
        createfunding.setFrequencyUnit("one_time");
        createfunding.setStartDate(date1);
        createfunding.setEndDate(date2);
        createfunding.setIsActive(true);
        createfunding.setIsDeposit(false);
        createfunding.setFundingType("bank_transfer");
        createfunding.setFundingStatus("initiated");
        createfunding.frequency(1);

        try {
            Funding response = apiInstance.createFundingUsingPost(createfunding);
            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling createFundingUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//Create Funding
$funding = new \com\hydrogen\nucleus\Model\Funding();

try {
    $funding->setReceivingAccountId("aa339d0b-2f96-476a-a0db-caca07d69168");
    $funding->setCardId("d532512d-bef7-4319-a018-c5955408f420");
    $funding->setAmount("100");
    $funding->setCurrencyCode("USD");
    $funding->setDescription("New");
    $funding->setFrequencyUnit("one_time");
    $funding->setStartDate("2020-10-10");
    $funding->setEndDate("2020-10-15");
    $funding->setIsActive("true");
    $funding->setIsDeposit("false");
    $funding->setFundingType("bank_transfer");
    $funding->setFundingStatus("initiated");
    $funding->setFrequency("1");

    $result = $apiInstance->createFundingUsingPost($funding);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createFundingUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#Create Funding
funding = NucleusApi::Funding.new

begin
  funding.receiving_account_id = "aa339d0b-2f96-476a-a0db-caca07d69168"
  funding.account_id = "d532512d-bef7-4319-a018-c5955408f420"
  funding.amount = "500"
  funding.currency_code = "GBP"
  funding.description = "New"
  funding.frequency_unit = "one_time"
  funding.start_date = "2020-10-10"
  funding.end_date = "2020-10-16"
  funding.is_active = "true"
  funding.is_deposit = "true"
  funding.funding_type = "bank_transfer"
  funding.funding_status = "started"
  funding.frequency = "1"
  result = api_instance.create_funding_using_post(funding)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_funding_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
Create a Funding
var funding = new HydrogenNucleusApi.Funding();
funding.receiving_account_id = 'aa339d0b-2f96-476a-a0db-caca07d69168';
funding.card_id = 'd532512d-bef7-4319-a018-c5955408f420';
funding.description = "uyt";
funding.frequency_unit = "one_time";
funding.start_date = "2020-09-10";
funding.end_date = "2020-10-10";
funding.is_active = "true";
funding.is_deposit = "true";
funding.funding_type = "bank_transfer";
funding.funding_status = "initiated";
funding.frequency = "1";

var newfunding = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createFundingUsingPost(funding, newfunding)

Example Response

{
    "id": "9f5d3254-95c5-4c9d-8fad-f47c801bb888",
    "create_date": "2018-02-28T21:58:26.000+0000",
    "currency_code": "USD",
    "amount": 2000,
    "threshold_amount": null,
    "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
    "receiving_account_id": "null",
    "business_id": null,
    "card_id": null,
    "bank_link_id": null,
    "receiving_bank_link_id": null,
    "portfolio_id": null,
    "receiving_portfolio_id": null,
    "frequency_unit": "monthly",
    "start_date": "2018-01-01",
    "is_active": true,
    "is_deposit": true,
    "funding_type": "bank_transfer",
    "transfer_type": "push",
    "transfer_speed": "standard",
    "funding_status": "completed",
    "frequency": 2,
    "metadata": {}
}

Create a new funding request for an account. The unique account_id must be provided. To obtain the appropriate account_id, use the GET /account endpoint to view all the accounts defined for your tenant. The create_date will default to the current date. The endpoint returns a funding_id used to manage the funding request. Note that the metadata information is stored as a nested object within the order record object.

HTTP REQUEST

POST /funding

ARGUMENTS

Parameter Type Required Description
account_id UUID required, conditional The id for the account that will be receiving the funding request
receiving_account_id UUID required, conditional The id for the account that will be receiving the funding request
bank_link_id UUID required, conditional In the case that the funding request relates to a specific bank link, the id of the bank link providing the funds for the funding request
receiving_bank_link_id UUID required, conditional In the case that the funding request is sending money to another bank link, the id of the bank link
portfolio_id UUID required, conditional In the case that the funding request relates to a specific portfolio, the id of the portfolio where the funds are moving from
receiving_portfolio_id UUID required, conditional In the case that the funding request relates to a specific portfolio, the id of the portfolio where the funds are moving to
funding_type string required The type of the funding transaction. Value may be bank_transfer, wire_transfer, cash, debit_card, credit_card, card_load, check, stock_certificate, digital_wallet, money_order, account_transfer, or other
funding_status string required Status of the funding request. Value may be received, initiated, processing, declined, cancelled, or completed.
frequency_unit string required Frequency of the funding request. Value may be auto, one_time, daily, weekly, monthly, quarterly, or annually
is_deposit boolean required Indicates if the funding request is a deposit. true indicates it is a deposit, false a withdrawal
start_date date required The date that the funding request should start
end_date date optional In the case that the funding request is recurring, the date that the funding request should stop occurring
last_request_date date optional The last date a recurring deposit or withdrawal was made to/from an account
next_request_date date optional The next date a recurring deposit or withdrawal is scheduled to/from an account
frequency integer optional Number of frequency_unit between each request. For example, if the frequency_unit is weekly and the frequency is 2, this means the funding request occurs every two weeks. Default is 1
description string optional Description for the request, such as “Initial Funding”
currency_code string optional Alphabetic currency code for the request, limited to 3 characters. See currency codes
amount double optional Amount that is included in the funding request
threshold_amount double optional Amount set for a threshold to perform the funding request, such as an auto reload
business_id UUID optional The id for the business that will be initiating the funding request
card_id UUID optional The id for the card that will be receiving the funding request
transfer_id UUID optional In the case that the funding request relates to the transfer of an external account into the account, the id of the transfer
support_ticket_id UUID optional DEPRECATED In the case that the funding request is attached to a Support Ticket, the id of the ticket
is_active boolean optional Indicates if the funding request is currently active. Defaults to true which indicates it is active.
transfer_type string optional Type of request if a bank_transfer. Value may be push or pull
transfer_speed string optional Speed of request if a bank_transfer. Value may be real_time, same_day, next_day, or standard
metadata map optional Custom information associated with the funding request in the format key:value. See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a funding request

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/funding/9f5d3254-95c5-4c9d-8fad-f47c801bb888"
FundingApi apiInstance = new FundingApi();
        try {
            Funding responseFunding = apiInstance.getFundingUsingGet(UUID.fromString("7757d65d-c42f-4ff4-afeb-08885b7ff513"), null);
            System.out.println(responseFunding);
        } catch (ApiException e) {
            System.err.println("Exception when calling getFundingUsingGet");
            e.printStackTrace();
        }
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_funding_using_get("fc935c5b-9d05-42bf-b126-f1e7cb8bfa52")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_funding_using_get: %s\n" % e)
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
$funding_id = "7757d65d-c42f-4ff4-afeb-08885b7ff513"; // string | UUID funding_id
$currency_conversion = null; // string | USD

try {
    $funding = $apiInstance->getFundingUsingGet($funding_id, $currency_conversion);
    print_r($funding);
} catch (Exception $e) {
    echo 'Exception when calling FundingApi->getFundingUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
funding_id = '7757d65d-c42f-4ff4-afeb-08885b7ff513' # String | UUID funding_id

opts = {
    currency_conversion: null, # String | USD
}

begin
  funding = api_instance.get_funding_using_get(funding_id, opts)
  p funding
rescue NucleusApi::ApiError => e
  puts "Exception when calling FundingApi->get_funding_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
var fundingID = "7757d65d-c42f-4ff4-afeb-08885b7ff513";

var opts = {
    'currencyConversion': null, // String | USD
};


var funding = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getFundingUsingGet(fundingID, opts, funding)

Example Response

{
    "id": "9f5d3254-95c5-4c9d-8fad-f47c801bb888",
    "create_date": "2018-02-28T21:58:26.000+0000",
    "update_date": "2018-03-19T16:05:40.000+0000",
    "currency_code": "USD",
    "amount": 2000,
    "threshold_amount": null,
    "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
    "receiving_account_id": "null",
    "portfolio_id": null,
    "receiving_portfolio_id": null,
    "business_id": null,
    "card_id": null,
    "bank_link_id": null,
    "receiving_bank_link_id": null,
    "frequency_unit": "monthly",
    "start_date": "2018-01-01",
    "is_active": true,
    "is_deposit": true,
    "funding_type": "bank_transfer",
    "transfer_type": "push",
    "transfer_speed": "standard",
    "funding_status": "completed",
    "frequency": 2,
    "metadata": {}
}

Retrieve the information for a funding request for an account. The unique funding_id must be provided. The endpoint returns the details for the funding request specified.

HTTP REQUEST

GET /funding/{funding_id}

Update a funding request

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
          "amount": 2000,
          "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
          "frequency_unit": "monthly",
          "start_date": "2018-01-01",
          "is_active": true,
          "is_deposit": true,
          "funding_type": "bank_transfer",
      "transfer_type": "push",
          "funding_status": "completed",
          "frequency": 2
        }' "https://api.hydrogenplatform.com/nucleus/v1/funding/9f5d3254-95c5-4c9d-8fad-f47c801bb888"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# # Update a Funding
funding_update = {'balance': '1000'}
funding_id = '304aa4a1-f700-44f2-bd80-ba671cb7bc13'
try:
    api_response = api_instance.update_funding_using_put(funding_update, funding_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_funding_using_put: %s\n" % e)
FundingApi apiInstance = new FundingApi();
        //Update a Funding
        Map map2 = new HashMap();
        map2.put("currency_code", "CAD");

        try {
            Funding response = apiInstance.updateFundingUsingPut(map2, UUID.fromString("4eb240c1-b364-4e36-a2bb-cc1029b61bf6"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//Update Funding
$funding_update = new stdClass();
$funding_id = "06846d00-e806-4cda-849f-6ee06d003f8f";

try {
    $funding_update->funding_status = "started";
    $result = $apiInstance->updateFundingUsingPut($funding_update, $funding_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateFundingUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#Update Funding
funding_update = {"currency_code" => 'CAD'}
funding_id = '1c02f05a-0b24-4a74-aaf9-dcea175ce6ab'
begin
  result = api_instance.update_funding_using_put(funding_update, funding_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_funding_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
//Update Funding
var apiInstance = new HydrogenNucleusApi.FundingApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var fundingupdate = new HydrogenNucleusApi.Funding();
var fundingid = '55508201-9a8b-4d0f-aa70-2772e6ca6ee2';

fundingupdate.amount = "500";
apiInstance.updateFundingUsingPut(fundingupdate, fundingid, callback)

Example Response

{
    "id": "9f5d3254-95c5-4c9d-8fad-f47c801bb888",
    "create_date": "2018-02-28T21:58:26.000+0000",
    "update_date": "2018-03-19T16:05:40.000+0000",
    "currency_code": "USD",
    "amount": 2000,
    "threshold_amount": null,
    "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
    "receiving_account_id": "null",
    "portfolio_id": null,
    "receiving_portfolio_id": null,
    "business_id": null,
    "card_id": null,
    "bank_link_id": null,
    "receiving_bank_link_id": null,
    "frequency_unit": "monthly",
    "start_date": "2018-01-01",
    "is_active": true,
    "is_deposit": true,
    "funding_type": "bank_transfer",
    "transfer_type": "push",
    "transfer_speed": "standard",
    "funding_status": "completed",
    "frequency": 2,
    "metadata": {}
}

Update the information for a funding request for an account. The unique funding_id must be provided. To obtain the appropriate funding_id, use the GET /funding endpoint to view all funding requests defined for your tenant and their current information. The details to be updated must also be provided. The endpoint returns the funding_id and all of the details for the funding request. If you wish to have the funding request no longer occur without permanently deleting it entirely, then use this endpoint to update the end_date field to the date when you wish the funding request to stop occurring. You can also use this endpoint to change the is_active field to false.

HTTP REQUEST

PUT /funding/{funding_id}

Delete a funding request

Example Request

curl -X DELETE -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/funding/9f5d3254-95c5-4c9d-8fad-f47c801bb888"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# # Delete a Funding
funding_id = '1421ba03-b812-4549-b3f5-57e13601ce94'
try:
    api_instance.delete_funding_using_delete(funding_id)
except ApiException as e:
    print("Exception when delete_funding_using_delete: %s\n" % e)
FundingApi apiInstance = new FundingApi();
       // Delete a Funding
        try {
            Funding deleteresponse = apiInstance.deleteFundingUsingDelete(UUID.fromString("d155b0ed-7705-433b-a518-462881cdfa9b"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//Delete Funding
$funding_did = "1c02f05a-0b24-4a74-aaf9-dcea175ce6ab"; // string | UUID account_id

try {
    $apiInstance->deleteFundingUsingDelete($funding_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deleteFundingUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#Delete Funding
funding1_id = 'ac102cb5-c470-4e71-b2d1-93fea0cf81f2'
begin
  result = api_instance.delete_funding_using_delete(funding1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_funding_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
// // //Delete a Funding
var fundingd = "dd4aeeb8-8e3b-4d91-9503-a171194336a0";


var deletefunding = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deleteFundingUsingDelete(fundingd, deletefunding)

Response (204 No Content)

Permanently delete a funding request defined for an account. The unique funding_id must be provided. To obtain the appropriate funding_id, use the GET /funding endpoint to view all funding requests for your tenant. Deletes the funding_id and the funding request record. If you wish to have the funding request no longer occur without permanently deleting it entirely, then use the PUT /funding/{funding_id} endpoint to update the end_date field to the date when you wish the funding request to stop occurring. You can also use the PUT /funding/{funding_id} endpoint to change the is_active field to false.

HTTP REQUEST

DELETE /funding/{funding_id}

Funding Transaction

Funding transactions represent transactions related to a funding request. These may either be a deposit into an account, or a withdrawal from an account.

Field Type Description
id UUID The id for the specific funding transaction
account_id UUID The id for the account that is the destination of the transaction. Either an account_id or portfolio_id must be supplied.
portfolio_id UUID In the case that the transaction relates to a specific portfolio, the id of the portfolio where the funds are being deposited or withdrawn. Either an account_id or portfolio_id must be supplied.
currency_code string Alphabetic currency code for the request, limited to 3 characters. See currency codes
amount double Amount that is being deposited or withdrawn
is_deposit boolean Indicates if transaction is a deposit (“true”) or withdrawal (“false”)
funding_id UUID The id of the funding record that maps to this transaction
portfolio_transaction_id UUID In the case that the transaction relates to a specific portfolio, the id of the portfolio transaction
comments string Comment for the transaction such as “Funded”
type string Indicates the payment type such as “check, “wire”, etc.
fees double Any fees associated with the transaction
last_request_date timestamp In the case of recurring deposits or withdrawals, the last date and time requested
received_date timestamp Date and time that the transaction was received into the account
invested_date timestamp Date and time that the funds should be pulled from the funding request to be invested
status string Status of the transaction such as “Processing”. Use this field to track the status of the individual transaction if it is associated with a recurring Funding request
status_time_stamp timestamp Date and time that the status of the record was last updated
metadata map Custom information associated with the entity in the format key:value
See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

List all funding transactions

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/funding_transaction"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# List all FundingTransaction
try:
    api_response = api_instance.get_funding_transaction_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_funding_transaction_all_using_get: %s\n" % e)
FundingApi apiInstance = new FundingApi();
                //List All FundingTransaction
        try {
            PageFundingTransaction List = apiInstance.getFundingTransactionAllUsingGet(true, null, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getFundingAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//List all FundingTransaction
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $fundingtransaction = $apiInstance->getFundingTransactionAllUsingGet($ascending, $currency_conversion, $filter, $order_by, $page, $size);
    print_r($fundingtransaction);
} catch (Exception $e) {
    echo 'Exception when calling FundingApi->getFundingTransactionAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#List all FundingTransaction
opts = {
  ascending: false, # BOOLEAN | ascending
  currency_conversion: null, # String | currency_conversion
  filter: null, # String | filter
  order_by: null, # String | order_by
  page: 0, # Integer | page
  size: 25 # Integer | size
}

begin
  result = api_instance.get_funding_transaction_all_using_get(opts)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling FundingApi->get_funding_transaction_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
//List all Funding Transaction

var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var fundingtrans = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getFundingTransactionAllUsingGet(opts, fundingtrans)

Example Response

{
  "content": [
        {
            "id": "1a2bb85f-c1b4-41d5-9bf3-e23cce54b71c",
            "create_date": "2018-03-19T16:09:38.000+0000",
            "update_date": "2018-03-19T16:09:38.000+0000",
            "is_deposit": true,
            "currency_code": "USD",
            "amount": 2000,
            "funding_id": "43a983e7-c930-443b-a499-53767814b07d",
            "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "portfolio_id": null,
            "portfolio_transaction_id": null,
            "comments": "Add to 2018 IRA",
            "type": null,
            "fees": null,
            "invested_date": "2018-04-02T09:00:00.000+0000",
            "last_request_date": "2018-04-01T09:00:00.000+0000",
            "received_date": "2018-03-01T17:00:00.000+0000",
            "invested_date": null,
            "metadata": {}
        },
        {
            "id": "c1df397e-17c0-4fab-a61f-367f7ff90f57",
            "create_date": "2018-03-19T15:16:50.000+0000",
            "update_date": "2018-03-19T16:08:59.000+0000",
            "is_deposit": true,
            "currency_code": "USD",
            "amount": 2000,
            "funding_id": "43a983e7-c930-443b-a499-53767814b07d",
            "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "portfolio_id": null,
            "portfolio_transaction_id": null,
            "comments" : "Add to 2018 IRA",
            "type": null,
            "fees": null,
            "invested_date": "2018-03-02T09:00:00.000+0000",
            "last_request_date": "2018-03-01T09:00:00.000+0000",
            "received_date": "2018-03-01T17:00:00.000+0000",
            "invested_date": null,
            "metadata": {}
        },
        {
            "id": "08e5f077-0c8c-4831-a4cc-3a7a59e067d2",
            "create_date": "2018-03-19T15:16:47.000+0000",
            "update_date": "2018-03-19T15:16:47.000+0000",
            "is_deposit": true,
            "currency_code": "USD",
            "amount": 2000,
            "funding_id": "9f5d3254-95c5-4c9d-8fad-f47c801bb888",
            "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
            "portfolio_id": null,
            "portfolio_transaction_id": null,
            "comments" : "Add to 2018 IRA",
            "type": null,
            "fees": null,
            "invested_date": "2018-02-01T09:00:00.000+0000",
            "last_request_date": "2018-02-01T09:00:00.000+0000",
            "received_date": "2018-02-01T17:00:00.000+0000",
            "invested_date": null,
            "metadata": {}
        }
  ],
  "total_elements": 3,
  "last": true,
  "total_pages": 1,
  "first": true,
  "sort": [
      {
          "direction": "DESC",
          "property": "updateDate",
          "ignore_case": false,
          "null_handling": "NATIVE",
          "ascending": false,
          "descending": true
      }
    ],
    "number_of_elements": 4,
    "size": 25,
    "number": 0
}

Get the information for all funding transactions for all clients. The endpoint returns a list of UUIDs and details for each funding transaction. You can filter using the account_id to view funding transactions for a specific account.

HTTP REQUEST

GET /funding_transaction

Retrieve a funding transaction

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/funding_transaction/08e5f077-0c8c-4831-a4cc-3a7a59e067d2"
api_instance = nucleus_api.FundingApi(nucleus_api.ApiClient(configuration))
# Retrieve a FundingRequest
try:
    api_response = api_instance.get_funding_transaction_using_get("61fff359-6706-4465-a3ee-c1477756199c")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_funding_transaction_using_get: %s\n" % e)
FundingApi apiInstance = new FundingApi();

                //Retrieve a Funding transaction
        try {
            FundingTransaction responseFunding = apiInstance.getFundingTransactionUsingGet(UUID.fromString("61fff359-6706-4465-a3ee-c1477756199c"), null);
            System.out.println(responseFunding);
        } catch (ApiException e) {
            System.err.println("Exception when calling getFundingTransactionUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\FundingApi(
    new GuzzleHttp\Client(),
    $config);
//Retrieve a Funding Transaction
$funding_transfer_id = "61fff359-6706-4465-a3ee-c1477756199c"; // string | UUID external_account_transfer_id
$currency_conversion = null; // string | USD

try {
    $transfer = $apiInstance->getFundingTransactionUsingGet($funding_transfer_id, $currency_conversion);
    print_r($transfer);
} catch (Exception $e) {
    echo 'Exception when calling FundingApi->getFundingTransactionUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::FundingApi.new
#Retrieve a Funding Transaction
funding_trans_id = '2eef0616-0e78-4f0d-8a6b-a7e8634da852' # String | UUID funding_id

opts = {
  currency_conversion: null, # String | USD
}

begin
  funding = api_instance.get_funding_transaction_using_get(funding_trans_id, opts)
  p funding
rescue NucleusApi::ApiError => e
  puts "Exception when calling FundingApi->get_funding_transaction_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.FundingApi();
//Retrieve an FundingTransaction

var funding_transID = "0955402e-f8ed-4782-ae3a-eed6b7c6f55f";

var opts = {
    'currencyConversion': null, // String | USD
};


var fundingtrans = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getFundingTransactionUsingGet(funding_transID, opts, fundingtrans)

Example Response

{
    "id": "08e5f077-0c8c-4831-a4cc-3a7a59e067d2",
    "create_date": "2018-03-19T15:16:47.000+0000",
    "update_date": "2018-03-19T15:16:47.000+0000",
    "is_deposit": true,
    "funding_id": "9f5d3254-95c5-4c9d-8fad-f47c801bb888",
    "currency_code": "USD",
    "amount": 2000,
    "account_id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
    "portfolio_id": null,
    "portfolio_transaction_id": null,
    "comments" : "Add to 2018 IRA",
    "type": null,
    "fees": null,
    "invested_date": "2018-02-01T09:00:00.000+0000",
    "last_request_date": "2018-02-01T09:00:00.000+0000",
    "received_date": "2018-02-01T17:00:00.000+0000",
    "invested_date": null,
    "metadata": {}
}

Retrieve the information for a funding transaction for an account. The unique funding_transaction_id must be provided. The endpoint returns details for the funding transaction specified.

HTTP REQUEST

GET /funding_transaction/{funding_transaction_id}

Reward

These entities are used to store the data model for the Hydrogen Reward product.

Tenant Funded

All tenant funded rewards can be set on the Hydrogen Account Portal in a no-code environment. Please see further instructions in this article. Hydrogen managed debit programs will automatically capture all data required to run our rewards engine and disburse funds. For all other developers running your own program, you may follow the instructions below.

Account Creation

To sync clients, accounts, and cards, we provide both a daily CSV bulk upload option (contact us for sample file), OR upload via individual API call. Please see API instructions below:

  1. Create a Client
  2. Create an Account assigned to the Client
  3. Create a Portfolio assigned to the Account
  4. OPTIONAL Create a Card assigned to the Portfolio

All methods above also support a PUT when you need to update the data.

Transaction Uploads

To sync transactions, we provide both a daily CSV bulk upload option (contact us for sample file), OR upload via individual API call. Please see API instructions below:

  1. Create a Card Transaction
  2. OPTIONAL Create a Card Balance

Merchant Funded

Merchant funded card-linked and affiliate rewards coming soon…

Spend

These entities are used to store the data model for the Hydrogen Spend product.

Budget

This entity allows the user to add budget details for various categories so that they can track their spending against their budget over time.

Field Type Description
id UUID The id of the budget
name string Name of the budget
client_id UUID The ID of the client the budget belongs to
account_id UUID The ID of the account the budget belongs to
card_id UUID The ID of the card the budget belongs to
goal_id UUID The ID of a goal mapped to the budget
frequency_unit string Frequency of the budget. Value may be daily, weekly, bi-weekly, monthly, semi-monthly, quarterly, or annually
frequency integer Number of frequency_unit between each budget. For example, if the frequency_unit is weekly and the frequency is 2, this means the budget occurs every two weeks. Default is 1
currency_code string Alphabetic currency code for the base currency of the budget, limited to 3 characters. See currency codes
total_value double Total budget value if you do not wish to track by category
budget array(map) List of budget items and their descriptions if you wish to track by category
      category string Category of the budget
      subcategory string Subcategory of the budget
      value double Amount of the budget
start_date date The start date for the budget
end_date date The end date for the budget
is_active boolean Indicates if the budget is active. Defaults to true which indicates that it is currently active
metadata map Custom information associated with the budget in the format key:value
See Metadata
secondary_id string Alternate id that can be used to identify the budget such as an internal id
create_date timestamp Timestamp for the date and time that the budget was created
update_date timestamp Timestamp for the date and time that the budget was last updated

List all budgets

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/budget"
api_instance = nucleus_api.BudgetApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_budget_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_budget_all_using_get: %s\n" % e)
BudgetApi apiInstance = new BudgetApi();
        try {
            PageBudget List = apiInstance.getBudgetAllUsingGet(true, null, null, null, 0, 10 );
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getBudgetAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\BudgetApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$currency_conversion = null; // string | currency_conversion
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $budgetlist = $apiInstance->getBudgetAllUsingGet($ascending, $currency_conversion, $filter, $order_by, $page, $size);
    print_r($budgetlist);
} catch (Exception $e) {
    echo 'Exception when calling BudgetApi->getBudgetAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BudgetApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    currency_conversion: null, # String | currency_conversion
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}

begin
  budgetlist = api_instance.get_budget_all_using_get(opts)
  p budgetlist
rescue NucleusApi::ApiError => e
  puts "Exception when calling BudgetApi->get_budget_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BudgetApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var budgetlist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBudgetAllUsingGet(opts, budgetlist)

Example Response

{
    "content": [
        {
            "id": "ce77358c-1e00-4e75-8deb-bd35c4ad8e65",
            "name": "Budget - Jun 2015",
            "account_id": null,
            "goal_id": null,
            "card_id": null,
            "client_id": "1c92f054-e4a6-4e45-b29b-567587f34c27",
            "aggregation_accounts": [],
            "frequency_unit": "monthly",
            "frequency": 1,
            "currency_code": "USD",
            "total_value": null,
            "budget": [
                {
                    "category": "Food & Dining",
                    "subcategory": "Alcohol & Bars",
                    "value": 50.0
                },
                {
                    "category": "Health & Fitness",
                    "subcategory": "Sports",
                    "value": 50.0
                }
            ],
            "start_date": "2015-01-01",
            "end_date": "2016-12-31",
            "is_active": true,
            "metadata": {},
            "create_date": "2019-07-16T20:06:03.000+0000",
            "update_date": "2019-08-09T21:09:38.000+0000"
        },
        {
            "id": "2529eeef-583a-4f71-a511-9754e630f541",
            "name": "Fashion Budget",
            "account_id": null,
            "goal_id": null,
            "card_id": null,
            "client_id": "10e6db9e-d2b2-4806-9a19-2203f877ece1",
            "aggregation_accounts": [],
            "frequency_unit": "monthly",
            "frequency": 1,
            "currency_code": "USD",
            "total_value": null,
            "budget": [
                {
                    "category": "Fashion",
                    "subcategory": "Other Fashion",
                    "value": 50.0
                },
                {
                    "category": "Fashion",
                    "subcategory": "Clothing",
                    "value": 150.0
                },
                {
                    "category": "Fashion",
                    "subcategory": "Shoes",
                    "value": 150.0
                }
            ],
            "start_date": "2019-08-01",
            "end_date": "2020-08-01",
            "is_active": true,
            "metadata": {},
            "create_date": "2019-08-06T14:49:57.000+0000",
            "update_date": "2019-08-06T14:49:57.000+0000"
        }
    ],
  "total_pages": 1,
  "total_elements": 2,
  "last": false,
  "number_of_elements": 25,
  "first": true,
  "sort": [
      {
          "direction": "DESC",
          "property": "updateDate",
          "ignore_case": false,
          "null_handling": "NATIVE",
          "descending": true,
          "ascending": false
      }
  ],
  "size": 25,
  "number": 0
}

Get details for all budgets created within your firm. Note that the budget information and the metadata information are nested objects within the budget object.

HTTP REQUEST

GET /budget

Create a budget

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
          "client_id": "318d4823-f8ae-4324-98e4-b87f551e2a7e",
          "name": "Budget - Nov 2015",
          "frequency_unit": "monthly",
          "frequency": 1,
          "currency_code": "USD",
          "budget": [
            {
              "category": "Healthcare",
              "subcategory": "Vitamins",
              "value": 20.0
            },
            {
              "category": "Healthcare",
              "value": 70.0
            },
            {
              "category": "Gifts",
              "subcategory": "Wedding",
              "value": 90.0
            },
            {
              "category": "Leisure",
              "value": 100.0
            },
            {
              "category": "Loans",
              "subcategory": "Finance charge",
              "value": 30.0
            }
          ],
          "start_date": "2015-11-01",
          "end_date": "2015-11-30"
    }' "https://api.hydrogenplatform.com/nucleus/v1/budget"
api_instance = nucleus_api.BudgetApi(nucleus_api.ApiClient(configuration))
# # Create a Budget
budget = nucleus_api.Budget(name="New", client_id="120c7d8f-2c0c-4501-b393-1b7856028010", frequency="2", frequency_unit="monthly", currency_code="GBP", total_value="100.0")
try:
    api_response = api_instance.create_budget_using_post(budget)
    pprint(api_response)
except ApiException as e:
    print("create_budget_using_post: %s\n" % e)
BudgetApi apiInstance = new BudgetApi();
        //Create Budget

        Budget createBudget = new Budget();
        createBudget.setName("Abc");
        createBudget.setClientId(UUID.fromString("120c7d8f-2c0c-4501-b393-1b7856028010"));
        createBudget.setFrequency(2);
        createBudget.setFrequencyUnit("monthly");
        createBudget.currencyCode("USD");
        createBudget.setTotalValue(100.00);

                try {
            Budget result = apiInstance.createBudgetUsingPost(createBudget);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createBudgetUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\BudgetApi(
    new GuzzleHttp\Client(),
    $config);
//Create Budget
$budget = new \com\hydrogen\nucleus\Model\Budget();

try {
    $budget->setClientId("120c7d8f-2c0c-4501-b393-1b7856028010");
    $budget->setName("ANC");
    $budget->setFrequency("2");
    $budget->setFrequencyUnit("monthly");
    $budget->setCurrencyCode("GBP");
    $budget->setTotalValue("100");
    $result = $apiInstance->createBudgetUsingPost($budget);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createBudgetUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BudgetApi.new
#Create Budget
budget = NucleusApi::Budget.new

begin
  budget.client_id = "120c7d8f-2c0c-4501-b393-1b7856028010"
  budget.name = "New"
  budget.frequency = "2"
  budget.frequency_unit = "monthly"
  budget.currency_code = "USD"
  budget.total_value = "200"
  result = api_instance.create_budget_using_post(budget)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_budget_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BudgetApi();
//Create Budget
var budget = new HydrogenNucleusApi.Budget();
budget.name = "New";
budget.client_id = '120c7d8f-2c0c-4501-b393-1b7856028010';
budget.frequency = "2";
budget.frequency_unit = "monthly";
budget.currency_code = "USD";
budget.total_value = "100";


var newbudget = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createBudgetUsingPost(budget, newbudget)

Example Response

{
    "id": "c31322b7-f363-478f-93da-56994d08996e",
    "name": "Budget - Nov 2015",
    "account_id": null,
    "goal_id": null,
    "card_id": null,
    "client_id": "318d4823-f8ae-4324-98e4-b87f551e2a7e",
    "aggregation_accounts": [],
    "frequency_unit": "monthly",
    "frequency": 1,
    "currency_code": "USD",
    "total_value": null,
    "budget": [
        {
            "category": "Healthcare",
            "value": 70.0
        },
        {
            "category": "Healthcare",
            "subcategory": "Vitamins",
            "value": 20.0
        },
        {
            "category": "Leisure",
            "value": 100.0
        },
        {
            "category": "Loans",
            "subcategory": "Finance charge",
            "value": 30.0
        },
        {
            "category": "Gifts",
            "subcategory": "Wedding",
            "value": 90.0
        }
    ],
    "start_date": "2015-11-01",
    "end_date": "2015-11-30",
    "is_active": true,
    "metadata": {},
    "create_date": "2019-08-21T20:00:50.478+0000",
    "update_date": "2019-08-21T20:00:50.478+0000"
}

Create a new budget for a client. The create_date will default to the current date. The endpoint returns a unique budget_id that is used to manage the specific budget and referenced in other endpoints.

HTTP REQUEST

POST /budget

ARGUMENTS

Parameter Type Required Description
name string required Name of the budget
client_id UUID required The ID of the client the budget belongs to
account_id UUID optional The ID of the account the budget belongs to
card_id UUID optional The ID of the card the budget belongs to
goal_id UUID optional The ID of a goal mapped to the budget
currency_code string required Alphabetic currency code for the base currency of the budget, limited to 3 characters. See currency codes
total_value double required, conditional Total budget value if you do not wish to track by category. Either the total_value or values within the budget array must be set (not both at the same time).
budget array(map) required, conditional List of budget items and their descriptions if you wish to track by category. Either the total_value or values within the budget array must be set (not both at the same time).
      category string required Category of the budget
      subcategory string optional Subcategory of the budget
      value double required Value amount of the budget
frequency_unit string required Frequency of the budget. Value may be daily, weekly, bi-weekly, monthly, semi-monthly, quarterly, or annually
frequency integer optional Number of frequency_unit between each budget. For example, if the frequency_unit is weekly and the frequency is 2, this means the budget occurs every two weeks. Default is 1
start_date date optional The start date for the budget
end_date date optional The end date for the budget
is_active boolean optional Indicates if the budget is active. Defaults to true which indicates that it is currently active
metadata map optional Custom information associated with the budget in the format key:value
See Metadata
secondary_id string optional Alternate id that can be used to identify the budget such as an internal id

Retrieve a budget

Retrieve the information for a budget. The unique budget_id must be provided. The endpoint returns the budget_id and the details for the budget. Note that the budget information and the metadata information are nested objects within the budget object.

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/budget/c31322b7-f363-478f-93da-56994d08996e"
api_instance = nucleus_api.BudgetApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_budget_using_get("d70b7b4c-5dff-4ba1-88a1-c99cd1bc0ae4")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_budget_using_get: %s\n" % e)
BudgetApi apiInstance = new BudgetApi();
        try {
            Budget responseBudget = apiInstance.getBudgetUsingGet(UUID.fromString("d36b1d2c-1adb-4597-8682-22de246c25cb"), null);
            System.out.println(responseBudget);
        } catch (ApiException e) {
            System.err.println("Exception when calling getBudgetUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\BudgetApi(
    new GuzzleHttp\Client(),
    $config);
$budget_id = "d36b1d2c-1adb-4597-8682-22de246c25cb"; // string | UUID budget_id
$currency_conversion = null; // string | USD

try {
    $budget = $apiInstance->getBudgetUsingGet($budget_id, $currency_conversion);
    print_r($budget);
} catch (Exception $e) {
    echo 'Exception when calling BudgetApi->getBudgetUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BudgetApi.new
budget_id = 'd36b1d2c-1adb-4597-8682-22de246c25cb' # String | UUID budget_id

opts = {
    currency_conversion: null, # String | USD
}

begin
  budget = api_instance.get_budget_using_get(budget_id, opts)
  p budget
rescue NucleusApi::ApiError => e
  puts "Exception when calling BudgetApi->get_budget_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BudgetApi();
var budgetId = "d70b7b4c-5dff-4ba1-88a1-c99cd1bc0ae4";


var budget = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getBudgetUsingGet(budgetId, budget)

Example Response

{
    "id": "c31322b7-f363-478f-93da-56994d08996e",
    "name": "Budget - Nov 2015",
    "account_id": null,
    "goal_id": null,
    "card_id": null,
    "client_id": "318d4823-f8ae-4324-98e4-b87f551e2a7e",
    "aggregation_accounts": [],
    "frequency_unit": "monthly",
    "frequency": 1,
    "currency_code": "USD",
    "total_value": null,
    "budget": [
        {
            "category": "Healthcare",
            "value": 70.0
        },
        {
            "category": "Healthcare",
            "subcategory": "Vitamins",
            "value": 20.0
        },
        {
            "category": "Leisure",
            "value": 100.0
        },
        {
            "category": "Loans",
            "subcategory": "Finance charge",
            "value": 30.0
        },
        {
            "category": "Gifts",
            "subcategory": "Wedding",
            "value": 90.0
        }
    ],
    "start_date": "2015-11-01",
    "end_date": "2015-11-30",
    "is_active": true,
    "metadata": {},
    "create_date": "2019-08-21T20:00:50.000+0000",
    "update_date": "2019-08-21T20:00:50.000+0000"
}

HTTP REQUEST

GET /budget/{budget_id}

Update a budget

Example Request

curl -X PUT -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
            "budget": [
                {
                    "category": "Healthcare",
                    "subcategory": "Vitamins",
                    "value": 100.0
                },
                {
                    "category": "Gifts",
                    "subcategory": "Wedding / Wedding shower",
                    "value": 90.0
                },
                {
                    "category": "Leisure (daily / non-vacation)",
                    "value": 100.0
                },
                {
                    "category": "Loans",
                    "subcategory": "Finance charge / Interest",
                    "value": 30.0
                }
            ]
    }' "https://api.hydrogenplatform.com/nucleus/v1/budget/c31322b7-f363-478f-93da-56994d08996e"
api_instance = nucleus_api.BudgetApi(nucleus_api.ApiClient(configuration))
# #Update Budget
budget_Update = {'currency_code': 'USD'}
budget_id = '3eb62b3e-2771-4976-a99f-8831cfb7b968'
try:
    api_response = api_instance.update_budget_using_put(budget_Update, budget_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling update_budget_using_put: %s\n" % e)
BudgetApi apiInstance = new BudgetApi();
                //Update an Budget

        Map map = new HashMap();
        map.put("currency_code", "GBP");

        try {
            Budget response = apiInstance.updateBudgetUsingPut(map, UUID.fromString("b1bf95ce-c944-421a-834b-d5375d76ce78"));
            System.out.println(response);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\BudgetApi(
    new GuzzleHttp\Client(),
    $config);
//Update Budget
$budget_update = new stdClass();
$budget_id = "45ddcc95-40c4-4cee-b4b8-f721697a51a4";

try {
    $budget_update->currency_code = "GBP";
    $result = $apiInstance->updateBudgetUsingPut($budget_update, $budget_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->updateBudgetUsingPut: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BudgetApi.new
#Update Budget
budget_update = {"currency_code" => 'CAD'}
budget_id = 'b9d61151-4491-4575-bc11-15bc0ce54304'
begin
  result = api_instance.update_budget_using_put(budget_update, budget_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->update_budget_using_put: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BudgetApi();
//Update Budget
var apiInstance = new HydrogenNucleusApi.BudgetApi();
var callback = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
var budgetupdate = new HydrogenNucleusApi.Budget();
var budgetid = "2732ae83-7d8f-4403-95c8-8bff56f73dc3";

budgetupdate.currency_code = "GBP";
apiInstance.updateBudgetUsingPut(budgetupdate, budgetid, callback)

Example Response

{
    "id": "c31322b7-f363-478f-93da-56994d08996e",
    "name": "Budget - Nov 2015",
    "account_id": null,
    "goal_id": null,
    "card_id": null,
    "client_id": "318d4823-f8ae-4324-98e4-b87f551e2a7e",
    "aggregation_accounts": [],
    "frequency_unit": "monthly",
    "frequency": 1,
    "currency_code": "USD",
    "total_value": null,
    "budget": [
        {
            "category": "Healthcare",
            "subcategory": "Vitamins",
            "value": 100.0
        },
        {
            "category": "Leisure (daily / non-vacation)",
            "value": 100.0
        },
        {
            "category": "Loans",
            "subcategory": "Finance charge / Interest",
            "value": 30.0
        },
        {
            "category": "Gifts",
            "subcategory": "Wedding / Wedding shower",
            "value": 90.0
        }
    ],
    "start_date": "2015-11-01",
    "end_date": "2015-11-30",
    "is_active": true,
    "metadata": {},
    "create_date": "2019-08-21T20:00:50.000+0000",
    "update_date": "2019-08-21T20:00:50.000+0000"
}

Update the information for a budget. The unique budget_id must be provided. To obtain the appropriate budget_id, use the GET /budget endpoint to view all available budget_ids and their current information. The details to be updated must also be provided. The endpoint returns the budget_id and the details for the budget.

HTTP REQUEST

PUT /budget/{budget_id}

Delete a budget

Example Request

curl -X DELETE -H "Authorization: Bearer ce77358c-1e00-4e75-8deb-bd35c4ad8e65" \
    "https://api.hydrogenplatform.com/nucleus/v1/budget/c31322b7-f363-478f-93da-56994d08996e"
api_instance = nucleus_api.BudgetApi(nucleus_api.ApiClient(configuration))
# # #  # Delete a Budget
# budget_id = 'c05e219c-c197-4303-abb2-e0ce0dc43b5f'
try:
    api_instance.delete_budget_using_delete(budget_id)
except ApiException as e:
    print("Exception when delete_budget_using_delete: %s\n" % e)
BudgetApi apiInstance = new BudgetApi();
        ////   Delete Budget
        try {
            Budget deleteresponse = apiInstance.deleteBudgetUsingDelete(UUID.fromString("c0692f22-29f2-43b4-9782-bf629b3f5226"));
            System.out.println(deleteresponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\BudgetApi(
    new GuzzleHttp\Client(),
    $config);
//Delete Budget
$budget_did = "3eb62b3e-2771-4976-a99f-8831cfb7b968"; // string | UUID account_id

try {
    $apiInstance->deleteBudgetUsingDelete($budget_did);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->deleteBudgetUsingDelete: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::BudgetApi.new
#Delete Budget
budget1_id = '95c2cb30-760a-47d4-9260-2f3f4958b801'
begin
  result = api_instance.delete_budget_using_delete(budget1_id)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->delete_budget_using_delete: #{e}"
end
var apiInstance = new HydrogenNucleusApi.BudgetApi();
// //Delete a Budget
var budgetdid = "b9d61151-4491-4575-bc11-15bc0ce54304";


var deletebudget = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully.');
    }
};
apiInstance.deleteBudgetUsingDelete(budgetdid, deletebudget)

Response (204 No Content)

Permanently delete a budget. The unique budget_id must be provided. To obtain the appropriate budget_id, use the GET /budget endpoint to view all available budget_ids. This deletes the budget_id and all the budget information associated with it.

HTTP REQUEST

DELETE /budget/{budget_id}

Goal

Goal frameworks are defined firm-wide. The progress of each client is tracked in relation to one or more goals that the client has selected. A client may have multiple goals, and each goal may belong to one or more of the client’s accounts.

Field Type Description
id UUID The id of the goal
name string Name of the goal
parent_goal_id UUID In the case that a goal is related to a broader goal, the id of the broader goal
questionnaire_id UUID The id of the group of questions that are used to customize a goal for a client
is_decumulation boolean Indicator for whether or not the goal is a decumulation goal such as saving for retirement. Default is false, indicating that the goal is an accumulation goal. May be used in conjunction with the Proton API.
type string Type of goal used to identify similar goals. Can be used to differentiate between goal templates and client-specific goals
category string Category of the goal used to group goals together. For example, different large purchase goals could have a category of ‘Major Purchase’
client_id UUID If the goal is client-specific (not used by any other client), the id of the client to which it belongs
goal_amount double If the goal is client-specific, the target monetary amount to be reached within the goal horizon. May be used in conjunction with the Proton API. If the goal is not client-specific, please store under the account entity.
accumulation_horizon double If the goal is client-specific, the time horizon of the goal during the accumulation phase, in years. May be used in conjunction with the Proton API. If the goal is not client-specific, please store under the account entity.
decumulation_horizon double If the goal is client-specific, the time horizon of the goal during the decumulation phase, in years. If the goal is an accumulation goal, then this can be 0 or omitted entirely. May be used in conjunction with the Proton API. If the goal is not client-specific, please store under the account entity.
image string Icon or image for the goal either as a URL or file name that you will link to
is_active string Indicates if the goal is active. Defaults to true which indicates it is active
metadata map Custom information associated with the goal in the format key:value. See Metadata
secondary_id string Alternate id that can be used to identify the object such as an internal id
create_date timestamp Timestamp for the date and time that the record was created
update_date timestamp Timestamp for the date and time that the record was last updated

Goal Management

List all goals

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/goal"
api_instance = nucleus_api.GoalApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_goal_all_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_goal_all_using_get: %s\n" % e)
GoalApi apiInstance = new GoalApi();
        try {
            PageGoal List = apiInstance.getGoalAllUsingGet(true, null, null, 0, 10);
            System.out.println(List);
        } catch (ApiException e) {
            System.err.println("Exception when calling getGoalAllUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\GoalApi(
    new GuzzleHttp\Client(),
    $config);
$ascending = false; // bool | ascending
$filter = null; // string | filter
$order_by = null; // string | order_by
$page = 0; // int | page
$size = 10; // int | size

try {
    $goallist = $apiInstance->getGoalAllUsingGet($ascending, $filter, $order_by, $page, $size);
    print_r($goallist);
} catch (Exception $e) {
    echo 'Exception when calling GoalApi->getGoalAllUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::GoalApi.new
opts = {
    ascending: false, # BOOLEAN | ascending
    filter: null, # String | filter
    order_by: null, # String | order_by
    page: 0, # Integer | page
    size: 25 # Integer | size
}
begin
  goallist = api_instance.get_goal_all_using_get(opts)
  p goallist
rescue NucleusApi::ApiError => e
  puts "Exception when calling GoalApi->get_goal_all_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.GoalApi();
var opts = {
    'ascending': false, // Boolean | ascending
    // 'filter': "", // String | filter
    'orderBy': "update_date", // String | order_by
    'page': 0, // Number | page
    'size': 25 // Number | size
};

var goallist = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getGoalAllUsingGet(opts, goallist)

Example Response

{
  "content": [
      {
          "id": "bab849d6-de96-4dc7-a5ea-19be45c52a4e",
          "create_date": "2018-02-07T19:29:37.000+0000",
          "update_date": "2018-02-12T09:00:00.000+0000",
          "name": "House",
          "parent_goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
          "questionnaire_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
          "is_decumulation": false,
          "type": "Client Goal",
          "category": "Large Purchase",
          "client_id": "184b66ff-09d8-4c0d-ad88-c7d7e8376714",
          "goal_amount": 100000,
          "accumulation_horizon": 10,
          "decumulation_horizon": 0,
          "image": null,
          "is_active": true,
          "metadata": {
              "image": "https://www.hydrogenplatform.com/images/demo/house.svg"
          }
      },
      {
          "id": "e995d4c1-f989-4733-9867-713966ac9856",
          "create_date": "2018-02-07T19:29:37.000+0000",
          "update_date": "2018-02-12T09:00:00.000+0000",
          "name": "Car",
          "parent_goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
          "questionnaire_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
          "is_decumulation": false,
          "type": "Client Goal",
          "client_id": "184b66ff-09d8-4c0d-ad88-c7d7e8376714",
          "category": "Large Purchase",
          "goal_amount": 10000,
          "accumulation_horizon": 5,
          "decumulation_horizon": 0,
          "image": null,
          "is_active": true,
          "metadata": {
              "image": "https://www.hydrogenplatform.com/images/demo/car-purchase.svg"
          }
      },
      {
          "id": "fbc03484-08e8-446d-83aa-6d6cc236355e",
          "create_date": "2018-02-07T19:29:37.000+0000",
          "update_date": "2018-02-12T09:00:00.000+0000",
          "name": "Vacation",
          "parent_goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
          "questionnaire_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
          "is_decumulation": false,
          "type": "Client Goal",
          "client_id": "184b66ff-09d8-4c0d-ad88-c7d7e8376714",
          "category": "Large Purchase",
          "goal_amount": 1000,
          "accumulation_horizon": 3,
          "image": null,
          "is_active": true,
          "metadata": {
              "image": "https://www.hydrogenplatform.com/images/demo/travel.svg"
          }
      },
  ],
  "total_pages": 1,
  "total_elements": 3,
  "last": true,
  "number_of_elements": 3,
  "first": true,
  "sort": [
      {
        "direction": "ASC",
        "property": "id",
        "ignore_case": false,
        "null_handling": "NATIVE",
        "descending": false,
        "ascending": true
      }
  ],
  "size": 25,
  "number": 0
}

Get the details for all goals defined by your firm. Note that the metadata information is stored as a nested object within the goal object.

HTTP REQUEST

GET /goal

Create a goal

Example Request

curl -X POST -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
            "name": "Car",
            "parent_goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "questionnaire_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
            "is_decumulation": false,
            "type": "Client Goal",
            "category": "Large Purchase",
            "client_id": "184b66ff-09d8-4c0d-ad88-c7d7e8376714",
            "goal_amount": 100000,
            "accumulation_horizon": 10,
            "decumulation_horizon": 0,
            "metadata": {
              "image": "https://www.hydrogenplatform.com/images/demo/car-purchase.svg"
            }
      }' "https://api.hydrogenplatform.com/nucleus/v1/goal"
api_instance = nucleus_api.GoalApi(nucleus_api.ApiClient(configuration))
# Create a Goal
goal = nucleus_api.Goal(name="First Goal", category="One", goal_amount="500", image=None)
try:
    api_response = api_instance.create_goal_using_post(goal)
    pprint(api_response)
except ApiException as e:
    print("create_goal_using_post: %s\n" % e)
GoalApi apiInstance = new GoalApi();
        //Create A Goal
        Goal goalone = new Goal();
        goalone.setName("Aone");
        goalone.setCategory("one");
        goalone.setGoalAmount(500.00);
        goalone.setImage(null);

        try {
            Goal result = apiInstance.createGoalUsingPost(goalone);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling createGoalUsingPost");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\GoalApi(
    new GuzzleHttp\Client(),
    $config);
//Create Goal
$goal = new \com\hydrogen\nucleus\Model\Goal();

try {
    $goal->setName("New");
    $goal->setCategory("ABC");
    $goal->setGoalAmount("700");
    $goal->setImage("Image");

    $result = $apiInstance->createGoalUsingPost($goal);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createGoalUsingPost: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::GoalApi.new
#Create Goal
goal = NucleusApi::Goal.new

begin
  goal.name = "New"
  goal.category = "primary"
  goal.goal_amount = "800"
  goal.image = "null"
  result = api_instance.create_goal_using_post(goal)
  p result
rescue NucleusApi::ApiError => e
  puts "Exception when calling ->create_goal_using_post: #{e}"
end
var apiInstance = new HydrogenNucleusApi.GoalApi();
///Create a Goal
var goal = new HydrogenNucleusApi.Goal();
goal.name = "ANC";
goal.category = "one";
goal.goal_amount = "500";



var newgoal = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.createGoalUsingPost(goal, newgoal)

Example Response

{
    "id": "e995d4c1-f989-4733-9867-713966ac9856",
    "create_date": "2018-02-07T19:29:37.000+0000",
    "name": "Car",
    "parent_goal_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
    "questionnaire_id": "647c54c3-b649-477e-8cc7-eee56a120dd3",
    "is_decumulation": false,
    "type": "Client Goal",
    "category": "Large Purchase",
    "client_id": "184b66ff-09d8-4c0d-ad88-c7d7e8376714",
    "goal_amount": 100000,
    "accumulation_horizon": 10,
    "decumulation_horizon": 0,
    "image": null,
    "is_active": true,
    "metadata": {
        "image": "https://www.hydrogenplatform.com/images/demo/car-purchase.svg"
    }
}

Create a new goal for your tenant that clients can customize for themselves. Must provide the name for the goal and indicate whether or not the goal is a decumulation goal (or accumulation goal). The create_date will default to the current date. The endpoint returns the goal_id used to manage the goal and to map the goal to a client.

HTTP REQUEST

POST /goal

ARGUMENTS

Parameter Type Required Description
name string required Name of the goal
parent_goal_id UUID optional In the case that a goal is related to a broader goal, the id of the broader goal
questionnaire_id UUID optional The id of the group of questions that are used to customize a goal for a client
is_decumulation boolean optional Indicator if the goal is a decumulation goal such as saving for retirement. Default is false, indicating that the goal is an accumulation goal. May be used in conjunction with the Proton API.
type string optional Type of goal used to identify similar goals. Can be used to differentiate between goal templates and client-specific goals
category string optional Category of the goal used to group goals together. For example, different large purchase goals could have a category of ‘Major Purchase’
client_id UUID optional If the goal is client-specific (not used by any other client), the id of the client to which it belongs
goal_amount double optional If the goal is client-specific, the target monetary amount to be reached within the goal horizon. May be used in conjunction with the Proton API. If the goal is not client-specific, please store under the account entity.
accumulation_horizon double optional If the goal is client-specific, the time horizon of the goal during the accumulation phase, in years. May be used in conjunction with the Proton API. If the goal is not client-specific, please store under the account entity.
decumulation_horizon double optional If the goal is client-specific, the time horizon of the goal during the decumulation phase, in years. If the goal is an accumulation goal, then this can be 0 or omitted entirely. May be used in conjunction with the Proton API. If the goal is not client-specific, please store under the account entity.
image string optional Icon or image for the goal either as a URL or file name that you will link to
is_active string optional Indicates if the goal is active. Defaults to true which indicates it is active
metadata map optional Custom information associated with the goal in the format key:value. See Metadata
secondary_id string optional Alternate id that can be used to identify the object such as an internal id

Retrieve a goal

Example Request

curl -X GET -H "Authorization: Bearer <access_token>" \
    "https://api.hydrogenplatform.com/nucleus/v1/goal/e995d4c1-f989-4733-9867-713966ac9856"
api_instance = nucleus_api.GoalApi(nucleus_api.ApiClient(configuration))
try:
    api_response = api_instance.get_goal_using_get("51cda275-1cdd-4f44-b504-cae8188b4c63")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling get_goal_using_get: %s\n" % e)
GoalApi apiInstance = new GoalApi();
        try {
            Goal responseGoal = apiInstance.getGoalUsingGet(UUID.fromString("fa50427b-30ba-4c33-8c01-831863f51dc9"));
            System.out.println(responseGoal);
        } catch (ApiException e) {
            System.err.println("Exception when calling getGoalUsingGet");
            e.printStackTrace();
        }
$apiInstance = new com\hydrogen\nucleus\Api\GoalApi(
    new GuzzleHttp\Client(),
    $config);
$goal_id = "fa50427b-30ba-4c33-8c01-831863f51dc9"; // string | UUID goal_id

try {
    $goal = $apiInstance->getGoalUsingGet($goal_id);
    print_r($goal);
} catch (Exception $e) {
    echo 'Exception when calling GoalApi->getGoalUsingGet: ', $e->getMessage(), PHP_EOL;
}
api_instance = NucleusApi::GoalApi.new
goal_id = 'fa50427b-30ba-4c33-8c01-831863f51dc9' # String | UUID goal_id


begin
  goal = api_instance.get_goal_using_get(goal_id)
  p goal
rescue NucleusApi::ApiError => e
  puts "Exception when calling GoalApi->get_goal_using_get: #{e}"
end
var apiInstance = new HydrogenNucleusApi.GoalApi();
var goalId = "fa50427b-30ba-4c33-8c01-831863f51dc9";


var goal = function(error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log('API called successfully. Returned data: ' +JSON.stringify(data, null, '\t') + '\n');
    }
};
apiInstance.getGoalUsingGet(goalId, goal)
<