Getting Started with FDE API

Getting Started with FDE API


Welcome to the FDE API documentation. Our API's provide totally white-labeled access to FDE services, helping you onboard users, add and update accounts (eg. bank accounts, credit card accounts), list transactions, get image transactions like checks, get a list of statement file and download a statement file.

In FDE all calls are done under the scope of a session, which is created when the user authenticates and removed when deauthenticated or expired. There are two types of roles:
  • Customer ("customer"): User responsible for creating/removing users, manage categories, unlock users, etc.
  • User ("user"): Regular user who will add/update/remove accounts.

In reality a "customer" is also a "user" and can add/update/remove accounts in the same way, only the access level changes (access to all services API).

No user can be "self-created"; only the user with the role "customer" can create/remove other users.

Every client has one unique identification code that is associated to the "customer" therefore when it creates a new user, that user is automatically linked to the customer code. This code is internal only and is not exposed.

There are services that can be accessed only by the "customers" like to list your users, change their attributes, etc...

Every client must have at least one user of type "customer".

The services are accessed via API calls HTTP(S) using GET or POST (POST recommended for safety and GET for queries but both can be used in all services). The returned data format can be in:

  • XML
  • JSON

The URL structure to call the FDE services is:

http(s)://host:port/descriptor/fde.service_name?parameters

In this case the test will be done using: https://fde-api-sandbox.com/apis/tst0001/.

Security

FDE Security


  • Read-only extraction, no money transfer functions or pages are ever accessed in any site.
  • Secure protocol (HTTPS) with validated certificates.
  • Passwords and security questions always stored encrypted using AES 256 (only the account owner can decrypt with the authentication password, even direct access to the database table cannot break it).
  • Passwords and security questions don’t need to be saved (the user or customer can decide not to via API parameters and then for each update needs to be informed again).
  • Timer and card tokens are never stored.
  • Strong password requirements with a minimum of 9 characters (at least 4 letters, 4 numbers and 1 symbol).
  • No SQL injection possible, use of parameter binding in all parameters passing.
  • Random, seeded and unique session ID generator based on 7.9E+28 combinations (BASE64).
  • Session control, validation and expiration.
  • User account with password complexity checking, expiration control and locking.
  • Blocks cross-domain access by session.

12 Steps of Development to Get FDE API Working



Download Samples Source Code

Below, you can get the FDE API examples in Java and PHP. They presents you an example of how to use each FDE function.

There is an Readme.txt into the package, please, follow its instructions before running any example code.



p_user_email:
required
string

New user's email

p_user_password:
required
string

New user's password

p_user_name:
required
string

New user's username

p_session_id:
required
string

Session id of the user who has been logged and has permission to register users

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.register_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");

        String input = "p_user_email=doc2@bpanalytics.com&p_user_name=DocUserName&p_user_password=temp2015?&p_session_id=DznMNmAI1fVTKER/&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.authenticate_user";

    $data = array('p_user_email'=>'fde.customer@FDE.com',
    'p_user_password'=>'test2015!',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.register_user

Result Format

                                                   
{
root: {
message_text: "User successfully registered",
row_count: "0",
page_count: "0",
page_number: "0",
return_code: "GENERIC_MESSAGE",
return_text: "User successfully registered",
return_type: "SUCCESS"
}
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_user_email:
required
string

User's email who will be unregistered

p_session_id:
required
string

Session id of the user who has been logged and has permission to unregister users

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.unregister_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");

        String input = "p_user_email=doc2@bpanalytics.com&p_session_id=wscqC5CqR2BahLJj&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.unregister_user";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_user_email'=>'fde.customer@FDE.com',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.unregister_user

Result Format

                                                   
{
root: {
message_text: "User successfully unregistered",
row_count: "0",
page_count: "0",
page_number: "0",
return_code: "GENERIC_MESSAGE",
return_text: "User successfully unregistered",
return_type: "SUCCESS"
}
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_user_email:
required
string

User's email

p_user_password:
required
string

User's password

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.authenticate_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");

        String input = "p_user_email=wxesquevixos@bpanalytics.com&p_user_password=temp2015?&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.authenticate_user";

    $data = array('p_user_password'=>'GsdYC#WXS',
    'p_user_email'=>'fde.customer@FDE.com',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.authenticate_user

Result Format

                                                   
{
    "root": {
        "user_email": "wxesquevixos@bpanalytics.com",
        "user_name": "wandersonxs",
        "password_expired": false,
        "expiration_days": 981,
        "session_cookie": "HPF-SESSION-ID",
        "session_id": "eUUqzISlDEuCwwWJ",
        "session_timeout": 360,
        "language_code": "ENUS",
        "country_code": "US",
        "numeric_chars": ".,",
        "date_mask": "MM/DD/YYYY",
        "time_mask": "HH24:MI:SS",
        "datetime_mask": "MM/DD/YYYY HH24:MI:SS",
        "timestamp_mask": "MM/DD/YYYY HH24:MI:SS.FF3\n TZH:TZM",
        "currency_sign": "$",
        "enable_lock": true,
        "enable_cache": true,
        "enable_compression": true,
        "lock_timeout": 60,
        "value_separator": "~",
        "type_separator": "`",
        "field_separator": "\\u005C",
        "list_separator": "|",
        "customer_code": "US-LEDGERSYNC",
        "customer_name": "LedgerSync",
        "customer_email": "fde.test@ledgersync.com",
        "account_limit": 99,
        "update_interval": 1,
        "concurrency_limit": 10,
        "user_limit": 1000,
        "fu_timestamp": "07/10/2015 08:59:51\n.688 -07:00",
        "lu_timestamp": "08/31/2015 09:19:55.237 -07:00",
        "fu_epochtime": 1436543991688,
        "lu_epochtime": 1441037995237,
        "server_timezone": "-07:00",
        "client_timezone": "+00:00",
        "bank_flag": "true",
        "cc_flag": "true",
        "inv_flag": "true",
        "stmt_flag": "true",
        "bill_flag": "true",
        "image_flag": "true",
        "max_trans_history": 9999,
        "max_stmt_history": 9999,
        "max_trans_count": 999999,
        "max_stmt_count": 999999,
        "def_trans_history": 90,
        "def_stmt_history": 90,
        "def_trans_count": 999999,
        "def_stmt_count": 999999,
        "role": [
            {
                "role_code": "FDE-USR",
                "role_description": "FDE User"
            },
            {
                "role_code": "FDE-APP",
                "role_description": "FDE Application"
            }
        ],
        "message_text": "User successfully\n authenticated",
        "row_count": "0",
        "page_count": "0",
        "page_number": "0",
        "return_code": "GENERIC_MESSAGE",
        "return_text": "User successfully authenticated",
        "return_type": "SUCCESS"
    }
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postDeauthentication


p_session_id:
required
string

User's session id

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.deauthenticate_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        
        String input = "p_session_id=wscqC5CqR2BahLJj&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.deauthenticate_user";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.deauthenticate_user

Result Format

                                                   
{
root: {
message_text: "User successfully deauthenticated",
row_count: "0",
page_count: "0",
page_number: "0",
return_code: "GENERIC_MESSAGE",
return_text: "User successfully deauthenticated",
return_type: "SUCCESS"
}
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_user_email:
required
string

User's email who will be locked

p_session_id:
required
string

Session id of the user who has been logged and has permission to lock users

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.unlock_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");

        String input = "p_user_email=wxesquevixos@bpanalytics.com&p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.lock_user";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_user_email'=>'wxesquevixos@bpanalytics.com',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.unlock_user

Result Format

                                                   
{
root: {
message_text: "User successfully unlocked",
row_count: "0",
page_count: "0",
page_number: "0",
return_code: "GENERIC_MESSAGE",
return_text: "User successfully unlocked",
return_type: "SUCCESS"
}
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_user_email:
required
string

User's email who will be unlocked

p_session_id:
required
string

Session id of the user who has been logged and has permission to unlock users

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.unlock_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");

        String input = "p_user_email=wxesquevixos@bpanalytics.com&p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.unlock_user";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_user_email'=>'wxesquevixos@bpanalytics.com',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.lock_user

Result Format

                                                   
{
root: {
message_text: "User successfully locked",
row_count: "0",
page_count: "0",
page_number: "0",
return_code: "GENERIC_MESSAGE",
return_text: "User successfully locked",
return_type: "SUCCESS"
}
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_user_email:
required
string

User's email who will have the password changed

The parameter “p_user_email” is optional if the password will be changed for the current authenticated user.

p_current_password:
required
string

User's current password

p_new_password:
required
string

New password

p_confirm_password:
required
string

New password confirmation

p_session_id:
required
string

User's session Id

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.change_password");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");

        String input = "p_user_email=wxesquevixos@bpanalytics.com&p_current_password=temp2015?&p_new_password=temp2015??&p_confirm_password=temp2015??&p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.change_password";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_user_email'=>'wxesquevixos@bpanalytics.com',
    'p_current_password'=>'temp2015?',
    'p_new_password'=>'temp2015$',
    'p_confirm_password'=>'temp2015$',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.change_password

Result Format

                                                   
{
root: {
message_text: "Password successfully changed",
row_count: "0",
page_count: "0",
page_number: "0",
return_code: "GENERIC_MESSAGE",
return_text: "Password successfully changed",
return_type: "SUCCESS"
}
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_user_email:
required
string

User's email who will have the password reset

p_session_id:
required
string

User's session Id

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.reset_password");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        


        String input = "p_user_email=wxesquevixos@bpanalytics.com&p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.reset_password";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.reset_password

Result Format

                                                   
{

    "root": 

    {
        "generated_password": "mhsC7650?",
        "message_text": "Password successfully reset to \"mhsC7650?\"",
        "row_count": "0",
        "page_count": "0",
        "page_number": "0",
        "return_code": "GENERIC_MESSAGE",
        "return_text": "Password successfully reset to \"mhsC7650?\"",
        "return_type": "SUCCESS"
    }

}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Users


p_session_id:
required
string

User's session Id

p_user_name:
optional
string

Filter by user name (wildcards * and ? or % and _ are accepted)

p_user_email:
optional
string

Filter by user e-mail (wildcards * and ? or % and _ are accepted)

p_locked_flag:
optional
string

Filter only locked users or not (“false” or “true”, if omitted all users are returned)

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        


        String input = p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_user";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_user

Result Format

                                                   
{

    "root": 

{

    "user": 

[

{

    "row_id": "AAAx6+AAEAAJWSmAAP",
    "row_datetime": "09/16/2015 08:58:35",
    "row_epochtime": 1442419115,
    "row_key": "3vdemo1@bp.com~~~~~~~~",
    "user_label": "3vdemo1@bp.com",
    "user_email": "3vdemo1@bp.com",
    "user_name": "3vdemo1@bp.com",
    "alternate_email": null,
    "customer_code": "US-LEDGERSYNC",
    "customer_name": "LedgerSync",
    "parent_customer_code": null,
    "parent_customer_name": null,
    "country_code": "US",
    "country_name": "United States",
    "language_code": "ENUS",
    "language_name": "English USA",
    "locked_flag": false,
    "active_flag": true,
    "retry_count": 0,
    "password_date": "08/20/2015",
    "password_epochdate": 1440054000,
    "created_datetime": "08/20/2015 12:39:39",
    "changed_datetime": null,
    "expired_datetime": null,
    "created_epochtime": 1440099579,
    "changed_epochtime": 1440099579,
    "expired_epochtime": 1440099579,
    "fu_timestamp": "09/01/2015 12:02:00.222 -07:00",
    "lu_timestamp": "09/03/2015 17:07:51.883 -07:00",
    "fu_epochtime": 1441134120222,
    "lu_epochtime": 1441325271883,
    "account_count": 0,
    "image_count": 0,
    "stmt_count": 0,
    "trans_count": 0,
    "customer_user_email": "fde.test@ledgersync.com",
    "customer_user_name": "FDE Test",
    "update_frequency": "N",
    "update_frequency_desc": "None"

}
    ],
    "status_text": "433 row(s) returned - 5 page(s)",
    "row_count": "433",
    "page_count": "5",
    "page_number": "1",
    "return_code": "GENERIC_STATUS",
    "return_text": "433 row(s) returned - 5 page(s)",
    "return_type": "SUCCESS"
    }

}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_session_id:
required
string

User's session Id

p_include_code:
optional
boolean

If p_include_code = true , the tag extractor_label will have the extractor code on it (between parentheses), if omitted just the name is displayed. Example, American Express Canada (CA-AMEX).

p_country_code:
optional
string

Filter extractors by contry.

Possible values:

  • US - for United States
  • CA - for Canada
  • AU - for Australia
  • BR - for Brazil
p_extractor_code:
optional
string

Filter by extractor code.

p_extractor_name:
optional
string

Filter by extractor name.

p_bank_flag:
optional
boolean

If p_bank_flag = true, it will bring the extractors which are able to extract bank data.

p_cc_flag:
optional
boolean

If p_cc_flag = true, it will bring the extractors which are able to extract credit card data.

inv_flag:
optional
boolean

If p_inv_flag = true, it will bring the extractors which are able to extract investment data.

p_bill_flag:
optional
boolean

If p_bill_flag = true, it will bring the extractors which are able to extract bill data.

p_stmt_flag:
optional
boolean

If p_stmt_flag = true, it will bring the extractors which are able to extract statement.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        


        String input = p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor

Result Format

                                                   
{

    "root": 

{

    "extractor": 

[

    {

        "row_id": "AAAw/IAAEAAENI8AAb",
        "row_datetime": "09/16/2015 13:34:19",
        "row_epochtime": 1442435659,
        "row_key": "US-AMERITAS~~~~~~~~",
        "extractor_label": "Ameritas USA (US-AMERITAS)",
        "extractor_code": "US-AMERITAS",
        "extractor_name": "Ameritas USA",
        "extractor_url": "https://service.ameritas.com/service/login.asp",
        "intuit_id": "3000",
        "provider_code": "US-AMERITAS",
        "provider_name": "Ameritas USA",
        "provider_alias": "Ameritas",
        "provider_url": "http://www.ameritas.com",
        "country_code": "US",
        "country_name": "United States",
        "icon_url": "http://www.bpanalytics1.com:8000/public/app/icons/ameritas.png",
        "bank_flag": false,
        "cc_flag": false,
        "inv_flag": true,
        "stmt_flag": true,
        "bill_flag": false,
        "image_flag": false,
        "test_flag": false

    }
],
    "status_text": "16 row(s) returned - 1 page(s)",
    "row_count": "16",
    "page_count": "1",
    "page_number": "1",
    "return_code": "GENERIC_STATUS",
    "return_text": "16 row(s) returned - 1 page(s)",
    "return_type": "SUCCESS"
}

}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postAdd Account (Step 1)

Pre-Requirement: has the extractor code, you will have this calling the service fde.list_extractor.

Add account step 1 - This service will return the credentials form. The form describes the fields that we need the account owner to inform.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.execute_extractor?p_bank_flag=true&p_inv_flag=true&p_cc_flag=true&p_bill_flag=true&p_operation_type=ADD&p_start_flag=true&p_account_name=BofA&p_extractor_code=US-GOOGLE&p_session_id=oUq4p0ZwPcmmyY7v


p_session_id:
required
string

User's session Id

p_operation_type:
required
string

p_operation_type = ADD - As we are adding an account it must be ADD.

p_start_flag:
required
boolean

p_start_flag = true - As it is the first step it must be true.

p_extractor_code:
required
string

Extractor code. Call the service fde.list_extractor to get this data.

p_bank_flag:
required
boolean

Set to “true” if the account will extract bank data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_cc_flag:
required
boolean

Set to “true” if the account will extract credit card data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

inv_flag:
required
boolean

Set to “true” if the account will extract investment data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_bill_flag:
required
boolean

Set to “true” if the account will extract bill data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_stmt_flag:
required
boolean

Set to “true” if the account will extract statement files (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_account_name:
optional
string

Account name, although this parameter is optional, it is recommended that you pass a custom name for the account, otherwise the name will be the same as the extractor code.

p_trans_history:
optional
number

Use this parameter if you are extracting bank, credit card, investment and bill.

Control how many transactions are queried and how far back in time transactions are queried.

Default = 90 , maximum = 9999, 0 = ignore.

p_trans_count:
optional
number

Use this parameter if you are extracting bank, credit card, investment and bill.

Control how many transactions to query.

Default = 200, maximum = 9999, 0 = ignore.

p_stmt_history:
optional
number

Use this parameter if you are extracting statements.

Control how many statements are queried.

Default = 90 , maximum = 9999, 0 = ignore.

p_stmt_count:
optional
number

Use this parameter if you are extracting statements.

Control how many files to query.

Default = 10, maximum = 9999, 0 = ignore.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        
        String input = "p_bank_flag=true&p_inv_flag=true&p_cc_flag=true&p_bill_flag=true&p_operation_type=ADD&p_start_flag=true&p_account_name=BofA&p_extractor_code=US-GOOGLE&p_session_id=8LPw+6cRZgbsBGoY&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_bank_flag'=>'true',
    'p_inv_flag'=>'true',
    'p_cc_flag'=>'true',
    'p_bill_flag'=>'true',
    'p_operation_type'=>'ADD',
    'p_start_flag'=>'true',
    'p_account_name'=>'BofA',
    'p_extractor_code'=>'US-GOOGLE',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Remember

  • Please remember that this is the first step when adding an account, then keep in mind that you will need some return values when calling the service for a sencond time (Add Account Step 2).
  • form_object is the tag that you will need to parse and create the credential form. Its content is in xml format.

basic Form_Object Tag Detailed


Tag Description

label

The label of the field on the screen

value

If any, the initial value to show on the field or the image link (if type is IMAGE).

type

  • TEXT: a simple input text field.
  • DISPLAY: a “display-only” text field.
  • PASSWORD: a “password” text field or widget.
  • TOKEN: a “token” text field or widget, the same as PASSWORD but cannot be saved (it varies for each execution, for example, security key cards, RSA tokens, timer tokens, “challenge” questions, “captcha” texts, etc).
  • LIST: a list selection field (can be rendered as a “combo box” for example).
  • IMAGE: an image to be displayed (use “value” to get the link to display the image). Normally this is used to display “captcha” images.

format

  • STRING: any letter, number or special character.
  • NUMERIC: only numbers.
  • ALPHABETIC: only letters.
  • ALPHANUMERIC: letters and/or numbers.
  • UNDEFINED: undefined type (if type is IMAGE or LIST).

minChars

Minimum number of characters.

maxChars

Maximum number of characters.

mandatory

If the field is mandatory or optional (“true” or “false”).

save

If the value of the field is to be saved on the server or not. By default, password and tokens are marked as to not save. In the case of tokens, even if you try to save the system will revert to not save. Some fields like lists and display fields are normally marked to be saved but in some cases they are marked to not save if they are used for authorization purposes or other cases. So the best practice is to pass this value back to the server as it was received with the exception of password fields where the user can decide.

list

This attribute only returns if the field type is LIST. In this case it will be an array of values, labels and optional icon URLs in XML or JSON.

message_type

Informs the message type returned by the extraction service:

  • FORM: credentials form.
  • MESSAGE: message returned and extraction completed.
  • WARNING: warning returned and extraction completed.
  • ERROR: error returned, extraction did not complete and was aborted.
  • EXCEPTION: exception returned, extraction did not complete and was aborted.
  • STATUS: status returned, extraction is being processed, resubmit to wait for the next message type.

message_timeout

Informs the number of seconds to show a status and resubmit or get the credentials from the user. If the next calls takes longer than this time then the extraction aborts with an exception.

list

List format (type LIST, in XML the group is “list”):

  • “label”: Label to be displayed on the list.
  • “value”: Value of the selected item to be returned.
  • “icon”: Optional icon (image) URL to be displayed next to the label.

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor

Result Format

                                                   
{
   "root":{
      "account_row_id":"AAAw53AAEAAG0G7AAE",
      "account_row_key":"fde.test@ledgersync.com~US-GOOGLE~US-LEDGERSYNC~-~~~~~",
      "customer_code":"US-LEDGERSYNC",
      "user_email":"fde.test@ledgersync.com",
      "extractor_code":"US-GOOGLE",
      "account_code":"-",
      "value_separator":"~",
      "type_separator":"`",
      "field_separator":"\u005C",
      "list_separator":"|",
      "message_timeout":180,
      "message_type":"FORM",
      "form_object":""<?xml version=\"1.0\" encoding=\"utf-8\"?>
      <root><field><label>Text<\/label><value><\/value><type>TEXT<\/type>
      <format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>true<\/mandatory><save>true<\/save><\/field><field>
      <label>Password<\/label><value><\/value><type>PASSWORD<\/type><
      format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>true<\/mandatory><save>false<\/save><\/field><field>
      <label>Optional<\/label><value><\/value><type>PASSWORD<\/type>
      <format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>false<\/mandatory><save>false<\/save><\/field><\/root>",
      "status_text":"Form successfully built",
      "row_count":"0",
      "page_count":"0",
      "page_number":"0",
      "return_code":"GENERIC_STATUS",
      "return_text":"Form successfully built",
      "return_type":"SUCCESS"
   }
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postAdd Account (Step 2)

Pre-Requirement: Execute Add Account Step 1 - It will provide you a credentials form.

Add account step 2 is the second step and it is to grab the credentials from the form rendered on the first step and pass back to the server using the parameters “p_save_flag” and “p_field_value”.

Pass the values and flags delimited using the character specified on the tag “value_separator”. If on the value you see the same separator character just use a “back slash” before the character so it is considered part of the value and not the delimiter. The delimiters are passed and not fixed since they can change at any time.

For fields of type IMAGE just pass an empty value and “true”.

The return is similar to the step 1 but now just consider “message_type”. If account added successfully, the return will contain “message_type” = “MESSAGE”.

After executing this service, if you get “message_type” = “FORM”, that means, that you need render the form and execute this step again until you get “message_type” = “MESSAGE”.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.execute_extractor?p_save_flag=true~true~true~true~true &p_field_value=test~1~test~test~Test&p_operation_type=ADD&p_session_id=Ll0/0scApnJONXnW&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_operation_type:
required
string

p_operation_type = ADD - As we are adding an account it must be ADD.

p_save_flag:
required
booleans (delimited by the character specified on the tag “value_separator”)

p_save_flag informs to FDE if the values passed on the tag p_field_value is to be stored.

You need to "true" or "false" for each value on p_field_value, delimited by the character specified on the tag “value_separator”.

For instance, in a credential form that you enter with username and password (two data) and want to save them on FDE, you should pass this tag similar to the example below:

p_save_flag=true~true

p_field_value:
required
string

p_field_value informs to FDE the credentials form values that user entered with, delimited by the character specified on the tag “value_separator”.

For instance, in a credential form that you enter with username and password (two data), you should pass this tag similar to the example below:

p_field_value=username@bp.com~my_password_account

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
               
        String input = "p_save_flag=true~true~true~true~true&p_field_value=test~1~test~test~Test&p_operation_type=ADD&p_session_id=oUq4p0ZwPcmmyY7v";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_save_flag'=>'true~true~true~true~true',
    'p_field_value'=>'test~1~test~test~Test',
    'p_operation_type'=>'ADD',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Remember

  • Please remember that you need to repeat this step while getting “message_type” = “FORM” , that means, you have to render the form again in order user can enter with data.
  • Please remember that you will have added an account successfully only when you get “message_type” = “MESSAGE” .

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor

Result Format

                                                   
{
   "root":{
      "account_row_id":"AAAw53AAEAAG0G7AAE",
      "account_row_key":"fde.test@ledgersync.com~US-GOOGLE~US-LEDGERSYNC~-~~~~~",
      "customer_code":"US-LEDGERSYNC",
      "user_email":"fde.test@ledgersync.com",
      "extractor_code":"US-GOOGLE",
      "account_code":"-",
      "value_separator":"~",
      "type_separator":"`",
      "field_separator":"\u005C",
      "list_separator":"|",
      "message_timeout":180,
      "message_type":"FORM",
      "form_object":"<?xml version="1.0" encoding="utf-8"?> <root>
                     <field><label>Token</label> <value></value> 
                     <type>TOKEN</type> <format>STRING</format> 
                     <minChars>1</minChars> <maxChars>16</maxChars>
                     <mandatory>true</mandatory> <save>false</save></field>
                     <field><label>Image</label>
                    <value>https://fde-api-sandbox.com/apis/tst0001/fde.get_session_image?p_image_sequence=1007& p_session_id=oUq4p0ZwPcmmyY7v</value>
                    <type>IMAGE</type> <format>UNDEFINED</format>
                    <minChars>1</minChars> <maxChars>99</maxChars>
                    <mandatory>true</mandatory> <save>true</save>
                    </field></root>,
      "status_text":"Form successfully built",
      "row_count":"0",
      "page_count":"0",
      "page_number":"0",
      "return_code":"GENERIC_STATUS",
      "return_text":"Form successfully built",
      "return_type":"SUCCESS"
   }
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postEdit Account (Step 1)

Pre-Requirement: has row_id tag, you will have this calling the service fde.list_account.

Edit account step 1 - This service will return the credentials form. The form describes the fields that we need the account owner to inform.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.execute_extractor?p_operation_type=CHANGE&p_start_flag=true&p_row_id=7hdsad7899777WXS&p_session_id=oUq4p0ZwPcmmyY7v


p_session_id:
required
string

User's session Id

p_row_id:
required
string

Row id (account's identification)

p_operation_type:
required
string

p_operation_type = CHANGE - As we are editing an account it must be CHANGE.

p_start_flag:
required
boolean

p_start_flag = true - As it is the first step it must be true.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
                
        String input = "p_operation_type=CHANGE&p_start_flag=true&p_row_id=7hdsad7899777WXS&p_session_id=oUq4p0ZwPcmmyY7v&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'start_flag'=>'true',
    'p_row_id'=>'ajsfyyahb21673vfdfdWXS',
    'p_operation_type'=>'CHANGE',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Remember

  • Please remember that this is the first step when editing an account, then keep in mind that you will need some return values when calling the service for a sencond time (Edit Account Step 2).
  • form_object is the tag that you will need to parse and create the credential form. Its content is in xml format.

basic Form_Object Tag Detailed


Tag Description

label

The label of the field on the screen

value

If any, the initial value to show on the field or the image link (if type is IMAGE).

type

  • TEXT: a simple input text field.
  • DISPLAY: a “display-only” text field.
  • PASSWORD: a “password” text field or widget.
  • TOKEN: a “token” text field or widget, the same as PASSWORD but cannot be saved (it varies for each execution, for example, security key cards, RSA tokens, timer tokens, “challenge” questions, “captcha” texts, etc).
  • LIST: a list selection field (can be rendered as a “combo box” for example).
  • IMAGE: an image to be displayed (use “value” to get the link to display the image). Normally this is used to display “captcha” images.

format

  • STRING: any letter, number or special character.
  • NUMERIC: only numbers.
  • ALPHABETIC: only letters.
  • ALPHANUMERIC: letters and/or numbers.
  • UNDEFINED: undefined type (if type is IMAGE or LIST).

minChars

Minimum number of characters.

maxChars

Maximum number of characters.

mandatory

If the field is mandatory or optional (“true” or “false”).

save

If the value of the field is to be saved on the server or not. By default, password and tokens are marked as to not save. In the case of tokens, even if you try to save the system will revert to not save. Some fields like lists and display fields are normally marked to be saved but in some cases they are marked to not save if they are used for authorization purposes or other cases. So the best practice is to pass this value back to the server as it was received with the exception of password fields where the user can decide.

list

This attribute only returns if the field type is LIST. In this case it will be an array of values, labels and optional icon URLs in XML or JSON.

message_type

Informs the message type returned by the extraction service:

  • FORM: credentials form.
  • MESSAGE: message returned and extraction completed.
  • WARNING: warning returned and extraction completed.
  • ERROR: error returned, extraction did not complete and was aborted.
  • EXCEPTION: exception returned, extraction did not complete and was aborted.
  • STATUS: status returned, extraction is being processed, resubmit to wait for the next message type.

message_timeout

Informs the number of seconds to show a status and resubmit or get the credentials from the user. If the next calls takes longer than this time then the extraction aborts with an exception.

list

List format (type LIST, in XML the group is “list”):

  • “label”: Label to be displayed on the list.
  • “value”: Value of the selected item to be returned.
  • “icon”: Optional icon (image) URL to be displayed next to the label.

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor

Result Format

                                                   
{
   "root":{
      "account_row_id":"AAAw53AAEAAG0G7AAE",
      "account_row_key":"fde.test@ledgersync.com~US-GOOGLE~US-LEDGERSYNC~-~~~~~",
      "customer_code":"US-LEDGERSYNC",
      "user_email":"fde.test@ledgersync.com",
      "extractor_code":"US-GOOGLE",
      "account_code":"-",
      "value_separator":"~",
      "type_separator":"`",
      "field_separator":"\u005C",
      "list_separator":"|",
      "message_timeout":180,
      "message_type":"FORM",
      "form_object":""<?xml version=\"1.0\" encoding=\"utf-8\"?>
      <root><field><label>Text<\/label><value><\/value><type>TEXT<\/type>
      <format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>true<\/mandatory><save>true<\/save><\/field><field>
      <label>Password<\/label><value><\/value><type>PASSWORD<\/type><
      format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>true<\/mandatory><save>false<\/save><\/field><field>
      <label>Optional<\/label><value><\/value><type>PASSWORD<\/type>
      <format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>false<\/mandatory><save>false<\/save><\/field><\/root>",
      "status_text":"Form successfully built",
      "row_count":"0",
      "page_count":"0",
      "page_number":"0",
      "return_code":"GENERIC_STATUS",
      "return_text":"Form successfully built",
      "return_type":"SUCCESS"
   }
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postEdit Account (Step 2)

Pre-Requirement: Execute Edit Account Step 1 - It will provide you a credentials form.

Edit account step 2 is the second step and it is to grab the credentials from the form rendered on the first step and pass back to the server using the parameters “p_save_flag” and “p_field_value”.

Pass the values and flags delimited using the character specified on the tag “value_separator”. If on the value you see the same separator character just use a “back slash” before the character so it is considered part of the value and not the delimiter. The delimiters are passed and not fixed since they can change at any time.

For fields of type IMAGE just pass an empty value and “true”.

The return is similar to the step 1 but now just consider “message_type”. If account added successfully, the return will contain “message_type” = “MESSAGE”.

After executing this service, if you get “message_type” = “FORM”, that means, that you need render the form and execute this step again until you get “message_type” = “MESSAGE”.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.execute_extractor?p_save_flag=true~true~true~true~true &p_field_value=test~1~test~test~Test&p_operation_type=CHANGE&p_session_id=Ll0/0scApnJONXnW&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_operation_type:
required
string

p_operation_type = CHANGE - As we are editing an account it must be CHANGE.

p_save_flag:
required
booleans (delimited by the character specified on the tag “value_separator”)

p_save_flag informs to FDE if the values passed on the tag p_field_value is to be stored.

You need to "true" or "false" for each value on p_field_value, delimited by the character specified on the tag “value_separator”.

For instance, in a credential form that you enter with username and password (two data) and want to save them on FDE, you should pass this tag similar to the example below:

p_save_flag=true~true

p_field_value:
required
string

p_field_value informs to FDE the credentials form values that user entered with, delimited by the character specified on the tag “value_separator”.

For instance, in a credential form that you enter with username and password (two data), you should pass this tag similar to the example below:

p_field_value=username@bp.com~my_password_account

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
               
        String input = "p_save_flag=true~true~true~true~true&p_field_value=test~1~test~test~Test&p_operation_type=CHANGE&p_session_id=oUq4p0ZwPcmmyY7v";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_save_flag'=>'true~true~true~true~true',
    'p_field_value'=>'test~1~test~test~Test',
    'p_operation_type'=>'CHANGE',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Remember

  • Please remember that you need to repeat this step while getting “message_type” = “FORM” , that means, you have to render the form again in order user can enter with data.
  • Please remember that you will have updated an account successfully only when you get “message_type” = “MESSAGE” .

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor

Result Format

                                                   
{
   "root":{
      "account_row_id":"AAAw53AAEAAG0G7AAE",
      "account_row_key":"fde.test@ledgersync.com~US-GOOGLE~US-LEDGERSYNC~-~~~~~",
      "customer_code":"US-LEDGERSYNC",
      "user_email":"fde.test@ledgersync.com",
      "extractor_code":"US-GOOGLE",
      "account_code":"-",
      "value_separator":"~",
      "type_separator":"`",
      "field_separator":"\u005C",
      "list_separator":"|",
      "message_timeout":180,
      "message_type":"FORM",
      "form_object":"<?xml version="1.0" encoding="utf-8"?> <root>
                     <field><label>Token</label> <value></value> 
                     <type>TOKEN</type> <format>STRING</format> 
                     <minChars>1</minChars> <maxChars>16</maxChars>
                     <mandatory>true</mandatory> <save>false</save></field>
                     <field><label>Image</label>
                    <value>https://fde-api-sandbox.com/apis/tst0001/fde.get_session_image?p_image_sequence=1007& p_session_id=oUq4p0ZwPcmmyY7v</value>
                    <type>IMAGE</type> <format>UNDEFINED</format>
                    <minChars>1</minChars> <maxChars>99</maxChars>
                    <mandatory>true</mandatory> <save>true</save>
                    </field></root>,
      "status_text":"Form successfully built",
      "row_count":"0",
      "page_count":"0",
      "page_number":"0",
      "return_code":"GENERIC_STATUS",
      "return_text":"Form successfully built",
      "return_type":"SUCCESS"
   }
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Accounts


p_session_id:
required
string

User's session Id

p_row_id:
optional
string

Filter by row_id (account's identification)

p_account_code:
optional
string

Filter by account code

p_account_name:
optional
string

Filter by account name.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_account");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        


        String input = p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_account";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_account

Result Format

                                                   
{

    "root": 

{

    "account": 

[

            {
                "row_id": "AAAw53AAEAAG0G9AAF",
                "row_datetime": "09/17/2015 11:20:17",
                "row_epochtime": 1442514017,
                "row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~~~~~",
                "account_label": "Chase Test Account",
                "account_code": "BPANALYTICS2",
                "account_name": "Chase Test Account",
                "user_email": "bp1@bp.com",
                "user_name": "bp1@bp.com",
                "customer_code": "US-LEDGERSYNC",
                "customer_name": "LedgerSync",
                "parent_customer_code": null,
                "parent_customer_name": null,
                "extractor_code": "US-CHASE",
                "extractor_name": "Chase USA",
                "extractor_url": "https://chaseonline.chase.com/Logon.aspx",
                "intuit_id": "2430",
                "uncategorized_name": "Undefined",
                "provider_code": "US-CHASE",
                "provider_name": "Chase USA",
                "provider_alias": "Chase",
                "provider_url": "https://www.chase.com",
                "country_code": "US",
                "country_name": "United States",
                "icon_url": "http://www.bpanalytics1.com:8000/public/app/icons/chase.png",
                "created_timestamp": "09/08/2015 08:15:52.026 -07:00",
                "updated_timestamp": "09/08/2015 10:36:46.071 -07:00",
                "executed_timestamp": "09/08/2015 08:15:52.026 -07:00",
                "created_epochtime": 1441725352026,
                "updated_epochtime": 1441733806071,
                "executed_epochtime": 1441725352026,
                "status_type": "W",
                "status_desc": "Warning",
                "status_message": "Change account cancelled or aborted",
                "trans_history": 6,
                "trans_count": 999999,
                "stmt_history": 30,
                "stmt_count": 999999,
                "sug_trans_history": 15,
                "sug_stmt_history": 39,
                "bank_flag": true,
                "cc_flag": false,
                "inv_flag": false,
                "stmt_flag": true,
                "bill_flag": false,
                "offline_flag": true,
                "image_flag": true,
                "fund_flag": false,
                "trans_flag": true,
                "empty_flag": false,
                "executing_flag": false,
                "retry_flag": false,
                "active_flag": true,
                "sel_bank_flag": true,
                "sel_cc_flag": true,
                "sel_inv_flag": false,
                "sel_stmt_flag": true,
                "sel_bill_flag": false,
                "sel_image_flag": true,
                "ext_bank_flag": true,
                "ext_cc_flag": true,
                "ext_inv_flag": false,
                "ext_stmt_flag": true,
                "ext_bill_flag": false,
                "ext_image_flag": true,
                "cst_bank_flag": true,
                "cst_cc_flag": true,
                "cst_inv_flag": true,
                "cst_stmt_flag": true,
                "cst_bill_flag": true,
                "cst_image_flag": true,
                "operation_type": null,
                "operation_desc": null
            }
        ],
        "status_text": "1 row(s) returned - 1 page(s)",
        "row_count": "1",
        "page_count": "1",
        "page_number": "1",
        "return_code": "GENERIC_STATUS",
        "return_text": "1 row(s) returned - 1 page(s)",
        "return_type": "SUCCESS"
    }

}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Sub Accounts


p_session_id:
required
string

User's session Id

p_row_id:
optional
string

Filter by row_id (sub account's identification)

p_account_code:
optional
string

Filter by account code

p_account_name:
optional
string

Filter by account name.

p_sub_acct_code:
optional
string

Filter by sub account code

p_sub_acct_name:
optional
string

Filter by sub account name.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        


        String input = p_session_id=Hnzn23ydVN/VXXBz&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct

Result Format

                                                   
{

    "root": 

{

    "sub_acct": 

[

            {
                "row_id": "AAAw57AAEAABd2kAAd",
                "row_datetime": "09/17/2015 11:32:30",
                "row_epochtime": 1442514750,
                "row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~9426~~~~",
                "sub_acct_label": "BUS SELECT HY SAV",
                "sub_acct_code": "9426",
                "sub_acct_name": "BUS SELECT HY SAV",
                "container_type": "BANK",
                "container_desc": "Bank",
                "user_email": "bp1@bp.com",
                "user_name": "bp1@bp.com",
                "customer_code": "US-LEDGERSYNC",
                "customer_name": "LedgerSync",
                "parent_customer_code": null,
                "parent_customer_name": null,
                "account_code": "BPANALYTICS2",
                "account_name": "Chase Test Account",
                "extractor_code": "US-CHASE",
                "extractor_name": "Chase USA",
                "extractor_url": "https://chaseonline.chase.com/Logon.aspx",
                "intuit_id": "2430",
                "uncategorized_name": "Undefined",
                "provider_code": "US-CHASE",
                "provider_name": "Chase USA",
                "provider_alias": "Chase",
                "provider_url": "https://www.chase.com",
                "country_code": "US",
                "country_name": "United States",
                "available_balance": 1182.42,
                "current_balance": 1182.42,
                "current_value": null,
                "outstanding_balance": null,
                "membership_points": null,
                "due_date": null,
                "due_epochdate": null,
                "currency_code": "USD",
                "currency_name": "United States Dollar",
                "currency_sign": "$",
                "created_timestamp": "09/08/2015 08:15:52.026 -07:00",
                "updated_timestamp": "09/08/2015 08:15:52.026 -07:00",
                "executed_timestamp": "09/08/2015 08:15:52.026 -07:00",
                "created_epochtime": 1441725352026,
                "updated_epochtime": 1441725352026,
                "executed_epochtime": 1441725352026,
                "earliest_trans_datetime": "06/30/2015",
                "latest_trans_datetime": "08/31/2015",
                "earliest_image_datetime": null,
                "latest_image_datetime": null,
                "earliest_stmt_date": "06/30/2015",
                "latest_stmt_date": "08/31/2015",
                "earliest_trans_epochtime": 1435647600,
                "latest_trans_epochtime": 1441004400,
                "earliest_image_epochtime": null,
                "latest_image_epochtime": null,
                "earliest_stmt_epochdate": 1435647600,
                "latest_stmt_epochdate": 1441004400,
                "stmt_flag": true,
                "image_flag": false,
                "fund_flag": false,
                "trans_flag": true,
                "display_flag": true,
                "icon_url": "http://www.bpanalytics1.com:8000/public/app/icons/bank.png"
            }
        ],
        "status_text": "1 row(s) returned - 1 page(s)",
        "row_count": "1",
        "page_count": "1",
        "page_number": "1",
        "return_code": "GENERIC_STATUS",
        "return_text": "1 row(s) returned - 1 page(s)",
        "return_type": "SUCCESS"
    }

}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postUpdate Account (Step 1)

The accounts are not automatically refreshed, at least not yet, even those where the offline flag is “true”.

So the user or the customer needs to update them from time to time.

Our recommendation is for the user to decide when update the accounts since most of the bank accounts don’t change very often during a day.

There are two ways to update, one interactive where the service to execute waits until the extraction is done and the other offline where you just start and then check the account status until its type is not equal to “X”.

An account can be updated as Interactive or Offline.


p_session_id:
required
string

User's session Id

p_operation_type:
required
string

p_operation_type = UPDATE - Since we are updting an account it must be UPDATE.

p_start_flag:
required
boolean

p_start_flag = true - Since it is the first step it must be true.

p_bank_flag:
required
boolean

Set to “true” if the account will extract bank data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_cc_flag:
required
boolean

Set to “true” if the account will extract credit card data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

inv_flag:
required
boolean

Set to “true” if the account will extract investment data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_bill_flag:
required
boolean

Set to “true” if the account will extract bill data (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_stmt_flag:
required
boolean

Set to “true” if the account will extract statement files (depends on the extractor capability).

Call the service fde.list_extractor to get this data.

p_extractor_code:
optional (if passed p_row_id)
string

Extractor code

p_account_code:
optional (if passed p_row_id)
string

Account code

p_row_id:
optional (if passed p_extractor_code and p_account_code)
string

Row Id (Account's identification)

p_offline_flag:
optional
string

p_offline_flag=true when you want an update account offline.

In this case the extraction runs offline and the service call returns immediately.

In this situation the account status changes to “X” (Executing) and the customer needs to check the account until it finishes.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
                
        String input = "p_bank_flag=true&p_inv_flag=true&p_cc_flag=true&p_bill_flag=true&p_operation_type=UPDATE&p_start_flag=true&p_account_code=3445&p_extractor_code=US-GOOGLE&p_session_id=8LPw+6cRZgbsBGoY&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_bank_flag'=>'true',
    'p_inv_flag'=>'true',
    'p_cc_flag'=>'true',
    'p_bill_flag'=>'true',
    'p_operation_type'=>'UPDATE',
    'p_start_flag'=>'true',
    'p_extractor_code'=>'US-GOOGLE',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Remember

  • Please remember that this is the first step when updating an account, then keep in mind that, you will need some return values when calling the service for a sencond time (Update Account Step 2).
  • If the user didn’t save the credentials when adding he/she will need to enter them again when updating.
  • If message_type = "MESSAGE", means that the account was updated successfully, then you don't need execute Update Account Step 2.
  • form_object is the tag that you will need to parse and create the credential form. Its content is in xml format.

basic Form_Object Tag Detailed


Tag Description

label

The label of the field on the screen

value

If any, the initial value to show on the field or the image link (if type is IMAGE).

type

  • TEXT: a simple input text field.
  • DISPLAY: a “display-only” text field.
  • PASSWORD: a “password” text field or widget.
  • TOKEN: a “token” text field or widget, the same as PASSWORD but cannot be saved (it varies for each execution, for example, security key cards, RSA tokens, timer tokens, “challenge” questions, “captcha” texts, etc).
  • LIST: a list selection field (can be rendered as a “combo box” for example).
  • IMAGE: an image to be displayed (use “value” to get the link to display the image). Normally this is used to display “captcha” images.

format

  • STRING: any letter, number or special character.
  • NUMERIC: only numbers.
  • ALPHABETIC: only letters.
  • ALPHANUMERIC: letters and/or numbers.
  • UNDEFINED: undefined type (if type is IMAGE or LIST).

minChars

Minimum number of characters.

maxChars

Maximum number of characters.

mandatory

If the field is mandatory or optional (“true” or “false”).

save

If the value of the field is to be saved on the server or not. By default, password and tokens are marked as to not save. In the case of tokens, even if you try to save the system will revert to not save. Some fields like lists and display fields are normally marked to be saved but in some cases they are marked to not save if they are used for authorization purposes or other cases. So the best practice is to pass this value back to the server as it was received with the exception of password fields where the user can decide.

list

This attribute only returns if the field type is LIST. In this case it will be an array of values, labels and optional icon URLs in XML or JSON.

message_type

Informs the message type returned by the extraction service:

  • FORM: credentials form.
  • MESSAGE: message returned and extraction completed.
  • WARNING: warning returned and extraction completed.
  • ERROR: error returned, extraction did not complete and was aborted.
  • EXCEPTION: exception returned, extraction did not complete and was aborted.
  • STATUS: status returned, extraction is being processed, resubmit to wait for the next message type.

message_timeout

Informs the number of seconds to show a status and resubmit or get the credentials from the user. If the next calls takes longer than this time then the extraction aborts with an exception.

list

List format (type LIST, in XML the group is “list”):

  • “label”: Label to be displayed on the list.
  • “value”: Value of the selected item to be returned.
  • “icon”: Optional icon (image) URL to be displayed next to the label.

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor

Result Format

                                                   
{
   "root":{
      "account_row_id":"AAAw53AAEAAG0G7AAE",
      "account_row_key":"fde.test@ledgersync.com~US-GOOGLE~US-LEDGERSYNC~-~~~~~",
      "customer_code":"US-LEDGERSYNC",
      "user_email":"fde.test@ledgersync.com",
      "extractor_code":"US-GOOGLE",
      "account_code":"-",
      "value_separator":"~",
      "type_separator":"`",
      "field_separator":"\u005C",
      "list_separator":"|",
      "message_timeout":180,
      "message_type":"FORM",
      "form_object":""<?xml version=\"1.0\" encoding=\"utf-8\"?>
      <root><field><label>Text<\/label><value><\/value><type>TEXT<\/type>
      <format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>true<\/mandatory><save>true<\/save><\/field><field>
      <label>Password<\/label><value><\/value><type>PASSWORD<\/type><
      format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>true<\/mandatory><save>false<\/save><\/field><field>
      <label>Optional<\/label><value><\/value><type>PASSWORD<\/type>
      <format>STRING<\/format><minChars>1<\/minChars><maxChars>16<\/maxChars>
      <mandatory>false<\/mandatory><save>false<\/save><\/field><\/root>",
      "status_text":"Form successfully built",
      "row_count":"0",
      "page_count":"0",
      "page_number":"0",
      "return_code":"GENERIC_STATUS",
      "return_text":"Form successfully built",
      "return_type":"SUCCESS"
   }
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postUpdate Account (Step 2)

Pre-Requirement: Execute Upate Account Step 1 - It will provide you a credentials form if necessary.

Add account step 2 is the second step and it is to grab the credentials from the form rendered on the first step and pass back to the server

Sometimes the updating account is completed on step 1 and this step is not needed.

After executing this service, if you get “message_type” = “FORM”, that means, that you need render the form and execute this step again until you get “message_type” = “MESSAGE”.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.execute_extractor?p_save_flag=true~true~true~true~true &p_field_value=test~1~test~test~Test&p_operation_type=UPDATE&p_session_id=Ll0/0scApnJONXnW&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_operation_type:
required
string

p_operation_type = UPDATE - As we are updateing an account it must be UPDATE.

p_save_flag:
required
booleans (delimited by the character specified on the tag “value_separator”)

p_save_flag informs to FDE if the values passed on the tag p_field_value is to be stored.

You need to "true" or "false" for each value on p_field_value, delimited by the character specified on the tag “value_separator”.

For instance, in a credential form that you enter with username and password (two data) and want to save them on FDE, you should pass this tag similar to the example below:

p_save_flag=true~true

p_field_value:
required
string

p_field_value informs to FDE the credentials form values that user entered with, delimited by the character specified on the tag “value_separator”.

For instance, in a credential form that you enter with username and password (two data), you should pass this tag similar to the example below:

p_field_value=username@bp.com~my_password_account

p_offline_flag:
optional
string

p_offline_flag=true when you want an update account offline.

In this case the extraction runs offline and the service call returns immediately.

In this situation the account status changes to “X” (Executing) and the customer needs to check the account until it finishes.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
                
        String input = "p_save_flag=true~true~true~true~true&p_field_value=test~1~test~test~Test&p_operation_type=UPDATE&p_session_id=oUq4p0ZwPcmmyY7v";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_save_flag'=>'true~true~true~true~true',
    'p_field_value'=>'test~1~test~test~Test',
    'p_operation_type'=>'UPDATE',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Remember

  • Please remember that you need to repeat this step while getting “message_type” = “FORM” , that means, you have to render the form again in order user can enter with data.
  • Please remember that you will have updated an account successfully only when you get “message_type” = “MESSAGE” .

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_extractor

Result Format

                                                   
{
   "root":{
      "account_row_id":"AAAw53AAEAAG0G7AAE",
      "account_row_key":"fde.test@ledgersync.com~US-GOOGLE~US-LEDGERSYNC~-~~~~~",
      "customer_code":"US-LEDGERSYNC",
      "user_email":"fde.test@ledgersync.com",
      "extractor_code":"US-GOOGLE",
      "account_code":"-",
      "value_separator":"~",
      "type_separator":"`",
      "field_separator":"\u005C",
      "list_separator":"|",
      "message_timeout":180,
      "message_type":"FORM",
      "form_object":"<?xml version="1.0" encoding="utf-8"?> <root>
                     <field><label>Token</label> <value></value> 
                     <type>TOKEN</type> <format>STRING</format> 
                     <minChars>1</minChars> <maxChars>16</maxChars>
                     <mandatory>true</mandatory> <save>false</save></field>
                     <field><label>Image</label>
                    <value>https://fde-api-sandbox.com/apis/tst0001/fde.get_session_image?p_image_sequence=1007& p_session_id=oUq4p0ZwPcmmyY7v</value>
                    <type>IMAGE</type> <format>UNDEFINED</format>
                    <minChars>1</minChars> <maxChars>99</maxChars>
                    <mandatory>true</mandatory> <save>true</save>
                    </field></root>,
      "status_text":"Form successfully built",
      "row_count":"0",
      "page_count":"0",
      "page_number":"0",
      "return_code":"GENERIC_STATUS",
      "return_text":"Form successfully built",
      "return_type":"SUCCESS"
   }
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_session_id:
required
string

User's session Id

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.update_user_account");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
              
        String input = "p_session_id=e5gxe69OF/awX/hp&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.update_user_account";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.update_user_account

Result Format

                                                   
{

    "root": 

    {
        "message_text": "User update successfully started",
        "row_count": "0",
        "page_count": "0",
        "page_number": "0",
        "return_code": "GENERIC_MESSAGE",
        "return_text": "User update successfully started",
        "return_type": "SUCCESS"
    }

}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



p_session_id:
required
string

User's session Id

p_row_id:
required
string

Row Id - Account's Identification

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.remove_account");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
               
        String input = "p_session_id=e5gxe69OF/awX/hp&p_row_id=AAAw53AAEAAEPHFAAb&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.remove_account";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_row_id'=>'AAAw53AAEAAEPHFAAb'
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.remove_account

Result Format

                                                   
{

    "root": 

    {
        "message_text": "Account(s) successfully removed",
        "row_count": "0",
        "page_count": "0",
        "page_number": "0",
        "return_code": "GENERIC_MESSAGE",
        "return_text": "Account(s) successfully removed",
        "return_type": "SUCCESS"
    }

}                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postCancel Account

Cancel the addition of an account

If the user wants to cancel the addition of a new account or any other operation a “cancel” needs to be explicitly called so the server ends the process cleanly. If you do not cancel and try to add another account you may receive the following error: “Account is already being added or updated”. So to explicitly cancel just call the following service:

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.execute_extractor?p_operation_type=ADD&p_cancel_flag=true&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_operation_type:
required
string

p_operation_type = ADD , this parameter must be ADD

p_cancel_flag:
required
string

p_cancel_flag = true , this parameter must be true

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
                
        String input = "p_session_id=iuwqDUDY&p_operation_type=ADD&p_cancel_flag=true&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_operation_type'=>'ADD',
        'p_cancel_flag'=>'true',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.execute_extractor

Result Format

                                                   
{

    "root": 

    {
        "message_text": "Extractor successfully cancelled",
        "row_count": "0",
        "page_count": "0",
        "page_number": "0",
        "return_code": "GENERIC_MESSAGE",
        "return_text": "Extractor successfully cancelled",
        "return_type": "SUCCESS"
    }

}                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Transactions

List transactions of all user's accounts added. You can use filters to get a specific transaction or transactions.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.list_sub_acct_trans?p_session_id=e5gxe69OF/awX/hp&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_account_code:
optional
string

Account code

p_sub_acct_code:
optional
string

Sub Account code

p_extractor_code:
optional
string

Extractor code

p_start_datetime:
optional
string

Start Date

p_end_datetime:
optional
string

End Date

p_order_type:
optional
string

(DA-Datetime Asc (default),DD-Datetime Desc,SA-Desc Asc,SD-Des Desc,CA-Category Asc,CD-Category Desc,NA-Net Asc,ND-Net Desc)

p_page_number:
optional
number

When the return have more than one page, you need to inform which page you want. Default = 1.

p_page_size:
optional
number

Number of rows to return. Defaul = 100.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct_trans");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
                
        String input = "p_session_id=wuiqyebDD&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct_trans";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct_trans

Result Format

                                                   
{

    "root": 

{

    "sub_acct_trans": 

[

{

    "row_id": "AAAxyXAAEAAEEeXAAM",
    "row_datetime": "09/17/2015 16:09:10",
    "row_epochtime": 1442531350,
    "row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~1446~20150722000000~1~~",
    "container_type": "BANK",
    "container_desc": "Bank",
    "extractor_code": "US-CHASE",
    "extractor_name": "Chase USA",
    "extractor_url": "https://chaseonline.chase.com/Logon.aspx",
    "intuit_id": "2430",
    "provider_code": "US-CHASE",
    "provider_name": "Chase USA",
    "provider_alias": "Chase",
    "provider_url": "https://www.chase.com",
    "country_code": "US",
    "country_name": "United States",
    "account_code": "BPANALYTICS2",
    "account_name": "Chase Test Account",
    "sub_acct_code": "1446",
    "sub_acct_name": "CHASE SAVINGS",
    "user_email": "bp1@bp.com",
    "user_name": "bp1@bp.com",
    "customer_code": "US-LEDGERSYNC",
    "customer_name": "LedgerSync",
    "parent_customer_code": null,
    "parent_customer_name": null,
    "trans_datetime": "07/22/2015 00:00:00",
    "trans_epochtime": 1437548400,
    "trans_date": "07/22/2015",
    "trans_epochdate": 1437548400,
    "trans_time": "00:00:00",
    "trans_month_num": "07",
    "trans_month_name": "July",
    "trans_month_year": "2015",
    "trans_month_day": "22",
    "trans_week_day": "Wednesday",
    "trans_week_quarter": "3",
    "trans_week_iso_year": "30",
    "trans_week_ansi_year": "29",
    "trans_seq": 1,
    "trans_code": null,
    "trans_desc": "INTEREST PAYMENT",
    "credit_value": 0.02,
    "debit_value": 0,
    "net_value": 0.02,
    "abs_value": 0.02,
    "currency_code": "USD",
    "currency_name": "United States Dollar",
    "currency_sign": "$",
    "category_name": "Interest",
    "category_group": "Undefined",
    "sub_category_name": "Undefined",
    "cust_category_name": "Interest",
    "cust_category_group": "Undefined",
    "cust_sub_category_name": "Undefined",
    "cust_class_type": "U",
    "cust_class_name": "Undefined",
    "trans_category_name": "Interest",
    "trans_category_group": "Undefined",
    "trans_sub_category_name": "Undefined",
    "trans_class_type": "U",
    "trans_class_name": "Undefined",
    "orig_trans_desc": "INTEREST PAYMENT",
    "class_type": "U",
    "class_name": "Undefined",
    "saved_timestamp": "09/08/2015 08:15:52.026 -07:00",
    "saved_epochtime": 1441725352026,
    "custom_flag": false,
    "valid_flag": true,
    "mime_type": null,
    "image_flag": false,
    "fund_flag": false,
    "image_url": null,
    "check_number": null,
    "fund_code": null,
    "fund_name": null,
    "fund_quant": null,
    "fund_price": null,
    "image_count": 0,
    "fund_count": 0

}        
],
        "status_text": "138 row(s) returned - 2 page(s)",
        "row_count": "138",
        "page_count": "2",
        "page_number": "1",
        "return_code": "GENERIC_STATUS",
        "return_text": "138 row(s) returned - 2 page(s)",
        "return_type": "SUCCESS"
    }

}                                             
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Bank Account Transactions Images

This service lists the bank transactions containing images (checks, deposits, etc) and its attributes.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.list_bank_acct_trans_image?p_session_id=oUq4p0ZwPcmmyY7v&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_account_code:
optional
string

Account code

p_sub_acct_code:
optional
string

Sub Account code

p_extractor_code:
optional
string

Extractor code

p_start_datetime:
optional
string

Start Date

p_end_datetime:
optional
string

End Date

p_order_type:
optional
string

(DA-Datetime Asc (default),DD-Datetime Desc,SA-Desc Asc,SD-Des Desc,CA-Category Asc,CD-Category Desc,NA-Net Asc,ND-Net Desc)

p_page_number:
optional
number

When the return have more than one page, you need to inform which page you want. Default = 1.

p_page_size:
optional
number

Number of rows to return. Defaul = 100.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
             
        String input = "p_session_id=wuiqyebDD&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image

Result Format

                                                   {

    "root": 

{

    "bank_acct_trans_image": 

[

{

    "row_id": "AAA6ruAAEAAGV9sAAO",
    "row_datetime": "09/17/2015 16:35:11",
    "row_epochtime": 1442532911,
    "row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~9328~20150612000000~1~1~",
    "user_email": "bp1@bp.com",
    "user_name": "bp1@bp.com",
    "customer_code": "US-LEDGERSYNC",
    "customer_name": "LedgerSync",
    "parent_customer_code": null,
    "parent_customer_name": null,
    "extractor_code": "US-CHASE",
    "extractor_name": "Chase USA",
    "extractor_url": "https://chaseonline.chase.com/Logon.aspx",
    "intuit_id": "2430",
    "provider_code": "US-CHASE",
    "provider_name": "Chase USA",
    "provider_alias": "Chase",
    "provider_url": "https://www.chase.com",
    "country_code": "US",
    "country_name": "United States",
    "account_code": "BPANALYTICS2",
    "account_name": "Chase Test Account",
    "bank_acct_code": "9328",
    "bank_acct_name": "PLAT BUS CHECKING",
    "trans_datetime": "06/12/2015 00:00:00",
    "trans_epochtime": 1434092400,
    "trans_date": "06/12/2015",
    "trans_epochdate": 1434092400,
    "trans_time": "00:00:00",
    "trans_month_num": "06",
    "trans_month_name": "June",
    "trans_month_year": "2015",
    "trans_month_day": "12",
    "trans_week_day": "Friday",
    "trans_week_quarter": "2",
    "trans_week_iso_year": "24",
    "trans_week_ansi_year": "24",
    "trans_seq": 1,
    "trans_code": null,
    "trans_desc": "ATM CHECK DEPOSIT 06/12 6300 WILSHIRE BLVD LOS ANGELES CA",
    "credit_value": 1000,
    "debit_value": 0,
    "net_value": 1000,
    "abs_value": 1000,
    "currency_code": "USD",
    "currency_name": "United States Dollar",
    "currency_sign": "$",
    "category_name": "Check",
    "category_group": "Undefined",
    "sub_category_name": "check",
    "cust_category_name": "Check",
    "cust_category_group": "Undefined",
    "cust_sub_category_name": "check",
    "cust_class_type": "U",
    "cust_class_name": "Undefined",
    "trans_category_name": "Check",
    "trans_category_group": "Undefined",
    "trans_sub_category_name": "check",
    "trans_class_type": "U",
    "trans_class_name": "Undefined",
    "class_type": "U",
    "class_name": "Undefined",
    "saved_timestamp": "09/08/2015 08:15:52.026 -07:00",
    "saved_epochtime": 1441725352026,
    "valid_flag": true,
    "image_seq": 1,
    "image_url": "https://fde-api-sandbox.com/apis/tst0001/fde.get_trans_image?p_row_key=bp1%40bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~9328~20150612000000~1~1~&p_session_id=e5gxe69OF%2FawX%2Fhp",
    "mime_type": "image/png",
    "image_timestamp": "09/08/2015 08:15:52.026 -07:00",
    "image_epochtime": 1441725352026,
    "image_count": 1,
    "check_number": "06",
    "trans_row_id": "AAAxyXAAEAAEEeoAAG",
    "trans_row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~9328~20150612000000~1~~"

}
],
        status_text": "24 row(s) returned - 1 page(s)",
        "row_count": "24",
        "page_count": "1",
        "page_number": "1",
        "return_code": "GENERIC_STATUS",
        "return_text": "24 row(s) returned - 1 page(s)",
        "return_type": "SUCCESS"
    }

}                                            
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postGet Transaction Image

This special service gets the transaction image decoded into the original format, ready to be displayed or saved. To get the image just pass the parameter “p_row_key” which can be obtained via the service “fde.list_bank_acct_trans_image”, tag “image_url” .

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.get_trans_image?p_row_key=AAA3uPAAEAAE9dPAAA&p_session_id=oUq4p0ZwPcmmyY7v


p_session_id:
required
string

User's session Id

p_row_key:
required
string

Row Key (Image Transaction Identification)

Can be obtained via the service “fde.list_bank_acct_trans_image”, tag “image_url” .

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.get_trans_image");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
              
        String input = "p_row_key=AAA3uPAAEAAE9dPAAA&p_session_id=wuiqyebDD&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_row_id'=>'DHGFNUEY@WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Attention

  • To download the image you will need to implement a proxy. Calling the URL directly from the browser the service will throw an error that IP address does not match session. FDE is secured against cross-domain access.

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.download_stmt_file

Result Format

RETURN IS AN IMAGE FILE.

                                           
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Statement Files

This service lists the statement files. The file is identified by its MIME type (tag “mime_type”).

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.list_stmt_file?p_session_id=oUq4p0ZwPcmmyY7v&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_account_code:
optional
string

Account code

p_sub_acct_code:
optional
string

Sub Account code

p_extractor_code:
optional
string

Extractor code

p_start_datetime:
optional
string

Start Date

p_end_datetime:
optional
string

End Date

p_order_type:
optional
string

(DA-Datetime Asc (default),DD-Datetime Desc,SA-Desc Asc,SD-Des Desc,CA-Category Asc,CD-Category Desc,NA-Net Asc,ND-Net Desc)

p_page_number:
optional
number

When the return have more than one page, you need to inform which page you want. Default = 1.

p_page_size:
optional
number

Number of rows to return. Defaul = 100.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_stmt_file");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
              
        String input = "p_session_id=wuiqyebDD&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_stmt_file";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_stmt_file

Result Format

                                                   
{

    "root": 

{

    "stmt_file": 

[

{

    "row_id": "AAA6GtAAEAAEGV2AAD",
    "row_datetime": "09/17/2015 17:09:59",
    "row_epochtime": 1442534999,
    "row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~BANK~6920~August 31, 2015~~",
    "stmt_file_label": "August 31, 2015",
    "container_type": "BANK",
    "container_desc": "Bank",
    "sub_acct_code": "6920",
    "sub_acct_name": "PLAT BUS CHECKING",
    "user_email": "bp1@bp.com",
    "user_name": "bp1@bp.com",
    "customer_code": "US-LEDGERSYNC",
    "customer_name": "LedgerSync",
    "parent_customer_code": null,
    "parent_customer_name": null,
    "file_date": "08/31/2015",
    "file_epochdate": 1441004400,
    "file_name": "August 31, 2015",
    "file_size": 41392,
    "file_url": "https://fde-api-sandbox.com/apis/tst0001/fde.download_stmt_file?p_row_key=bp1%40bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~BANK~6920~August%2031%2C%202015~~&p_session_id=e5gxe69OF%2FawX%2Fhp",
    "mime_type": "application/pdf",
    "account_code": "BPANALYTICS2",
    "account_name": "Chase Test Account",
    "extractor_code": "US-CHASE",
    "extractor_name": "Chase USA",
    "extractor_url": "https://chaseonline.chase.com/Logon.aspx",
    "intuit_id": "2430",
    "provider_code": "US-CHASE",
    "provider_name": "Chase USA",
    "provider_alias": "Chase",
    "provider_url": "https://www.chase.com",
    "country_code": "US",
    "country_name": "United States",
    "file_timestamp": "09/08/2015 08:15:52.026 -07:00",
    "file_epochtime": 1441725352026,
    "icon_url": "http://www.bpanalytics1.com:8000/public/app/icons/stmt.png"

}
],
        "status_text": "18 row(s) returned - 1 page(s)",
        "row_count": "18",
        "page_count": "1",
        "page_number": "1",
        "return_code": "GENERIC_STATUS",
        "return_text": "18 row(s) returned - 1 page(s)",
        "return_type": "SUCCESS"
    }

}                                          
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postGet File Statement

This special service downloads the file content decoded into the original format, ready to be displayed or saved. To download the file just pass the parameter “p_row_key” which can be obtained via the service “fde.list_stmt_file”, tag “file_url”.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.download_stmt_file?p_row_key=AAA3uPAAEAAE9dPAAA&p_session_id=oUq4p0ZwPcmmyY7v


p_session_id:
required
string

User's session Id

p_row_key:
required
string

Row Key (File Statement Identification)

Can be obtained via the service “fde.list_stmt_file”, tag “file_url” .

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.download_stmt_file");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
             
        String input = "p_row_key=AAA3uPAAEAAE9dPAAA&p_session_id=oUq4p0ZwPcmmyY7v";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.download_stmt_file";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_row_id'=>'DHGFNUEY@WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Attention

  • To download the image you will need to implement a proxy. Calling the URL directly from the browser the service will throw an error that IP address does not match session. FDE is secured against cross-domain access.

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.download_stmt_file

Result Format

RETURN IS A STATEMENT FILE.

                                           
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



Getting Started

Getting Started with IFrame


FDE provides a simple, standard HTML page via FIF (FDE Interface Framework) which allows customers to embed or inject this in any HTML “frame” or “iframe”. This reduces the implementation time by eliminating the need to code the account management using the API calls.

Functions implemented:

  • Automatic authentication via remote authorization (if not, login form is presented).
  • List of accounts, last added/updated, last status.
  • Add, update, change or remove account.
  • Customizable style (based on “Bootstrap” classes).
  • Customizable layout (via options to hide or show features).

FDE IFrame - 6 Steps of Development to Get FDE API Working



postFlowcharts - FDE API


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>FIF - FDE Interface Framework (Example)</title>
</head>
<body>
    <iframe id="fif" src="https://fde-api-sandbox.com/apis/dvp0001/fif.page_handler"  style="position: absolute; height: 100%; width: 100%; border: none"> </iframe>
</body>
</html>

postAuthentication Methods

Remote Authorization

If you don’t want users to type e-mail and password then you just need to call “fde.authenticate_user” and pass the returned session ID (tag or attribute “session_id”) to FIF.

When calling fde.authenticate_user pass the parameter p_ip_address with the user's IP Address. This way we are authenticating the user and allowing calls from the user's browswer through FIF module.

http(s)://host:port/environment/fif.page_handler?p_session_id=session_id

Common flow:

  • Register user: fde.register_user (if not already registered)
  • Authenticate user: “fde.authenticate_user”.
  • Call FIF in a “frame” or “iframe”: fif.page_handler?p_session_id=session_id

Login Form

If no authorization via session ID is provided then a login form is presented to the user:

http(s)://host:port/environment/fif.page_handler

Common flow:

  • Register user: fde.register_user (if not already registered)
  • Call FIF in a “frame” or “iframe”: fif.page_handler

Download Examples

Below, you can get the FDE API examples in Java and PHP. They presents you an example of how to use each FDE function.

There is an Readme.txt into the package, please, follow its instructions before running any example code.



postCustomizing Styles

By default the standard HTML interface uses the following “Bootstrap” (http://getbootstrap.com) styles and scripts:

  • https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
  • https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js
  • https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js

But if you want a different style for HTML elements then you can just use a different style sheet but using the same class names as defined by “Bootstrap”. To overwrite them you can use the following optional URL parameters:

  • p_style_1_url (default=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css)
  • p_style_2_url (default=empty)
  • p_style_3_url (default=empty)
  • p_script_1_url (default=https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js)
  • p_script_2_url (default=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js)
  • p_script_3_url (default=empty)

You can also keep the default “Bootstrap” style and use the second style URL (p_style_2_url) to overwrite just those classes you to change.

Additionally, if you will use the HTML interface as the main page, you can also overwrite the page title by passing the parameter “p_window_title”.

Customizing Layout

You can pass via URL any of the following parameters to show or hide several features on the screen:

  • p_show_name: to show the user e-mail and name, “true” or “false”, default “true”.
  • p_show_logout: to show the “Log Out” button, “true” or “false”, default “true”.
  • p_show_add: to show the “Add” (Account) button, “true” or “false”, default “true”.
  • p_show_update: to show the update account icon, “true” or “false”, default “true”.
  • p_show_change: to show the change account icon, “true” or “false”, default “true”.
  • p_show_remove: to show the remove account icon, “true” or “false”, default “true”.
  • p_save_option: to automatically save password fields or let the user choose, “true”, “false” or “choose”, default value “choose”.
  • p_bank_option: to automatically select the bank container or let the user choose, “true”, “false” or “choose”, default value “choose”.
  • p_cc_option: to automatically select the credit card container or let the user choose, “true”, “false” or “choose”, default value “choose”.v
  • p_inv_option: to automatically select the investment container or let the user choose, “true”, “false” or “choose”, default value “choose”.
  • p_bill_option: to automatically select the bill container or let the user choose, “true”, “false” or “choose”, default value “choose”.
  • p_image_option: to automatically extract images or let the user choose, “true”, “false” or “choose”, default value “choose”.
  • p_stmt_option: to automatically extract statements or let the user choose, “true”, “false” or “choose”, default value “choose”.

Attention

  • These parameters don’t need to be passed on every call, just once and then they are valid for duration of the session.

postBypass Options

The default flow to add an account is:

1. Authenticate user (via login form or remote authorization).

2. Select an extractor.

3. Type a name for the account and select the containers or options to extract.

4. Start the extraction.

But if you want to bypass steps 2 and 3 when using remote authorization you can use the following options:

Select Extractor

To pre-select an extractor when adding call:

http(s)://host:port/environment/fif.page_handler?p_session_id=session_id&p_page_type=SET&p_extractor_code=extractor_code

Add Account

To start adding an account immediately by proving the account name, extractor code and for example the bank container call:

http(s)://host:port/environment/fif.page_handler?p_session_id=session_id&p_page_type=START&p_extractor_code=extractor_code&p_account_name=account_name&p_bank_flag=true


postFDE IFrame - Code Example

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>FIF - FDE Interface Framework (Example)</title>
</head>
<body>
    <iframe id="fif" src="https://fde-api-sandbox.com/apis/dvp0001/fif.page_handler"  style="position: absolute; height: 100%; width: 100%; border: none"> </iframe>
</body>
</html>

postFDE - IFrame Screenshots

Login Screen

Figure 01 - Login Screen

List Accounts Added Screen

Figure 02 - Login Screen

Add Account - Search Extractor (Step 1)

Figure 03 - Search Extractor

Add Account - Entering with Account Name and Extractor Options (Step 2)

Figure 04 - Entering with Account Name and Extractor Options

Add Account - Loading Form Credentials

Figure 05 - Loading Form Credentials

p_user_email:
required
string

New user's email

p_user_password:
required
string

New user's password

p_user_name:
required
string

New user's username

p_session_id:
required
string

Session id of the user who has been logged and has permission to register users

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.register_user");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        
        String input = "p_user_email=doc2@bpanalytics.com&p_user_name=DocUserName&p_user_password=temp2015?&p_session_id=DznMNmAI1fVTKER/&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.authenticate_user";

    $data = array('p_user_email'=>'fde.customer@FDE.com',
    'p_user_password'=>'test2015!',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.register_user

Result Format

                                                   
{
root: {
message_text: "User successfully registered",
row_count: "0",
page_count: "0",
page_number: "0",
return_code: "GENERIC_MESSAGE",
return_text: "User successfully registered",
return_type: "SUCCESS"
}
}
                                                
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Transactions

List transactions of all user's accounts added. You can use filters to get a specific transaction or transactions.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.list_sub_acct_trans?p_session_id=e5gxe69OF/awX/hp&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_account_code:
optional
string

Account code

p_sub_acct_code:
optional
string

Sub Account code

p_extractor_code:
optional
string

Extractor code

p_start_datetime:
optional
string

Start Date

p_end_datetime:
optional
string

End Date

p_order_type:
optional
string

(DA-Datetime Asc (default),DD-Datetime Desc,SA-Desc Asc,SD-Des Desc,CA-Category Asc,CD-Category Desc,NA-Net Asc,ND-Net Desc)

p_page_number:
optional
number

When the return have more than one page, you need to inform which page you want. Default = 1.

p_page_size:
optional
number

Number of rows to return. Defaul = 100.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct_trans");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
            
        String input = "p_session_id=wuiqyebDD&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct_trans";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_sub_acct_trans

Result Format

                                                   
{

    "root": 

{

    "sub_acct_trans": 

[

{

    "row_id": "AAAxyXAAEAAEEeXAAM",
    "row_datetime": "09/17/2015 16:09:10",
    "row_epochtime": 1442531350,
    "row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~1446~20150722000000~1~~",
    "container_type": "BANK",
    "container_desc": "Bank",
    "extractor_code": "US-CHASE",
    "extractor_name": "Chase USA",
    "extractor_url": "https://chaseonline.chase.com/Logon.aspx",
    "intuit_id": "2430",
    "provider_code": "US-CHASE",
    "provider_name": "Chase USA",
    "provider_alias": "Chase",
    "provider_url": "https://www.chase.com",
    "country_code": "US",
    "country_name": "United States",
    "account_code": "BPANALYTICS2",
    "account_name": "Chase Test Account",
    "sub_acct_code": "1446",
    "sub_acct_name": "CHASE SAVINGS",
    "user_email": "bp1@bp.com",
    "user_name": "bp1@bp.com",
    "customer_code": "US-LEDGERSYNC",
    "customer_name": "LedgerSync",
    "parent_customer_code": null,
    "parent_customer_name": null,
    "trans_datetime": "07/22/2015 00:00:00",
    "trans_epochtime": 1437548400,
    "trans_date": "07/22/2015",
    "trans_epochdate": 1437548400,
    "trans_time": "00:00:00",
    "trans_month_num": "07",
    "trans_month_name": "July",
    "trans_month_year": "2015",
    "trans_month_day": "22",
    "trans_week_day": "Wednesday",
    "trans_week_quarter": "3",
    "trans_week_iso_year": "30",
    "trans_week_ansi_year": "29",
    "trans_seq": 1,
    "trans_code": null,
    "trans_desc": "INTEREST PAYMENT",
    "credit_value": 0.02,
    "debit_value": 0,
    "net_value": 0.02,
    "abs_value": 0.02,
    "currency_code": "USD",
    "currency_name": "United States Dollar",
    "currency_sign": "$",
    "category_name": "Interest",
    "category_group": "Undefined",
    "sub_category_name": "Undefined",
    "cust_category_name": "Interest",
    "cust_category_group": "Undefined",
    "cust_sub_category_name": "Undefined",
    "cust_class_type": "U",
    "cust_class_name": "Undefined",
    "trans_category_name": "Interest",
    "trans_category_group": "Undefined",
    "trans_sub_category_name": "Undefined",
    "trans_class_type": "U",
    "trans_class_name": "Undefined",
    "orig_trans_desc": "INTEREST PAYMENT",
    "class_type": "U",
    "class_name": "Undefined",
    "saved_timestamp": "09/08/2015 08:15:52.026 -07:00",
    "saved_epochtime": 1441725352026,
    "custom_flag": false,
    "valid_flag": true,
    "mime_type": null,
    "image_flag": false,
    "fund_flag": false,
    "image_url": null,
    "check_number": null,
    "fund_code": null,
    "fund_name": null,
    "fund_quant": null,
    "fund_price": null,
    "image_count": 0,
    "fund_count": 0

}        
],
        "status_text": "138 row(s) returned - 2 page(s)",
        "row_count": "138",
        "page_count": "2",
        "page_number": "1",
        "return_code": "GENERIC_STATUS",
        "return_text": "138 row(s) returned - 2 page(s)",
        "return_type": "SUCCESS"
    }

}                                             
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Bank Account Transactions Images

This service lists the bank transactions containing images (checks, deposits, etc) and its attributes.

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.list_bank_acct_trans_image?p_session_id=oUq4p0ZwPcmmyY7v&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_account_code:
optional
string

Account code

p_sub_acct_code:
optional
string

Sub Account code

p_extractor_code:
optional
string

Extractor code

p_start_datetime:
optional
string

Start Date

p_end_datetime:
optional
string

End Date

p_order_type:
optional
string

(DA-Datetime Asc (default),DD-Datetime Desc,SA-Desc Asc,SD-Des Desc,CA-Category Asc,CD-Category Desc,NA-Net Asc,ND-Net Desc)

p_page_number:
optional
number

When the return have more than one page, you need to inform which page you want. Default = 1.

p_page_size:
optional
number

Number of rows to return. Defaul = 100.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
       
        String input = "p_session_id=wuiqyebDD&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image

Result Format

                                                   {

    "root": 

{

    "bank_acct_trans_image": 

[

{

    "row_id": "AAA6ruAAEAAGV9sAAO",
    "row_datetime": "09/17/2015 16:35:11",
    "row_epochtime": 1442532911,
    "row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~9328~20150612000000~1~1~",
    "user_email": "bp1@bp.com",
    "user_name": "bp1@bp.com",
    "customer_code": "US-LEDGERSYNC",
    "customer_name": "LedgerSync",
    "parent_customer_code": null,
    "parent_customer_name": null,
    "extractor_code": "US-CHASE",
    "extractor_name": "Chase USA",
    "extractor_url": "https://chaseonline.chase.com/Logon.aspx",
    "intuit_id": "2430",
    "provider_code": "US-CHASE",
    "provider_name": "Chase USA",
    "provider_alias": "Chase",
    "provider_url": "https://www.chase.com",
    "country_code": "US",
    "country_name": "United States",
    "account_code": "BPANALYTICS2",
    "account_name": "Chase Test Account",
    "bank_acct_code": "9328",
    "bank_acct_name": "PLAT BUS CHECKING",
    "trans_datetime": "06/12/2015 00:00:00",
    "trans_epochtime": 1434092400,
    "trans_date": "06/12/2015",
    "trans_epochdate": 1434092400,
    "trans_time": "00:00:00",
    "trans_month_num": "06",
    "trans_month_name": "June",
    "trans_month_year": "2015",
    "trans_month_day": "12",
    "trans_week_day": "Friday",
    "trans_week_quarter": "2",
    "trans_week_iso_year": "24",
    "trans_week_ansi_year": "24",
    "trans_seq": 1,
    "trans_code": null,
    "trans_desc": "ATM CHECK DEPOSIT 06/12 6300 WILSHIRE BLVD LOS ANGELES CA",
    "credit_value": 1000,
    "debit_value": 0,
    "net_value": 1000,
    "abs_value": 1000,
    "currency_code": "USD",
    "currency_name": "United States Dollar",
    "currency_sign": "$",
    "category_name": "Check",
    "category_group": "Undefined",
    "sub_category_name": "check",
    "cust_category_name": "Check",
    "cust_category_group": "Undefined",
    "cust_sub_category_name": "check",
    "cust_class_type": "U",
    "cust_class_name": "Undefined",
    "trans_category_name": "Check",
    "trans_category_group": "Undefined",
    "trans_sub_category_name": "check",
    "trans_class_type": "U",
    "trans_class_name": "Undefined",
    "class_type": "U",
    "class_name": "Undefined",
    "saved_timestamp": "09/08/2015 08:15:52.026 -07:00",
    "saved_epochtime": 1441725352026,
    "valid_flag": true,
    "image_seq": 1,
    "image_url": "https://fde-api-sandbox.com/apis/tst0001/fde.get_trans_image?p_row_key=bp1%40bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~9328~20150612000000~1~1~&p_session_id=e5gxe69OF%2FawX%2Fhp",
    "mime_type": "image/png",
    "image_timestamp": "09/08/2015 08:15:52.026 -07:00",
    "image_epochtime": 1441725352026,
    "image_count": 1,
    "check_number": "06",
    "trans_row_id": "AAAxyXAAEAAEEeoAAG",
    "trans_row_key": "bp1@bp.com~US-CHASE~US-LEDGERSYNC~BPANALYTICS2~9328~20150612000000~1~~"

}
],
        status_text": "24 row(s) returned - 1 page(s)",
        "row_count": "24",
        "page_count": "1",
        "page_number": "1",
        "return_code": "GENERIC_STATUS",
        "return_text": "24 row(s) returned - 1 page(s)",
        "return_type": "SUCCESS"
    }

}                                            
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postGet Transaction Image

This special service gets the transaction image decoded into the original format, ready to be displayed or saved. To get the image just pass the parameter “p_row_key” which can be obtained via the service “fde.list_bank_acct_trans_image”, tag “image_url” .

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.get_trans_image?p_row_key=AAA3uPAAEAAE9dPAAA&p_session_id=oUq4p0ZwPcmmyY7v


p_session_id:
required
string

User's session Id

p_row_key:
required
string

Row Key (Image Transaction Identification)

Can be obtained via the service “fde.list_bank_acct_trans_image”, tag “image_url” .

Sample

public static void main(String[] args) {
    try {

        URL url = new URL("https://fde-api-sandbox.com/apis/tst0001/fde.get_trans_image");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
            
        String input = "p_session_id=wuiqyebDD&p_output_type=JSON";

        OutputStream os = conn.getOutputStream();
        os.write(input.getBytes());
        os.flush();

        BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

        String output;
        System.out.println("Output from Server .... \n");
        while ((output = br.readLine()) != null) {
            System.out.println(output);
        }
        conn.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
<?php

    $service_url = "https://fde-api-sandbox.com/apis/tst0001/fde.list_bank_acct_trans_image";

    $data = array('p_session_id'=>'GsdYC#WXS',
    'p_row_id'=>'DHGFNUEY@WXS',
    'p_output_type'=>'JSON');

    $curl = curl_init($service_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $curl_response = curl_exec($curl);

    if ($curl_response === false) {
        $info = curl_getinfo($curl);
        curl_close($curl);
        die('error occured during curl exec. Additioanl info: ' . var_export($info));
    }else{
        echo $curl_response;
    }
    curl_close($curl);

?>

Attention

  • To download the image you will need to implement a proxy. Calling the URL directly from the browser the service will throw an error that IP address does not match session. FDE is secured against cross-domain access.

Definition

https://fde-api-sandbox.com/apis/tst0001/fde.get_trans_image

Result Format

RETURN IS AN IMAGE.

                                           
{
                                                  "error": {
                                                    "en": "Transaction does not exist"
                                                  },
                                                  "success": false
                                                }



postList Statement Files

This service lists the statement files. The file is identified by its MIME type (tag “mime_type”).

URL Link Example:
https://fde-api-sandbox.com/apis/tst0001/
fde.list_stmt_file?p_session_id=oUq4p0ZwPcmmyY7v&p_output_type=JSON


p_session_id:
required
string

User's session Id

p_account_code:
optional
string

Account code

p_sub_acct_code:
optional
string

Sub Account code

p_extractor_code:
optional
string

Extractor code

p_start_datetime:
optional
string

Start Date

p_end_datetime:
optional
string

End Date

p_order_type:
optional
string

(DA-Datetime Asc (default),DD-Datetime Desc,SA-Desc Asc,SD-Des Desc,CA-Category Asc,CD-Category Desc,NA-Net Asc,ND-Net Desc)

p_page_number:
optional
number

When the return have more than one page, you need to inform which page you want. Default = 1.

p_page_size:
optional
number

Number of rows to return. Defaul = 100.

p_output_type:
optional
string

Return type you expect. Default is XML.

  • JSON
  • XML