{"swagger":"2.0","info":{"version":"2021.01.0","title":"uibankapi","description":"UiBank API"},"basePath":"/api","paths":{"/accounts/{id}/transactions":{"get":{"tags":["account"],"summary":"Queries transactions of account.","operationId":"account.prototype.__get__transactions","parameters":[{"name":"id","in":"path","description":"account id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/transaction"}}}},"deprecated":false}},"/accounts":{"post":{"tags":["account"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"account.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/$new_account"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/account"}}},"deprecated":false},"get":{"tags":["account"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"account.find","parameters":[{"name":"filter","in":"query","description":"Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string (`{\"where\":{\"something\":\"value\"}}`).  See https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries for more details.","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/account"}}}},"deprecated":false}},"/accounts/{id}":{"get":{"tags":["account"],"summary":"Find a model instance by {{id}} from the data source.","operationId":"account.findById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","description":"Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/account"}}},"deprecated":false},"put":{"tags":["account"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"account.replaceById__put_accounts_{id}","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/account"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/account"}}},"deprecated":false},"delete":{"tags":["account"],"summary":"Delete a model instance by {{id}} from the data source.","operationId":"account.deleteById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/accounts/{id}/replace":{"post":{"tags":["account"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"account.replaceById__post_accounts_{id}_replace","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/account"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/account"}}},"deprecated":false}},"/accounts/update":{"post":{"tags":["account"],"summary":"Update instances of the model matched by {{where}} from the data source.","operationId":"account.updateAll","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"description":"An object of model property name/value pairs","$ref":"#/definitions/account"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"Information related to the outcome of the operation","type":"object","properties":{"count":{"description":"The number of instances updated","type":"number","format":"double"}}}}},"deprecated":false}},"/accounts/count":{"get":{"tags":["account"],"summary":"Count instances of the model matched by where from the data source.","operationId":"account.count","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/addresses":{"post":{"tags":["address"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"address.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/$new_address"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/address"}}},"deprecated":false},"get":{"tags":["address"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"address.find","parameters":[{"name":"filter","in":"query","description":"Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string (`{\"where\":{\"something\":\"value\"}}`).  See https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries for more details.","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/address"}}}},"deprecated":false}},"/addresses/{id}":{"get":{"tags":["address"],"summary":"Find a model instance by {{id}} from the data source.","operationId":"address.findById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","description":"Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/address"}}},"deprecated":false},"put":{"tags":["address"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"address.replaceById__put_addresses_{id}","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/address"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/address"}}},"deprecated":false},"delete":{"tags":["address"],"summary":"Delete a model instance by {{id}} from the data source.","operationId":"address.deleteById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/addresses/{id}/replace":{"post":{"tags":["address"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"address.replaceById__post_addresses_{id}_replace","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/address"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/address"}}},"deprecated":false}},"/addresses/update":{"post":{"tags":["address"],"summary":"Update instances of the model matched by {{where}} from the data source.","operationId":"address.updateAll","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"description":"An object of model property name/value pairs","$ref":"#/definitions/address"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"Information related to the outcome of the operation","type":"object","properties":{"count":{"description":"The number of instances updated","type":"number","format":"double"}}}}},"deprecated":false}},"/addresses/count":{"get":{"tags":["address"],"summary":"Count instances of the model matched by where from the data source.","operationId":"address.count","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/users/{id}/accessTokens/{fk}":{"get":{"tags":["user"],"summary":"Find a related item by id for accessTokens.","operationId":"user.prototype.__findById__accessTokens","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for accessTokens","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/AccessToken"}}},"deprecated":false},"delete":{"tags":["user"],"summary":"Delete a related item by id for accessTokens.","operationId":"user.prototype.__destroyById__accessTokens","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for accessTokens","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["user"],"summary":"Update a related item by id for accessTokens.","operationId":"user.prototype.__updateById__accessTokens","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for accessTokens","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/AccessToken"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/AccessToken"}}},"deprecated":false}},"/users/{id}/accounts/{fk}":{"get":{"tags":["user"],"summary":"Find a related item by id for accounts.","operationId":"user.prototype.__findById__accounts","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for accounts","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/account"}}},"deprecated":false},"delete":{"tags":["user"],"summary":"Delete a related item by id for accounts.","operationId":"user.prototype.__destroyById__accounts","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for accounts","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["user"],"summary":"Update a related item by id for accounts.","operationId":"user.prototype.__updateById__accounts","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for accounts","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/account"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/account"}}},"deprecated":false}},"/users/{id}/addresses/{fk}":{"get":{"tags":["user"],"summary":"Find a related item by id for addresses.","operationId":"user.prototype.__findById__addresses","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for addresses","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/address"}}},"deprecated":false},"delete":{"tags":["user"],"summary":"Delete a related item by id for addresses.","operationId":"user.prototype.__destroyById__addresses","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for addresses","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["user"],"summary":"Update a related item by id for addresses.","operationId":"user.prototype.__updateById__addresses","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"fk","in":"path","description":"Foreign key for addresses","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/address"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/address"}}},"deprecated":false}},"/users/{id}/accessTokens":{"get":{"tags":["user"],"summary":"Queries accessTokens of user.","operationId":"user.prototype.__get__accessTokens","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/AccessToken"}}}},"deprecated":false},"post":{"tags":["user"],"summary":"Creates a new instance in accessTokens of this model.","operationId":"user.prototype.__create__accessTokens","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/AccessToken"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/AccessToken"}}},"deprecated":false},"delete":{"tags":["user"],"summary":"Deletes all accessTokens of this model.","operationId":"user.prototype.__delete__accessTokens","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/{id}/accessTokens/count":{"get":{"tags":["user"],"summary":"Counts accessTokens of user.","operationId":"user.prototype.__count__accessTokens","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/users/{id}/accounts":{"get":{"tags":["user"],"summary":"Queries accounts of user.","operationId":"user.prototype.__get__accounts","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/account"}}}},"deprecated":false},"post":{"tags":["user"],"summary":"Creates a new instance in accounts of this model.","operationId":"user.prototype.__create__accounts","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/$new_account"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/account"}}},"deprecated":false},"delete":{"tags":["user"],"summary":"Deletes all accounts of this model.","operationId":"user.prototype.__delete__accounts","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/{id}/accounts/count":{"get":{"tags":["user"],"summary":"Counts accounts of user.","operationId":"user.prototype.__count__accounts","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/users/{id}/addresses":{"get":{"tags":["user"],"summary":"Queries addresses of user.","operationId":"user.prototype.__get__addresses","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/address"}}}},"deprecated":false},"post":{"tags":["user"],"summary":"Creates a new instance in addresses of this model.","operationId":"user.prototype.__create__addresses","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/$new_address"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/address"}}},"deprecated":false},"delete":{"tags":["user"],"summary":"Deletes all addresses of this model.","operationId":"user.prototype.__delete__addresses","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/{id}/addresses/count":{"get":{"tags":["user"],"summary":"Counts addresses of user.","operationId":"user.prototype.__count__addresses","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/users":{"post":{"tags":["user"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"user.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/$new_user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false},"patch":{"tags":["user"],"summary":"Patch an existing model instance or insert a new one into the data source.","operationId":"user.patchOrCreate","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false},"put":{"tags":["user"],"summary":"Replace an existing model instance or insert a new one into the data source.","operationId":"user.replaceOrCreate__put_users","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false},"get":{"tags":["user"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"user.find","parameters":[{"name":"filter","in":"query","description":"Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string (`{\"where\":{\"something\":\"value\"}}`).  See https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries for more details.","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/user"}}}},"deprecated":false}},"/users/replaceOrCreate":{"post":{"tags":["user"],"summary":"Replace an existing model instance or insert a new one into the data source.","operationId":"user.replaceOrCreate__post_users_replaceOrCreate","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false}},"/users/upsertWithWhere":{"post":{"tags":["user"],"summary":"Update an existing model instance or insert a new one into the data source based on the where criteria.","operationId":"user.upsertWithWhere","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"description":"An object of model property name/value pairs","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false}},"/users/{id}/exists":{"get":{"tags":["user"],"summary":"Check whether a model instance exists in the data source.","operationId":"user.exists__get_users_{id}_exists","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"exists":{"type":"boolean"}}}}},"deprecated":false}},"/users/{id}":{"head":{"tags":["user"],"summary":"Check whether a model instance exists in the data source.","operationId":"user.exists__head_users_{id}","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"exists":{"type":"boolean"}}}}},"deprecated":false},"get":{"tags":["user"],"summary":"Find a model instance by {{id}} from the data source.","operationId":"user.findById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","description":"Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false},"put":{"tags":["user"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"user.replaceById__put_users_{id}","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false},"delete":{"tags":["user"],"summary":"Delete a model instance by {{id}} from the data source.","operationId":"user.deleteById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"patch":{"tags":["user"],"summary":"Patch attributes for a model instance and persist it into the data source.","operationId":"user.prototype.patchAttributes","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"description":"An object of model property name/value pairs","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false}},"/users/{id}/replace":{"post":{"tags":["user"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"user.replaceById__post_users_{id}_replace","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false}},"/users/findOne":{"get":{"tags":["user"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"user.findOne","parameters":[{"name":"filter","in":"query","description":"Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string (`{\"where\":{\"something\":\"value\"}}`).  See https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries for more details.","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/user"}}},"deprecated":false}},"/users/update":{"post":{"tags":["user"],"summary":"Update instances of the model matched by {{where}} from the data source.","operationId":"user.updateAll","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"description":"An object of model property name/value pairs","$ref":"#/definitions/user"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"Information related to the outcome of the operation","type":"object","properties":{"count":{"description":"The number of instances updated","type":"number","format":"double"}}}}},"deprecated":false}},"/users/count":{"get":{"tags":["user"],"summary":"Count instances of the model matched by where from the data source.","operationId":"user.count","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/users/change-stream":{"post":{"tags":["user"],"summary":"Create a change stream.","operationId":"user.createChangeStream__post_users_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"file"}}},"deprecated":false},"get":{"tags":["user"],"summary":"Create a change stream.","operationId":"user.createChangeStream__get_users_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"file"}}},"deprecated":false}},"/users/login":{"post":{"tags":["user"],"summary":"Login a user with username/email and password.","operationId":"user.login","parameters":[{"name":"credentials","in":"body","required":true,"schema":{"type":"object"}},{"name":"include","in":"query","description":"Related objects to include in the response. See the description of return value for more details.","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The response body contains properties of the AccessToken created on login.\nDepending on the value of `include` parameter, the body may contain additional properties:\n\n  - `user` - `U+007BUserU+007D` - Data of the currently logged in user. (`include=user`)\n\n","type":"object"}}},"deprecated":false}},"/users/logout":{"post":{"tags":["user"],"summary":"Logout a user with access token.","operationId":"user.logout","parameters":[],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/{id}/verify":{"post":{"tags":["user"],"summary":"Trigger user's identity verification with configured verifyOptions","operationId":"user.prototype.verify","parameters":[{"name":"id","in":"path","description":"user id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/confirm":{"get":{"tags":["user"],"summary":"Confirm a user registration with identity verification token.","operationId":"user.confirm","parameters":[{"name":"uid","in":"query","required":true,"type":"string"},{"name":"token","in":"query","required":true,"type":"string"},{"name":"redirect","in":"query","required":false,"type":"string"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/reset":{"post":{"tags":["user"],"summary":"Reset password for a user with email.","operationId":"user.resetPassword","parameters":[{"name":"options","in":"body","required":true,"schema":{"type":"object"}}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/change-password":{"post":{"tags":["user"],"summary":"Change a user's password.","operationId":"user.changePassword","parameters":[{"name":"oldPassword","in":"formData","required":true,"type":"string"},{"name":"newPassword","in":"formData","required":true,"type":"string"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/users/reset-password":{"post":{"tags":["user"],"summary":"Reset user's password via a password-reset token.","operationId":"user.setPassword","parameters":[{"name":"newPassword","in":"formData","required":true,"type":"string"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/transactions":{"post":{"tags":["transaction"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"transaction.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/$new_transaction"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/transaction"}}},"deprecated":false},"get":{"tags":["transaction"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"transaction.find","parameters":[{"name":"filter","in":"query","description":"Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string (`{\"where\":{\"something\":\"value\"}}`).  See https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries for more details.","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/transaction"}}}},"deprecated":false}},"/transactions/{id}":{"get":{"tags":["transaction"],"summary":"Find a model instance by {{id}} from the data source.","operationId":"transaction.findById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","description":"Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/transaction"}}},"deprecated":false},"put":{"tags":["transaction"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"transaction.replaceById__put_transactions_{id}","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/transaction"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/transaction"}}},"deprecated":false},"delete":{"tags":["transaction"],"summary":"Delete a model instance by {{id}} from the data source.","operationId":"transaction.deleteById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/transactions/{id}/replace":{"post":{"tags":["transaction"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"transaction.replaceById__post_transactions_{id}_replace","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/transaction"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/transaction"}}},"deprecated":false}},"/transactions/update":{"post":{"tags":["transaction"],"summary":"Update instances of the model matched by {{where}} from the data source.","operationId":"transaction.updateAll","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"description":"An object of model property name/value pairs","$ref":"#/definitions/transaction"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"Information related to the outcome of the operation","type":"object","properties":{"count":{"description":"The number of instances updated","type":"number","format":"double"}}}}},"deprecated":false}},"/transactions/count":{"get":{"tags":["transaction"],"summary":"Count instances of the model matched by where from the data source.","operationId":"transaction.count","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/quotes/{id}":{"get":{"tags":["quote"],"summary":"Find a model instance by {{id}} from the data source.","operationId":"quote.findById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"filter","in":"query","description":"Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/quote"}}},"deprecated":false},"put":{"tags":["quote"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"quote.replaceById__put_quotes_{id}","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/quote"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/quote"}}},"deprecated":false},"delete":{"tags":["quote"],"summary":"Delete a model instance by {{id}} from the data source.","operationId":"quote.deleteById","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/quotes/{id}/replace":{"post":{"tags":["quote"],"summary":"Replace attributes for a model instance and persist it into the data source.","operationId":"quote.replaceById__post_quotes_{id}_replace","parameters":[{"name":"id","in":"path","description":"Model id","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"description":"Model instance data","$ref":"#/definitions/quote"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/quote"}}},"deprecated":false}},"/quotes":{"get":{"tags":["quote"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"quote.find","parameters":[{"name":"filter","in":"query","description":"Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string (`{\"where\":{\"something\":\"value\"}}`).  See https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries for more details.","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/quote"}}}},"deprecated":false}},"/quotes/count":{"get":{"tags":["quote"],"summary":"Count instances of the model matched by where from the data source.","operationId":"quote.count","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"count":{"type":"number","format":"double"}}}}},"deprecated":false}},"/quotes/newquote":{"post":{"tags":["quote"],"summary":"get new quote","operationId":"quote.newquote","parameters":[{"name":"amount","in":"formData","description":"Loan amount requested","required":true,"type":"number","format":"double"},{"name":"term","in":"formData","description":"term for the loan","required":true,"type":"number","format":"double"},{"name":"income","in":"formData","description":"Users current income","required":true,"type":"number","format":"double"},{"name":"age","in":"formData","description":"Users current age","required":true,"type":"number","format":"double"},{"name":"email","in":"formData","description":"Email Address","required":false,"default":"","type":"string"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object","properties":{"accepted":{"description":"rate","type":"boolean"},"rate":{"description":"The accepted rate","type":"number","format":"double"},"quoteid":{"description":"The quote id for reference","type":"string"}}}}},"deprecated":false}}},"tags":[{"name":"account"},{"name":"address"},{"name":"user"},{"name":"transaction"},{"name":"quote"}],"protocol":"https","consumes":["application/json","application/x-www-form-urlencoded","application/xml","text/xml"],"produces":["application/json","application/xml","text/xml","application/javascript","text/javascript"],"definitions":{"x-any":{"properties":{}},"transaction":{"properties":{"type":{"default":"credit","type":"string"},"ref":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number","format":"double"},"TransfertoAccountId":{"type":"string"},"dispute":{"default":"ok","type":"string"},"balance":{"type":"number","format":"double"},"date":{"type":"string","format":"date-time"},"id":{"$ref":"#/definitions/ObjectID"},"accountId":{"$ref":"#/definitions/ObjectID"},"userId":{"$ref":"#/definitions/ObjectID"}},"required":["type","amount","dispute"],"additionalProperties":false},"$new_account":{"properties":{"accountNumber":{"type":"number","format":"double"},"sortCode":{"type":"string"},"friendlyName":{"type":"string"},"type":{"type":"string"},"balance":{"default":0,"type":"number","format":"double"},"date":{"type":"string","format":"date-time"},"userId":{"$ref":"#/definitions/ObjectID"}},"additionalProperties":false},"account":{"properties":{"accountNumber":{"type":"number","format":"double"},"sortCode":{"type":"string"},"friendlyName":{"type":"string"},"type":{"type":"string"},"balance":{"default":0,"type":"number","format":"double"},"date":{"type":"string","format":"date-time"},"id":{"$ref":"#/definitions/ObjectID"},"userId":{"$ref":"#/definitions/ObjectID"}},"additionalProperties":false},"$new_address":{"properties":{"DateStart":{"type":"string"},"DateEnd":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"Town":{"type":"string"},"Country":{"type":"string"},"PostcodeZIP":{"type":"string"},"userId":{"$ref":"#/definitions/ObjectID"}},"additionalProperties":false},"address":{"properties":{"DateStart":{"type":"string"},"DateEnd":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"Town":{"type":"string"},"Country":{"type":"string"},"PostcodeZIP":{"type":"string"},"id":{"$ref":"#/definitions/ObjectID"},"userId":{"$ref":"#/definitions/ObjectID"}},"additionalProperties":false},"AccessToken":{"properties":{"id":{"type":"string"},"ttl":{"default":1209600,"description":"time to live in seconds (2 weeks by default)","type":"number","format":"double"},"scopes":{"description":"Array of scopes granted to this access token.","type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"userId":{"$ref":"#/definitions/ObjectID"}},"required":["id"],"additionalProperties":false},"$new_user":{"properties":{"gender":{"type":"string"},"dateOfBirth":{"type":"string","format":"date-time"},"title":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"type":{"type":"string"},"employmentStatus":{"type":"string"},"maritalStatus":{"type":"string"},"numDependants":{"type":"string"},"residenceStatus":{"type":"string"},"locked":{"default":false,"type":"boolean"},"realm":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"}},"required":["email"],"additionalProperties":false},"user":{"properties":{"gender":{"type":"string"},"dateOfBirth":{"type":"string","format":"date-time"},"title":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"type":{"type":"string"},"employmentStatus":{"type":"string"},"maritalStatus":{"type":"string"},"numDependants":{"type":"string"},"residenceStatus":{"type":"string"},"locked":{"default":false,"type":"boolean"},"realm":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"id":{"$ref":"#/definitions/ObjectID"}},"required":["email"],"additionalProperties":false},"$new_transaction":{"properties":{"type":{"default":"credit","type":"string"},"ref":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number","format":"double"},"TransfertoAccountId":{"type":"string"},"dispute":{"default":"ok","type":"string"},"balance":{"type":"number","format":"double"},"date":{"type":"string","format":"date-time"},"accountId":{"$ref":"#/definitions/ObjectID"},"userId":{"$ref":"#/definitions/ObjectID"}},"required":["type","amount","dispute"],"additionalProperties":false},"quote":{"properties":{"amount":{"type":"number","format":"double"},"term":{"type":"number","format":"double"},"income":{"type":"number","format":"double"},"age":{"type":"number","format":"double"},"accepted":{"type":"boolean"},"rate":{"type":"number","format":"double"},"date":{"type":"string","format":"date-time"},"email":{"type":"string"},"id":{"$ref":"#/definitions/ObjectID"}},"additionalProperties":false},"ObjectID":{"type":"string","pattern":"^[a-fA-F\\d]{24}$"}}}