OpenBankProject 46 Followers

The Open Bank Project (OBP) aims to provide a common RESTful API for reading and writing banking transactions. It aims to raise the bar of financial transparency and increase the choice of tools for accessing bank accounts. . https://github.com/OpenBankProject

Quick Links

View Show Available Profiles


JSON structure for OBP API

Public question posted on Mon, 05 Dec 2011 by Simon Redfern


Hi Folks,

Here to start a discussion about the JSON structure we might use for the Open Bank Project API.

Thanks to Jan already for his suggestions.

One question is about perspective. i.e. Should we model the json from the perspective of the "World" i.e. money flows FROM one bank account TO another. i.e. the money is unsigned (not positive or negative) and always moves in one direction.
Or, should we model the JSON from the perspective of the "current" account holder. i.e. Credits (+ amounts) flow into the "current" bank account and debits (- amounts) flow out of the current bank account.
Thus the sign determins the direction of money flow.

The "world view" is more symmetrical and a single transaction would look similar from the perspective of both ends of the transaction.


The "current account" view might require less effort on behalf of an "app developer" who is interested in showing data from the current account perspective.

"World View":
[
   {
      "obp_transaction":{
         "from_account":{
            "holder":"Music Pictures Limited",
            "number":"123567",
            "type":"current",
            "bank":{
               "IBAN":"DE1235123612",
               "national_identifier":"de.10010010",
               "name":"Postbank"
            }
         },
         "to_account":{
            "holder":"Simon Redfern",
            "number":"3225446882",
            "type":"current",
            "bank":{
               "IBAN":"UK12789879",
               "national_identifier":"uk.10010010",
               "name":"HSBC"
            }
         },
         "details":{
            "type_en":"Transfer",
            "type_de":"Überweisung",
            "posted":"ISODate 2011-11-25T10:28:38.273Z",
            "completed":"ISODate 2011-11-26T10:28:38.273Z",
            "value":{
               "currency":"EUR",
               "amount":"354.99"
            },
            "other_data":"9Z65HCF/0723203600/68550030\nAU 100467978\nKD-Nr2767322"
         }
      }
   },
   {
         "obp_transaction":{
            "from_account":{
               "holder":"Client 1",
               "number":"123567",
               "type":"current",
               "bank":{
                  "IBAN":"UK12222879",
                  "national_identifier":"de.10010010",
                  "name":"Postbank"
               }
            },
            "to_account":{
               "holder":"Music Pictures Limited",
               "number":"3225446882",
               "type":"current",
               "bank":{
                  "IBAN":"UK12789879",
                  "national_identifier":"uk.10010010",
                  "name":"HSBC"
               }
            },
            "details":{
               "type_en":"Transfer",
               "type_de":"Überweisung",
               "posted":"ISODate 2011-11-25T10:28:38.273Z",
               "completed":"ISODate 2011-11-26T10:28:38.273Z",
               "value":{
                  "currency":"EUR",
                  "amount":"123.45"
               },
               "other_data":"9Z65HCF/0723203600/68550030\nAU 100467978\nKD-Nr2767322"
            }
         }
      }
]

"Current Account View"
[
   {
      "obp_transaction":{
         "this_account":{
            "holder":"Music Pictures Limited",
            "number":"123567",
            "type":"current",
            "bank":{
               "IBAN":"DE1235123612",
               "national_identifier":"de.10010010",
               "name":"Postbank"
            }
         },
         "other_account":{
            "holder":"Simon Redfern",
            "number":"3225446882",
            "type":"current",
            "bank":{
               "IBAN":"UK12789879",
               "national_identifier":"uk.10010010",
               "name":"HSBC"
            }
         },
         "details":{
            "type_en":"Transfer",
            "type_de":"Überweisung",
            "posted":"ISODate 2011-11-25T10:28:38.273Z",
            "completed":"ISODate 2011-11-26T10:28:38.273Z",
            "value":{
               "currency":"EUR",
               "amount":"-354.99"
            },
            "other_data":"9Z65HCF/0723203600/68550030\nAU 100467978\nKD-Nr2767322"
         }
      }
   },
   {
         "obp_transaction":{
            "this_account":{
               "holder":"Music Pictures Limited",
               "number":"123567",
               "type":"current",
               "bank":{
                  "IBAN":"DE1235123612",
                  "national_identifier":"de.10010010",
                  "name":"Postbank"
               }
            },
            "other_account":{
               "holder":"Client 1",
               "number":"123567",
               "type":"current",
               "bank":{
                  "IBAN":"UK12222879",
                  "national_identifier":"uk.10010010",
                  "name":"HSBC"
               }
            },
            "details":{
               "type_en":"Transfer",
               "type_de":"Überweisung",
               "posted":"ISODate 2011-11-25T10:28:38.273Z",
               "completed":"ISODate 2011-11-26T10:28:38.273Z",
               "value":{
                  "currency":"EUR",
                  "amount":"123.45"
               },
               "other_data":"9Z65HCF/0723203600/68550030\nAU 100467978\nKD-Nr2767322"
            }
         }
      }  
]


Replies
    This Evis needs your voice! Please Login to post comments.
    #4

    Hallo, Eviscape team,

    I think it makes more sense to build it as a current account, so the
    account holders can show their transactions.

    Later you may make a "social graph" from the money flow from a birds
    perspective - or the "world´s" perspective, with different colors
    marking the amounts, frequency, etc. This shows the nodes of money, where
    it is collected from which different sources and how it is redistributed.

    Than it is interesting to check the transactions of the nodes from the
    "current" perspective again: where is how much money going? How much is
    left - for what? (Explanation field built in for declarations?)

    So seeing a graphic overview one could answer the question easily, whether
    they are corrupt, as there would be some blinking field, if yes.

    Would it make sense to build the API so? And also accessible for other
    other programmers for their apps?

    Best regards

    Joseph


    2011/12/5

    > Dear Joseph Somogyi,
    >
    > A new Evis was posted to the Profile OpenBankProject:
    >
    > JSON structure for OBP API
    > ------------------------------
    >
    > Hi Folks,
    >
    > Here to start a discussion about the JSON structure we might use for the
    > Open Bank Project API.
    >
    > Thanks to Jan already for his suggestions.
    >
    > One question is about perspective. i.e. Should we model the json from the
    > perspective of the "World" i.e. money flows FROM one bank account TO
    > another. i.e. the money is unsigned (not positive or negative) and always
    > moves in one direction.
    > Or, should we model the JSON from the perspective of the "current" account
    > holder. i.e. Credits (+ amounts) flow into the "current" bank account and
    > debits (- amounts) flow out of the current bank account.
    > Thus the sign determins the direction of money flow.
    >
    > The "world view" is more symmetrical and a single transaction would look
    > similar from the perspective of both ends of the transaction.
    >
    >
    > The "current account" view might require less effort on behalf of an "app
    > developer" who is interested in showing data from the current account
    > perspective.
    >
    > "World View":
    > [
    > {
    > "obp_transaction":{
    > "from_account":{
    > "holder":"Music Pictures Limited",
    > "number":"123567",
    > "type":"current",
    > "bank":{
    > "IBAN":"DE1235123612",
    > "national_identifier":"de.10010010",
    > "name":"Postbank"
    > }
    > },
    > "to_account":{
    > "holder":"Simon Redfern",
    > "number":"3225446882",
    > "type":"current",
    > "bank":{
    > "IBAN":"UK12789879",
    > "national_identifier":"uk.10010010",
    > "name":"HSBC"
    > }
    > },
    > "details":{
    > "type_en":"Transfer",
    > "type_de":"Überweisung",
    > "posted":"ISODate 2011-11-25T10:28:38.273Z",
    > "completed":"ISODate 2011-11-26T10:28:38.273Z",
    > "value":{
    > "currency":"EUR",
    > "amount":"354.99"
    > },
    > "other_data":"9Z65HCF/0723203600/68550030nAU
    > 100467978nKD-Nr2767322"
    > }
    > }
    > },
    > {
    > "obp_transaction":{
    > "from_account":{
    > "holder":"Client 1",
    > "number":"123567",
    > "type":"current",
    > "bank":{
    > "IBAN":"UK12222879",
    > "national_identifier":"de.10010010",
    > "name":"Postbank"
    > }
    > },
    > "to_account":{
    > "holder":"Music Pictures Limited",
    > "number":"3225446882",
    > "type":"current",
    > "bank":{
    > "IBAN":"UK12789879",
    > "national_identifier":"uk.10010010",
    > "name":"HSBC"
    > }
    > },
    > "details":{
    > "type_en":"Transfer",
    > "type_de":"Überweisung",
    > "posted":"ISODate 2011-11-25T10:28:38.273Z",
    > "completed":"ISODate 2011-11-26T10:28:38.273Z",
    > "value":{
    > "currency":"EUR",
    > "amount":"123.45"
    > },
    > "other_data":"9Z65HCF/0723203600/68550030nAU
    > 100467978nKD-Nr2767322"
    > }
    > }
    > }
    > ]
    >
    > "Current Account View"
    > [
    > {
    > "obp_transaction":{
    > "this_account":{
    > "holder":"Music Pictures Limited",
    > "number":"123567",
    > "type":"current",
    > "bank":{
    > "IBAN":"DE1235123612",
    > "national_identifier":"de.10010010",
    > "name":"Postbank"
    > }
    > },
    > "other_account":{
    > "holder":"Simon Redfern",
    > "number":"3225446882",
    > "type":"current",
    > "bank":{
    > "IBAN":"UK12789879",
    > "national_identifier":"uk.10010010",
    > "name":"HSBC"
    > }
    > },
    > "details":{
    > "type_en":"Transfer",
    > "type_de":"Überweisung",
    > "posted":"ISODate 2011-11-25T10:28:38.273Z",
    > "completed":"ISODate 2011-11-26T10:28:38.273Z",
    > "value":{
    > "currency":"EUR",
    > "amount":"-354.99"
    > },
    > "other_data":"9Z65HCF/0723203600/68550030nAU
    > 100467978nKD-Nr2767322"
    > }
    > }
    > },
    > {
    > "obp_transaction":{
    > "this_account":{
    > "holder":"Music Pictures Limited",
    > "number":"123567",
    > "type":"current",
    > "bank":{
    > "IBAN":"DE1235123612",
    > "national_identifier":"de.10010010",
    > "name":"Postbank"
    > }
    > },
    > "other_account":{
    > "holder":"Client 1",
    > "number":"123567",
    > "type":"current",
    > "bank":{
    > "IBAN":"UK12222879",
    > "national_identifier":"uk.10010010",
    > "name":"HSBC"
    > }
    > },
    > "details":{
    > "type_en":"Transfer",
    > "type_de":"Überweisung",
    > "posted":"ISODate 2011-11-25T10:28:38.273Z",
    > "completed":"ISODate 2011-11-26T10:28:38.273Z",
    > "value":{
    > "currency":"EUR",
    > "amount":"123.45"
    > },
    > "other_data":"9Z65HCF/0723203600/68550030nAU
    > 100467978nKD-Nr2767322"
    > }
    > }
    > }
    > ]
    >
    > (click here to comment)
    > ------------------------------
    >
    > Cheers,
    > The Eviscape team.
    >



    --
    Mit freundlichen Grüssen / With best regards / Üdvözlettel

    Dr. Joseph Somogyi

    Neue Festnetztelefon-Nr. - new fixed line phone - uj vezetekes telefon:
    T: (030) 530 98 349
    Bitte auf Anrufbeantworter sprechen - pls. talk to the answer machine -
    beszeljen kerem az üzenetrögzitöre.

    Handy - Mobile: 0152 277 530 74
    Bitte keine Spachnachrichten, lieber SMS - instead of voice message send
    SMS please - hangüzenet helyett kerem küldjön SMS-t.


    - Joseph (Joseph Somogyi) 2 years, 4 months ago (Permalink)
    #3

    Estaré fuera de la oficina hasta el 20 de Diciembre.
    Por favor, si se trata de un tema urgente contacte con mi compañero Javier Rodríguez (jjrg@creativit.com).


    I will be out of the office until December 20th.
    Please, in case of urgent issue, contact my colleague Javier Rodríguez (jjrg@creativit.com).

    Muchas Gracias / Thanks a lot
    Un saludo / Best Regards,
    Gema


    - GemaCreativIT (Gema Maestro) 2 years, 7 months ago (Permalink)
    #2

    Hallo, Eviscape team,

    I think it makes more sense to build it as a current account, so the
    account holders can show their transactions.

    Later you may make a "social graph" from the money flow from a birds
    perspective - or the "world´s" perspective, with different colors
    marking the amounts, frequency, etc. This shows the nodes of money, where
    it is collected from which different sources and how it is redistributed.

    Than it is interesting to check the transactions of the nodes from the
    "current" perspective again: where is how much money going? How much is
    left - for what? (Explanation field built in for declarations?)

    So seeing a graphic overview one could answer the question easily, whether
    they are corrupt, as there would be some blinking field, if yes.

    Would it make sense to build the API so? And also accessible for other
    other programmers for their apps?

    Best regards

    Joseph


    - Joseph (Joseph Somogyi) 2 years, 7 months ago (Permalink)
    #1

    Data looks very neat though "ISODate" prefix doesn't make sense to me. Just adopt one date standard and client should ideally convert it.


    - iapain (iapain) 2 years, 7 months ago (Permalink)