OpenBankProject / OBP-CLI

A command line interface for OBP API
GNU Affero General Public License v3.0
15 stars 15 forks source link

Import bank accounts from spreadsheet template #6

Closed chrisjsimpson closed 5 years ago

chrisjsimpson commented 5 years ago

For demos, banks and fin-techs often provide spreadsheets of example data they want to show for an app demo or online banking with a small dataset. This includes bank accounts.

Scenario: Import bank accounts from spreadsheet Ability to import accounts based on a standard template.

We already provide this facility for importing branches , so long as the user provides a valid branches template, then can import via obp importbranches. This issue is to add the same for accounts.

chrisjsimpson commented 5 years ago

Not so fast! :racehorse: , the api call https://apiexplorersandbox.openbankproject.com/#OBPv2_2_0-createAccount requires a pre-existing user id or will use the '"currently logged in user's id" an example payload:

{  
"user_id":"66214b8e-259e-44ad-8868-3eb47be70646",  
"label":"Label",  
"type":"CURRENT",  
"balance":{    "currency":"EUR",    "amount":"0"  }, 
"branch_id":"1234",  
"account_routing":{    "scheme":"OBP",    "address":"UK123456"  }
}

so, we can either