{"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":"v4.0.0"},"host":"obp-api-sandbox.nmbbank.co.tz","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/v4.0.0/banks/{BANK_ID}/account-applications":{"get":{"tags":["Account-Application","Account"],"summary":"Get Account Applications","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"
Get the Account Applications.
Authentication is Mandatory
","operationId":"getAccountApplications","parameters":[{"in":"path","name":"BANK_ID","description":"The bank id","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/AccountApplicationsJsonV310"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}},"post":{"tags":["Account-Application","Account"],"summary":"Create Account Application","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Create Account Application
Authentication is Mandatory
","operationId":"createAccountApplication","parameters":[{"in":"body","name":"body","description":"AccountApplicationJson object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/AccountApplicationJson"}},{"in":"path","name":"BANK_ID","description":"The bank id","required":true,"type":"string"}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/AccountApplicationResponseJson"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorInvalidJsonFormat"}}}}},"/obp/v4.0.0/banks/{BANK_ID}/account-applications/{ACCOUNT_APPLICATION_ID}":{"get":{"tags":["Account-Application","Account"],"summary":"Get Account Application by Id","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Get the Account Application.
Authentication is Mandatory
","operationId":"getAccountApplication","parameters":[{"in":"path","name":"ACCOUNT_APPLICATION_ID","description":"the account application 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/AccountApplicationResponseJson"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}},"put":{"tags":["Account-Application","Account"],"summary":"Update Account Application Status","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Update an Account Application status
Authentication is Mandatory
","operationId":"updateAccountApplicationStatus","parameters":[{"in":"body","name":"body","description":"AccountApplicationUpdateStatusJson object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/AccountApplicationUpdateStatusJson"}},{"in":"path","name":"ACCOUNT_APPLICATION_ID","description":"the account application 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/AccountApplicationResponseJson"}},"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!"}}},"AmountOfMoneyJsonV121":{"required":["currency","amount"],"properties":{"currency":{"type":"string","example":"EUR"},"amount":{"type":"string","example":"0"}}},"AccountApplicationJson":{"required":["product_code"],"properties":{"product_code":{"type":"string","example":"1234BW"},"user_id":{"type":"string","example":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1"},"customer_id":{"type":"string","example":"7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh"}}},"ResourceUserJSON":{"required":["provider","email","username","provider_id","user_id"],"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"}}},"AccountApplicationsJsonV310":{"required":["account_applications"],"properties":{"account_applications":{"type":"array","items":{"$ref":"#/definitions/AccountApplicationResponseJson"}}}},"CustomerCreditRatingJSON":{"required":["rating","source"],"properties":{"rating":{"type":"string","example":"OBP"},"source":{"type":"string","example":"OBP"}}},"CustomerFaceImageJson":{"required":["url","date"],"properties":{"url":{"type":"string","example":"www.openbankproject"},"date":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"}}},"CustomerJsonV310":{"required":["customer_id","name_suffix","email","branch_id","mobile_phone_number","customer_number","highest_education_attained","dob_of_dependants","bank_id","date_of_birth","last_ok_date","employment_status","legal_name","title","face_image","dependants","relationship_status","kyc_status"],"properties":{"customer_id":{"type":"string","example":"7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh"},"name_suffix":{"type":"string","example":"Sr"},"email":{"type":"string","example":"felixsmith@example.com"},"branch_id":{"type":"string","example":"DERBY6"},"mobile_phone_number":{"type":"string","example":"+44 07972 444 876"},"customer_number":{"type":"string","example":"5987953"},"highest_education_attained":{"type":"string","example":"Master"},"dob_of_dependants":{"type":"array","items":{"type":"string","format":"date"}},"bank_id":{"type":"string","example":"gh.29.uk"},"date_of_birth":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"},"credit_rating":{"$ref":"#/definitions/CustomerCreditRatingJSON"},"last_ok_date":{"type":"string","format":"date","example":"2023-03-28T21:00:31Z"},"employment_status":{"type":"string","example":"worker"},"legal_name":{"type":"string","example":"Eveline Tripman"},"credit_limit":{"$ref":"#/definitions/AmountOfMoneyJsonV121"},"title":{"type":"string","example":"Dr."},"face_image":{"$ref":"#/definitions/CustomerFaceImageJson"},"dependants":{"type":"integer","format":"int32","example":"1"},"relationship_status":{"type":"string","example":"single"},"kyc_status":{"type":"boolean","example":"true"}}},"AccountApplicationUpdateStatusJson":{"required":["status"],"properties":{"status":{"type":"string","example":"ACCEPTED"}}},"AccountApplicationResponseJson":{"required":["date_of_application","account_application_id","product_code","status","customer","user"],"properties":{"date_of_application":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"},"account_application_id":{"type":"string","example":"gc23a7e2-7dd2-4bdf-a0b4-ae31232a4763"},"product_code":{"type":"string","example":"1234BW"},"status":{"type":"string","example":"REQUESTED"},"customer":{"$ref":"#/definitions/CustomerJsonV310"},"user":{"$ref":"#/definitions/ResourceUserJSON"}}}}}