{"swagger":"2.0","info":{"title":"Open Bank Project API","description":"An Open Source API for Banks. (c) TESOBE GmbH. 2011 - 2024. Licensed under the AGPL and commercial licences.","contact":{"name":"TESOBE GmbH. / Open Bank Project","url":"https://openbankproject.com","email":"contact@tesobe.com"},"version":"v5.0.0"},"host":"apisandbox.openbankproject.com","basePath":"/","schemes":["http","https"],"securityDefinitions":{"directLogin":{"type":"apiKey","description":"https://github.com/OpenBankProject/OBP-API/wiki/Direct-Login","in":"header","name":"Authorization"},"gatewayLogin":{"type":"apiKey","description":"https://github.com/OpenBankProject/OBP-API/wiki/Gateway-Login","in":"header","name":"Authorization"}},"security":[{"directLogin":[],"gatewayLogin":[]}],"paths":{"/obp/v5.0.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID}":{"put":{"tags":["Account","Onboarding"],"summary":"Create Account (PUT)","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"
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
","operationId":"createAccount","parameters":[{"in":"body","name":"body","description":"CreateAccountRequestJsonV500 object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/CreateAccountRequestJsonV500"}},{"in":"path","name":"ACCOUNT_ID","description":"The account id","required":true,"type":"string"},{"in":"path","name":"BANK_ID","description":"The bank id","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/CreateAccountResponseJsonV310"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorInvalidJsonFormat"}}}}},"/obp/v5.0.0/users":{"post":{"tags":["User","Onboarding"],"summary":"Create User","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"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
","operationId":"createUser","parameters":[{"in":"body","name":"body","description":"CreateUserJson object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/CreateUserJson"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/UserJsonV200"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}}},"definitions":{"ErrorInvalidJsonFormat":{"properties":{"message":{"type":"string","example":"OBP-10001: Incorrect json format."}}},"ErrorUserNotLoggedIn":{"properties":{"message":{"type":"string","example":"OBP-20001: User not logged in. Authentication is required!"}}},"CreateAccountRequestJsonV500":{"required":["label","product_code"],"properties":{"branch_id":{"type":"string","example":"DERBY6"},"account_routings":{"type":"array","items":{"$ref":"#/definitions/AccountRoutingJsonV121"}},"label":{"type":"string","example":"My Account"},"balance":{"$ref":"#/definitions/AmountOfMoneyJsonV121"},"user_id":{"type":"string","example":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1"},"product_code":{"type":"string","example":"1234BW"}}},"AmountOfMoneyJsonV121":{"required":["currency","amount"],"properties":{"currency":{"type":"string","example":"EUR"},"amount":{"type":"string","example":"0"}}},"AccountRoutingJsonV121":{"required":["scheme","address"],"properties":{"scheme":{"type":"string","example":"AccountNumber"},"address":{"type":"string","example":"4930396"}}},"CreateUserJson":{"required":["first_name","email","username","last_name","password"],"properties":{"first_name":{"type":"string","example":"Simon"},"email":{"type":"string","example":"felixsmith@example.com"},"username":{"type":"string","example":"felixsmith"},"last_name":{"type":"string","example":"Redfern"},"password":{"type":"string","example":"String"}}},"UserJsonV200":{"required":["provider","email","username","provider_id","user_id","entitlements"],"properties":{"provider":{"type":"string","example":"http://127.0.0.1:8080"},"email":{"type":"string","example":"felixsmith@example.com"},"username":{"type":"string","example":"felixsmith"},"provider_id":{"type":"string","example":"Chris"},"user_id":{"type":"string","example":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1"},"entitlements":{"$ref":"#/definitions/EntitlementJSONs"}}},"AccountAttributeResponseJson":{"required":["name","account_attribute_id","product_code","type","value"],"properties":{"name":{"type":"string","example":"OVERDRAFT_START_DATE"},"account_attribute_id":{"type":"string","example":"613c83ea-80f9-4560-8404-b9cd4ec42a7f"},"product_code":{"type":"string","example":"1234BW"},"type":{"type":"string","example":"DATE_WITH_DAY"},"product_instance_code":{"type":"string","example":"LKJL98769F"},"value":{"type":"string","example":"2012-04-23"}}},"CreateAccountResponseJsonV310":{"required":["account_attributes","branch_id","account_routings","label","balance","user_id","product_code","account_id"],"properties":{"account_attributes":{"type":"array","items":{"$ref":"#/definitions/AccountAttributeResponseJson"}},"branch_id":{"type":"string","example":"DERBY6"},"account_routings":{"type":"array","items":{"$ref":"#/definitions/AccountRoutingJsonV121"}},"label":{"type":"string","example":"My Account"},"balance":{"$ref":"#/definitions/AmountOfMoneyJsonV121"},"user_id":{"type":"string","example":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1"},"product_code":{"type":"string","example":"1234BW"},"account_id":{"type":"string","example":"8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0"}}},"EntitlementJSONs":{"required":["list"],"properties":{"list":{"type":"array","items":{"$ref":"#/definitions/EntitlementJSON"}}}},"EntitlementJSON":{"required":["entitlement_id","role_name","bank_id"],"properties":{"entitlement_id":{"type":"string","example":"6fb17583-1e49-4435-bb74-a14fe0996723"},"role_name":{"type":"string","example":"CanQueryOtherUser"},"bank_id":{"type":"string","example":"gh.29.uk"}}}}}