Skip to content

Latest commit

 

History

History
132 lines (96 loc) · 5.5 KB

OnboardingApi.md

File metadata and controls

132 lines (96 loc) · 5.5 KB

obp_python.OnboardingApi

All URIs are relative to http://test.openbankproject.com

Method HTTP request Description
o_bpv2_0_0_create_user POST /obp/v5.0.0/users Create User
o_bpv5_0_0_create_account PUT /obp/v5.0.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID} Create Account

o_bpv2_0_0_create_user

UserJsonV200 o_bpv2_0_0_create_user(body)

Create User

Creates OBP user.
No authorisation (currently) required.

Mimics current webform to Register.

Requires username(email) and password.

Returns 409 error if username not unique.

May require validation of email address.

Authentication is Mandatory

Example

from __future__ import print_function
import time
import obp_python
from obp_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: directLogin
configuration = obp_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure API key authorization: gatewayLogin
configuration = obp_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = obp_python.OnboardingApi(obp_python.ApiClient(configuration))
body = obp_python.CreateUserJson() # CreateUserJson | CreateUserJson object that needs to be added.

try:
    # Create User
    api_response = api_instance.o_bpv2_0_0_create_user(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OnboardingApi->o_bpv2_0_0_create_user: %s\n" % e)

Parameters

Name Type Description Notes
body CreateUserJson CreateUserJson object that needs to be added.

Return type

UserJsonV200

Authorization

directLogin, gatewayLogin

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

o_bpv5_0_0_create_account

CreateAccountResponseJsonV310 o_bpv5_0_0_create_account(body, account_id, bank_id)

Create Account

Create Account at bank specified by BANK_ID with Id specified by ACCOUNT_ID.

The User can create an Account for themself - or - the User that has the USER_ID specified in the POST body.

If the PUT body USER_ID is specified, the logged in user must have the Role canCreateAccount. Once created, the Account will be owned by the User specified by USER_ID.

If the PUT body USER_ID is not specified, the account will be owned by the logged in User.

The 'product_code' field SHOULD be a product_code from Product.
If the 'product_code' matches a product_code from Product, account attributes will be created that match the Product Attributes.

Note: The Amount MUST be zero.

Authentication is Mandatory

Example

from __future__ import print_function
import time
import obp_python
from obp_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: directLogin
configuration = obp_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure API key authorization: gatewayLogin
configuration = obp_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = obp_python.OnboardingApi(obp_python.ApiClient(configuration))
body = obp_python.CreateAccountRequestJsonV500() # CreateAccountRequestJsonV500 | CreateAccountRequestJsonV500 object that needs to be added.
account_id = 'account_id_example' # str | The account id
bank_id = 'bank_id_example' # str | The bank id

try:
    # Create Account
    api_response = api_instance.o_bpv5_0_0_create_account(body, account_id, bank_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OnboardingApi->o_bpv5_0_0_create_account: %s\n" % e)

Parameters

Name Type Description Notes
body CreateAccountRequestJsonV500 CreateAccountRequestJsonV500 object that needs to be added.
account_id str The account id
bank_id str The bank id

Return type

CreateAccountResponseJsonV310

Authorization

directLogin, gatewayLogin

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]