{"id":28262754,"url":"https://github.com/leogregianin/loan-fintech-api","last_synced_at":"2025-07-23T14:08:35.139Z","repository":{"id":36599549,"uuid":"228494974","full_name":"leogregianin/loan-fintech-api","owner":"leogregianin","description":":credit_card: :cloud: Another Loan Fintech API","archived":false,"fork":false,"pushed_at":"2025-01-16T14:35:58.000Z","size":180,"stargazers_count":10,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-20T06:52:45.262Z","etag":null,"topics":["api","fintech","loans"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leogregianin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-16T23:37:40.000Z","updated_at":"2025-05-27T01:24:42.000Z","dependencies_parsed_at":"2025-06-20T06:52:48.740Z","dependency_job_id":"228cab55-5fc6-4472-86c8-55c6ff319efa","html_url":"https://github.com/leogregianin/loan-fintech-api","commit_stats":null,"previous_names":["fintech-hub/loan-fintech-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leogregianin/loan-fintech-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogregianin%2Floan-fintech-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogregianin%2Floan-fintech-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogregianin%2Floan-fintech-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogregianin%2Floan-fintech-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leogregianin","download_url":"https://codeload.github.com/leogregianin/loan-fintech-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogregianin%2Floan-fintech-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266691580,"owners_count":23969182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","fintech","loans"],"created_at":"2025-05-20T07:12:44.018Z","updated_at":"2025-07-23T14:08:35.130Z","avatar_url":"https://github.com/leogregianin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loan Fintech API with Django REST Framework\n \n## Objective\nThe main objective of this project is to create an API to manage the loan payments control system from a fintech.\n\n## Purpose\nThe purpose of this challenge is to test your ability to implement a solution given an abstract problem. You may find a problem in the asked task that you need to explain the problem and propose a solution to fix it. \n\n## Problem\nA fintech needs to keep track of the amount of money loaned and the missed/made payments. It also needs a place to retrieve the volume of outstanding debt at some point in time.\n\n## Limitations\nLoans are paid back in monthly installments.\n\n## Install\n\n### Setup install\n* `pipenv install`\n\n### Running\n* `python manage.py makemigrations --settings=config.settings.dev`\n* `python manage.py migrate --settings=config.settings.dev`\n* `python manage.py test --settings=config.settings.dev`\n* `python manage.py runserver --settings=config.settings.dev`\n\n\n## Endpoints\n\n* Documentatin: `/swagger/`\n* Admin: `/admin/`\n* Get JWT token: `/api/token/`\n* Refresh JWT token: `/api/token/refresh/`\n* All clients: `/clients/`\n* Client by id: `/client/{client_id}/`\n* All loans: `/loans/`\n* Balance by client id: `/loans/{loan_id}/balance/`\n* Payments by client id: `/loans/{loan_id}/payments/`\n\n\n### POST /clients/\n\n#### Summary\n\nCreate a record of a client\n\n#### Payload\n\n - client_id: \n - name: \n - surname: \n - email: \n - telephone: \n - cpf: \n\n#### Example of sent data\n\n    {\n        \"client_id\": 1,\n        'name': 'Nome',\n        'surname': 'Sobrenome',\n        'email': 'nome@gmail.com',\n        'telephone': '6533245152',\n        'cpf': '85478999988'\n    }\n\n\n### GET /client/\u003cid\u003e\n\n#### Summary\n\nList client id \n\n#### Example of sent data\n\n    {\n        \"client_id\": 1,\n    }\n\n#### Example of received data\n\n    {\n        \"client_id\": 1,\n        'name': 'Nome',\n        'surname': 'Sobrenome',\n        'email': 'nome@gmail.com',\n        'telephone': '6533245152',\n        'cpf': '85478999988'\n    }\n\n\n### POST /loans\n\n#### Summary\n\nCreate a loan application. Loans are automatically accepted.\n\n#### Payload\n\n- amount: loan amount in dollars.\n- term: number of months that will take until the loan gets paid-off.\n- rate: interest rate as decimal.\n- date: when the loan was requested (origination date as an ISO 8601 string).\n\n#### Example of sent data\n\n    {\n        \"amount\": 1000,\n        \"term\": 12,\n        \"rate\": 0.05,\n        \"date\": \"2019-05-09 03:18Z\"\n    }\n\n#### Reply\n\n- loan_id: unique id of the loan. \n- installment: monthly loan payment.\n\n#### Example of received data\n\n    {\n        \"loan_id\": \"000-0000-0000-0000\"\n        \"installment\": 85.60\n    }\n\n#### Notes\n\nLoan payment formula\n\n    r = rate / 12\n    installment = [r + r / ((1 + r) ^ term - 1)] x amount\n\n#### Example\n\nFor repaying a loan of $1000 at 5% interest for 12 months, the equation would be:\n\n    installment = [(0.05 / 12) + (0.05 / 12) / ((1 + (0.05 / 12)) ^ 12 - 1] x 1000\n    installment = 85.60\n\n### POST /loans/\u003c:id\u003e/payments\n\n#### Summary\n\nCreate a record of a payment made or missed.\n\n#### Payload\n\n- payment_choice: type of payment: made or missed.\n- date: payment date.\n- amount: amount of the payment made or missed in dollars.\n    \n#### Example of sent data (Payment made)\n\n    {\n        \"payment_choice\": \"made\",\n        \"date\": \"2019-05-07 04:18Z\",\n        \"amount\": 85.60\n    }\n\n#### Example of sent data (Payment missed)\n\n    {\n        \"payment_choice\": \"missed\",\n        \"date\": \"2019-05-07 04:18Z\",\n        \"amount\": 85.60\n    }\n\n## POST /loans/\u003c:id\u003e/balance\n\n#### Summary\n\nGet the volume of outstanding debt (i.e., debt yet to be paid) at some point in time.\n\n#### Payload\n\n- date: loan balance until this date.\n\n#### Example of sent data\n\n    {\n        \"date\": \"2017-09-05 02:18Z\"\n    }\n\n#### Reply\n\n- balance: outstanding debt of loan.\n\n#### Example\n\n    {\n        \"balance\": 40\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleogregianin%2Floan-fintech-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleogregianin%2Floan-fintech-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleogregianin%2Floan-fintech-api/lists"}