Loan requests

class market.restapi.loanrequests_endpoint.LoanRequests(market_community)[source]

This class handles requests regarding loan requests in the mortgage market community. Only accessible by financial institutions.

render_GET(request)[source]
GET /loanrequests

A GET request to this endpoint returns a list of loan requests. Only accessible by financial institutions.

Example request:

curl -X GET http://localhost:8085/loanrequests

Example response:

{
    "loan_requests": [{
        "id": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_8948AB_16",
        "user_id": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
        "mortgage_type": "FIXEDRATE",
        "banks": ["ABN", "RABO"],
        "description": "...",
        "amount_wanted": 395000,
        "status": "PENDING"
    }, ...]
}
class market.restapi.loanrequests_endpoint.SpecificLoanRequestEndpoint(market_community, loan_request_id)[source]

This class handles requests for a specific loan request.

render_PATCH(request)[source]
PATCH /loanrequests/(string: loan_request_id)

A PATCH request to this endpoint will accept/reject a loan request. This is performed by a financial institution.

Example request:

curl -X PATCH http://localhost:8085/loanrequests/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_8948AB_16
--data "state=ACCEPT"

Example response:

{"success": True}