Skip to content

Data format for importers

everett-tesobe edited this page Nov 8, 2012 · 1 revision

The OBP server accepts new transactions via an api call that should normally be restricted to valid importers only.

Please note: It is crucial that the fields this_account.number, this_account.kind, and this_account.bank.name match exactly to the values that are, as of the time of this document, stored in the Account collection on mongodb. This is how transactions are linked to Account objects.

Here is the format the server expects (an array of transactions):

JSON:

[{
     "obp_transaction":{
        "this_account":{
           "holder":"Music Pictures Limited",
           "number":"0580591101",
           "kind":"current",
           "bank":{
              "IBAN":"DE1235123612",
              "national_identifier":"de.10010010",
              "name":"POSTBANK"
           }
        },
        "other_account":{
           "holder":"Client 1",
           "number":"123567",
           "kind":"current",
           "bank":{
              "IBAN":"UK12222879",
              "national_identifier":"uk.10010010",
              "name":"HSBC"
           }
        },
        "details":{
           "type_en":"Transfer",
           "type_de":"Überweisung",
           "posted":{
              "$dt":"2012-01-04T18:06:22.000Z"
            },
           "completed":{
              "$dt":"2015-09-04T18:52:13.000Z"
            },
           "new_balance":{
                 "currency":"EUR",
              "amount":"4323.45"
           },
           "value":{
              "currency":"EUR",
              "amount":"15.49"
           },
           "other_data":""
        }
     }
 },
{
     "obp_transaction":{
        "this_account":{
           "holder":"Music Pictures Limited",
           "number":"0580591101",
           "kind":"current",
           "bank":{
              "IBAN":"DE1235123612",
              "national_identifier":"de.10010010",
              "name":"POSTBANK"
           }
        },
        "other_account":{
           "holder":"Client 2",
           "number":"123567",
           "kind":"current",
           "bank":{
              "IBAN":"UK22222879",
              "national_identifier":"uk.10010010",
              "name":"HSBC"
           }
        },
        "details":{
           "type_en":"Transfer",
           "type_de":"Überweisung",
           "posted":{
              "$dt":"2012-01-04T14:06:22.000Z"
            },
           "completed":{
              "$dt":"2012-09-04T14:52:13.000Z"
            },
           "new_balance":{
                 "currency":"EUR",
              "amount":"2222.45"
           },
           "value":{
              "currency":"EUR",
              "amount":"22.35"
           },
           "other_data":""
        }
     }
 }]
Clone this wiki locally