Skip to main content

Explore Borrowing Capacity API

  1. In your browser, navigate to the Borrowing Capacity API documentation:

    http://localhost:3000/hexyback-workshop/docs/hexy/get-an-estimate-of-your-borrowing-capacity
  2. Modify the sample request parameters:

    Modify sample request parameters

  1. Copy the curl request, replacing http://localhost:3000 with the URL of your deployed API endpoint - apiEndpoint:

    ✔  Deployed:
    ConfigStack
    # Use the URL shown below
    apiEndpoint: https://xxxxxxx.execute-api.ap-southeast-2.amazonaws.com/prod/
  2. Paste the curl request into your terminal and hit Enter:

    curl -L -X GET 'https://xxxxxxx.execute-api.ap-southeast-2.amazonaws.com/prod/borrowingCapacity?borrowerEmail=rami@rolo.polo&grossAnnualIncome=50000&employmentStatus=SELF_EMPLOYED' \
    -H 'Accept: application/json'
  3. Navigate to the AWS Lambda console and select the CalculateBorrowingCapacity lambda

    Select `CalculateBorrowingCapacity` lambda on AWS Lambda console

  4. Navigate to the Monitor tab:

    Navigate to the `Monitor` tab for the `CalculateBorrowingCapacity` lambda

  5. Click on the first entry in the Traces tab:

    Navigate to the `Traces` tab for the `CalculateBorrowingCapacity` lambda

    Observe the traces shown. You'll notice two calls:

    • A call to (attempt) to get the borrower profile
    • A call to put the borrowing capacity calculation

Exercise:

  1. Attempt to calculate the borrowing capacity for a borrower that does not exist. What happens? Observe the traces to confirm your assumptions.